#include <TSystem.h>
#include <Analysis-TypeDef.hh>
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 9 of file test_simple_ana.cc.
References larlight::ana_processor::add_input_file(), larlight::ana_processor::add_process(), larlight::storage_manager::READ, larlight::ana_processor::run(), larlight::ana_processor::set_ana_output_file(), larlight::ana_processor::set_input_rootdir(), and larlight::ana_processor::set_io_mode().
00009 { 00010 00011 if(argc<2) { 00012 00013 std::cerr 00014 << std::endl 00015 << Form("Usage 1: %s $INPUT_ROOT_FILE",argv[0]) << std::endl 00016 << Form("Usage 2: %s $INPUT_ROOT_FILE $TDIRECTORY_NAME",argv[0]) << std::endl 00017 << std::endl; 00018 00019 return 1; 00020 } 00021 00022 std::cout 00023 << std::endl 00024 << "This is \"Analysis\" package simple test routine." << std::endl 00025 << std::endl; 00026 00027 // Create ana_processor instance 00028 larlight::ana_processor my_proc; 00029 00030 // Set input root file 00031 my_proc.add_input_file(argv[1]); 00032 00033 // Specify IO mode 00034 my_proc.set_io_mode(larlight::storage_manager::READ); 00035 00036 // Specify input TDirectory name if given 00037 if(argc>2) 00038 my_proc.set_input_rootdir(argv[2]); 00039 00040 // Specify output root file name 00041 my_proc.set_ana_output_file("from_test_ana_you_can_remove_me.root"); 00042 00043 // Attach a template process 00044 my_proc.add_process(new larlight::ana_base); 00045 00046 std::cout 00047 << std::endl 00048 << "Finished configuring ana_processor. Start event loop!"<< std::endl 00049 << std::endl; 00050 00051 // Let's run it. 00052 my_proc.run(); 00053 00054 // done! 00055 std::cout 00056 << std::endl 00057 << "Finished running ana_processor event loop!" << std::endl 00058 << std::endl; 00059 return 0; 00060 }