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 <PulseReco-TypeDef.hh> 00008 #include <Analysis-TypeDef.hh> 00009 #include <TString.h> 00010 int main(int argc, char** argv){ 00011 // Create ana_processor instance 00012 ana_processor my_proc; 00013 00014 my_proc.add_input_file(argv[1]); 00015 00016 my_proc.set_output_file("out.root"); 00017 00018 my_proc.set_io_mode(storage_manager::BOTH); 00019 00020 my_proc.set_ana_output_file("ana.root"); 00021 00022 pulse_reco* preco = new pulse_reco; 00023 00024 //preco->set_reco_algo(new algo_threshold); 00025 preco->add_reco_algo(new algo_fixed_window); 00026 00027 preco->set_ped_algo(preco->kHEAD); 00028 00029 preco->set_ped_nsample_cosmic(3); 00030 00031 my_proc.add_process(preco); 00032 00033 00034 // Let's run it. 00035 00036 my_proc.run(); 00037 00038 // done! 00039 }
1.4.7