mcr/hdt_read/HdtAppl_Empty.C

00001 //#include "TH2.h"
00002 //#include "TCanvas.h"
00003 //#include "TPDF.h"
00004 //#include "TApplication.h"
00005 //#include "TTree.h"
00006 //#include "TDatime.h"
00007 //#include "TLegend.h"
00008 //#include "TStyle.h"
00009 
00010 #include "TFndGenInfo.h"
00011 #include "TFndHdt.h"
00012 #include "Gui.h"
00013 
00014 // #include "TFile.h"
00015 // #include "TTree.h"
00016 
00017 #include "AccessHDT_MultiRun.C"
00018 
00019 class HdtAppl_ClassEmpty: public THdtAccess{
00020 
00021   //private:
00022 
00023 public:
00024   HdtAppl_ClassEmpty();
00025   ~HdtAppl_ClassEmpty();
00026 
00027   void InitProcess();
00028   void FinishProcess();
00029 
00030   void Pre_Run_Operation();
00031   void Post_Run_Operation();
00032 
00033   void UseHdtEvent();
00034 
00035   // --- added for current application
00036   // --- style and displaying
00037 
00038   // ---
00039 
00040   ClassDef(HdtAppl_ClassEmpty,1)
00041     };
00042 
00043 ClassImp(HdtAppl_ClassEmpty)
00044 
00045 //_______________________________
00046 HdtAppl_ClassEmpty::HdtAppl_ClassEmpty()
00047 {
00048  
00049   //  cout << "HdtAppl_ClassEmpty constructor called" << endl;
00050   
00051 }
00052 
00053 //_______________________________
00054 HdtAppl_ClassEmpty::~HdtAppl_ClassEmpty(){
00055   
00056   FinishRun();
00057 }
00058 
00059 //_______________________________
00060 void HdtAppl_ClassEmpty::InitProcess(){
00061 
00062   cout << "Initializing process" << endl;
00063   
00064 }
00065 
00066 //_______________________________
00067 void HdtAppl_ClassEmpty::FinishProcess(){
00068 
00069   cout << "Finishing process" << endl;
00070 
00071 }
00072 
00073 //_______________________________
00074 void HdtAppl_ClassEmpty::Pre_Run_Operation(){
00075 
00076   cout << "Performing pre-run operation for run " << fCurrentRun << endl;
00077 
00078 }
00079 
00080 //_______________________________
00081 void HdtAppl_ClassEmpty::Post_Run_Operation(){
00082 
00083   cout << "Performing post-run operation for run " << fCurrentRun << endl;
00084 
00085 }
00086 
00087 //_______________________________
00088 void HdtAppl_ClassEmpty::UseHdtEvent(){
00089   
00090   Int_t evnum = fCurHdtEv->GetEventNumber();
00091   cout << "...............Using Hdt-Event (" << evnum << ")" << endl;
00092   //  fCurHdtEv->PrintHits();
00093 }
00094 
00095 
00096 //_______________________________________________
00097 //_______________________________________________
00098 //_______________________________________________
00099 void HdtAppl_Empty(TString run_type="FINU",Int_t first_run = -1,Int_t last_run = -1,Int_t n_evs_run=-1,Int_t n_evs_tot=-1){
00100   // this is an application of the official method for reading HDT-files
00101   //  (see $FROOTSYS/mcr_included/AccessHDT_MultiRun.C
00102 
00103 
00104   HdtAppl_ClassEmpty *hdt_appl = new HdtAppl_ClassEmpty();
00105   Int_t debug_lev = 0;
00106   //
00107   hdt_appl->SetVerboseLevel(0);
00108   hdt_appl->SetUpdateEvGap(3000);
00109   //
00110   hdt_appl->Init("$MSQL_DB_HOST","$RDT",run_type,first_run,last_run,n_evs_run,n_evs_tot,debug_lev);
00111 
00112   hdt_appl->InitProcess();
00113 
00114   Int_t res_loop =  hdt_appl->RunLoop();
00115   cout << "Number of missing runs: " << res_loop << endl;
00116 
00117   // uncomment the following line if you want to
00118   // exclude processes in which at least one run is missing
00119   //  if( res_loop != 0 ) return;
00120 
00121   hdt_appl->FinishProcess();  
00122   // --- 
00123   delete hdt_appl; // need to keep histos
00124   
00125 }

Generated on Tue Oct 16 15:40:47 2007 by  doxygen 1.5.2