29 int main(
int narg,
char *argv[])
44 app.monitor_heartbeat = 0;
49 if( app.GetExitCode() ) cerr <<
"Exit code: " << app.GetExitCode() << endl;
50 return app.GetExitCode();
61 for(
int i=1;i<narg;i++){
62 if(argv[i][0] !=
'-')
continue;
74 cerr<<
"\"-o\" requires a filename!"<<endl;
82 for(
int j=i; j<(narg-2); j++)argv[j] = argv[j+2];
100 gPARMS->SetDefaultParameter(
"OUTPUT_FILENAME",
OUTPUT_FILENAME,
"Output filename used by hd_root");
121 JApplication *app =
japp;
124 cout<<
"Usage:"<<endl;
125 cout<<
" hd_root [options] source1 source2 ..."<<endl;
127 cout<<
"Process events from a Hall-D data source (e.g. a file)"<<endl;
128 cout<<
"This will create a ROOT file that plugins or debug histos"<<endl;
129 cout<<
"can write into."<<endl;
131 cout<<
"Options:"<<endl;
135 cout<<
" -h Print this message"<<endl;
136 cout<<
" -Dname Activate factory for data of type \"name\" (can be used multiple times)"<<endl;
137 cout<<
" -A Activate factories (overrides and -DXXX options)"<<endl;
138 cout<<
" -o fname Set output filename (default is \"hd_root.root\")"<<endl;
bool filename_from_command_line
void DecideOutputFilename(void)
string COMMAND_LINE_OUTPUT_FILENAME
void ParseCommandLineArguments(int &narg, char *argv[])
void SetTFilePtrAddress_t(TFile **)
void Usage(JApplication &app)
int main(int argc, char *argv[])