23 #define ansi_escape ((char)0x1b)
24 #define ansi_bold ansi_escape<<"[1m"
25 #define ansi_black ansi_escape<<"[30m"
26 #define ansi_red ansi_escape<<"[31m"
27 #define ansi_green ansi_escape<<"[32m"
28 #define ansi_blue ansi_escape<<"[34m"
29 #define ansi_normal ansi_escape<<"[0m"
30 #define ansi_up(A) ansi_escape<<"["<<(A)<<"A"
31 #define ansi_down(A) ansi_escape<<"["<<(A)<<"B"
32 #define ansi_forward(A) ansi_escape<<"["<<(A)<<"C"
33 #define ansi_back(A) ansi_escape<<"["<<(A)<<"D"
55 cout<<endl<<
"Closed ROOT file"<<endl;
67 cout <<
"Cannot open ROOT file. Quitting now." << endl;
81 vector<string> factory_names;
82 eventLoop->GetFactoryNames(factory_names);
94 vector<string> really_toprint;
95 for(
unsigned int i=0; i<
toprint.size();i++){
98 for(
unsigned int j=0;j<factory_names.size();j++){
99 if(factory_names[j] ==
toprint[i])found = 1;
100 if(factory_names[j] ==
"D" +
toprint[i])dfound = 1;
103 really_toprint.push_back(
toprint[i]);
105 really_toprint.push_back(
"D" +
toprint[i]);
108 <<
" Couldn't find factory for \""
120 for(
unsigned int i=0;i<
toprint.size();i++){
123 unsigned int pos = name.rfind(
":",name.size()-1);
124 if(pos != (
unsigned int)string::npos){
125 tag = name.substr(pos+1,name.size());
129 f.dataClassName = name;
131 fac_info.push_back(f);
145 for(
unsigned int i=0;i<
toprint.size();i++){
146 string name =fac_info[i].dataClassName;
147 string tag = fac_info[i].tag;
148 JFactory_base *factory = eventLoop->GetFactory(name,tag.c_str());
149 if(!factory)factory = eventLoop->GetFactory(
"D" + name,tag.c_str());
jerror_t brun(JEventLoop *eventLoop, int32_t runnumber)
Called once at program start.
jerror_t fini(void)
Called everytime run number changes, provided brun has been called.
jerror_t evnt(JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.