13 if(MProcessOutput_Map->find(outputType) == MProcessOutput_Map->end())
15 cout << endl << endl <<
" >>> WARNING: Output type <" << outputType <<
"> NOT FOUND IN Output Map." << endl;
19 return (*MProcessOutput_Map)[outputType]();
25 int evio_buffer = 30000000;
28 string hd_msg = gemcOpt.
args[
"LOG_MSG"].args +
" Output File: >> ";
30 string optf = gemcOpt.args[
"OUTPUT"].args;
31 outType.assign(optf, 0, optf.find(
",")) ;
32 outFile.assign(optf, optf.find(
",") + 1, optf.size()) ;
34 if(outType !=
"no") cout << hd_msg <<
" Opening output file \"" <<
TrimSpaces(outFile) <<
"\"." << endl;
35 if(outType ==
"txt") txtoutput =
new ofstream(
TrimSpaces(outFile).c_str());
38 pchan =
new evioFileChannel(
TrimSpaces(outFile).c_str(),
"w", evio_buffer);
45 string hd_msg = gemcOpt.args[
"LOG_MSG"].args +
" Output File: >> ";
47 if(outType !=
"no") cout <<
" Closing " << outFile <<
"." << endl;
48 if(outType ==
"txt") txtoutput->close();
MOutputBaseClass * GetMOutputClass(map< string, MOutput_Factory > *MProcessOutput_Map, string outputType)
Instantiates MOutputBaseClass.
map< string, opts > args
Options map.
string TrimSpaces(string in)
Removes leading and trailing spaces.