#include <TSystem.h>#include <Analysis-TypeDef.hh>Go to the source code of this file.
Functions | |
| int | main () |
| int main | ( | ) |
Definition at line 9 of file Analysis/bin/simple_loop.cc.
References ana_processor::add_input_file(), ana_processor::add_process(), storage_manager::READ, ana_processor::run(), ana_processor::set_ana_output_file(), and ana_processor::set_io_mode().
00009 { 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(Form("%s/dat/sample.root",gSystem->Getenv("ANA_PROC_DIR"))); 00016 00017 // Specify IO mode 00018 my_proc.set_io_mode(storage_manager::READ); 00019 00020 // Set output root file: this is a separate root file in which your 00021 // analysis module can store anything such as histograms, your own TTree, etc. 00022 my_proc.set_ana_output_file("myout.root"); 00023 00024 // Create analysis class instance. For this example, ana_base. 00025 // To show how one can run multiple analysis modules at once, 00026 // we make multiple ana_base instance. 00027 00028 ana_base* my_ana_1=new ana_base(); 00029 ana_base* my_ana_2=new ana_base(); 00030 ana_base* my_ana_3=new ana_base(); 00031 00032 // Add analysis modules to the processor 00033 00034 my_proc.add_process(my_ana_1); 00035 my_proc.add_process(my_ana_2); 00036 my_proc.add_process(my_ana_3); 00037 00038 // Let's run it. 00039 00040 my_proc.run(); 00041 00042 // done! 00043 }
1.4.7