simple_reco.cc

Go to the documentation of this file.
00001 //
00002 // Example C++ routine to run analysis module, ana_base.
00003 // The usage is same for inherited analysis class instance.
00004 //
00005 
00006 #include <TSystem.h>
00007 #include <Analysis-TypeDef.hh>
00008 #include <TString.h>
00009 int main(int argc, char** argv){
00010   // Create ana_processor instance
00011   ana_processor my_proc;
00012 
00013   // Set input root file: this is decoder output root file.
00014   // This time, we use a sample file prepared.
00015   my_proc.add_input_file(argv[1]);
00016 
00017   // Set output data root file
00018   my_proc.set_output_file("out.root");
00019 
00020   // Specify IO mode
00021   my_proc.set_io_mode(storage_manager::BOTH);
00022 
00023   // Set output root file: this is a separate root file in which your
00024   // analysis module can store anything such as histograms, your own TTree, etc.
00025   my_proc.set_ana_output_file("myout.root");
00026 
00027   // Create analysis class instance. For this example, ana_base.
00028   // To show how one can run multiple analysis modules at once,
00029   // we make multiple ana_base instance.
00030 
00031   //ana_base* my_ana_1=new ana_base();
00032   //ana_base* my_ana_2=new ana_base();
00033   //ana_base* my_ana_3=new ana_base();
00034 
00035   // Add analysis modules to the processor
00036 
00037   //my_proc.add_process(my_ana_1);
00038   //my_proc.add_process(my_ana_2);
00039   //my_proc.add_process(my_ana_3);
00040 
00041   my_proc.add_process(new pmtbaseline());
00042 
00043   // Let's run it.
00044 
00045   my_proc.run();
00046 
00047   // done!
00048 }

Generated on Mon Apr 7 15:35:12 2014 for MyProject by  doxygen 1.4.7