00001
00002
00003
00004
00005
00006 #include <TSystem.h>
00007 #include <Analysis-TypeDef.hh>
00008
00009 int main(int argc, char** argv){
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
00028 larlight::ana_processor my_proc;
00029
00030
00031 my_proc.add_input_file(argv[1]);
00032
00033
00034 my_proc.set_io_mode(larlight::storage_manager::READ);
00035
00036
00037 if(argc>2)
00038 my_proc.set_input_rootdir(argv[2]);
00039
00040
00041 my_proc.set_ana_output_file("from_test_ana_you_can_remove_me.root");
00042
00043
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
00052 my_proc.run();
00053
00054
00055 std::cout
00056 << std::endl
00057 << "Finished running ana_processor event loop!" << std::endl
00058 << std::endl;
00059 return 0;
00060 }