anadst.cxx

Go to the documentation of this file.
00001 #include <TFile.h>
00002 #include <TH2F.h>
00003 #include "DSTAnalysis/TOF/TOFAna.h"
00004 #include "MIPPEventSummary/MIPPEventSummary.h"
00005 #include "MIPPEventSummary/MIPPTrackSummary.h"
00006 #include <iostream>
00007 
00008 using namespace std;
00009 
00010 // static int lastRun  = 15250;
00011 
00012 static TOFAna*  fTOFAna  = 0;
00013 
00014 // ROOT histograms
00015 static TFile* gsHistoFile = 0;
00016 
00017 extern "C" 
00018 {
00019   void InitDST(const char* fname) 
00020   {
00021     gsHistoFile = new TFile(fname,"RECREATE");
00022     gsHistoFile->cd();
00023     
00024     fTOFAna  = new TOFAna();
00025  }
00026 
00027 //....................................................................
00028 
00029   void EndDST() 
00030   { 
00031     gsHistoFile->Write(); 
00032     fTOFAna->PrintCutTable();
00033   }
00034 
00035 //....................................................................
00036 
00037   bool AnaDST(const MIPPEventSummary* dst) 
00038   {
00039 
00040     // 
00041     bool goodevent = fTOFAna->Ana(dst);
00042     if (goodevent==false) return false;
00043 
00044     return true;
00045   }
00046 
00047 //....................................................................
00048 
00049   void EndFile() {
00050 
00051     cout << "Events " << fTOFAna->totalevent << endl;
00052   }
00053 }
00054 ////////////////////////////////////////////////////////////////////////

Generated on Mon Nov 23 08:01:43 2009 for MIPP(E907) by  doxygen 1.4.7