Marlin  01.17.01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Marlin.cc
Go to the documentation of this file.
1 #include "lcio.h"
2 
3 
4 
5 #ifdef LCIO_MAJOR_VERSION
6 #if LCIO_VERSION_GE( 1,2)
7 #include "LCIOSTLTypes.h"
8 #endif
9 #else
10 #include "MarlinLCIOSTLTypes.h"
11 #endif
12 
13 #include "marlin/ProcessorMgr.h"
14 #include "marlin/Processor.h"
16 #include "marlin/Exceptions.h"
17 #include "IO/LCReader.h"
18 
19 #include "marlin/Parser.h"
20 #include "marlin/XMLParser.h"
21 
22 #include "marlin/Global.h"
23 
25 #include "marlin/XMLFixCollTypes.h"
26 
27 #include <sstream>
28 #include <fstream>
29 #include <string>
30 #include <assert.h>
31 #include <signal.h>
32 
33 #include <cstring>
34 #include <algorithm>
35 #include <memory>
36 
37 #include "gearimpl/Util.h"
38 #include "gearxml/GearXML.h"
39 #include "gearimpl/GearMgrImpl.h"
40 
41 #include "marlin/ProcessorLoader.h"
42 
43 #include "marlin/VerbosityLevels.h"
44 #include "streamlog/streamlog.h"
45 
46 using namespace lcio ;
47 using namespace marlin ;
48 using namespace std ;
49 
50 
51 void createProcessors( Parser& parser ) ;
52 // void createProcessors( XMLParser& parser ) ;
53 void createProcessors( const IParser& parser) ;
54 
57 int printUsage() ;
58 
59 
60 // Handle user interruption
61 // This allows you to ^\ at any point to exit in a controlled way
62 void userException(int sig){
63  std::cout<<std::endl<<"User interrupted with sig="<< sig <<std::endl;
64  ProcessorMgr::instance()->end() ;
65  exit(1);
66 }
67 
73 int main(int argc, char** argv ){
74 
75  // Register escape behaviour
76  signal(SIGQUIT, userException);
77 
78  // ---- catch all uncaught exceptions in the end ...
79  try{
80 
81 
82  if( argc > 1 ){
83  if( std::string(argv[1]) == "-x" ){
84  std::cout << "<?xml version=\"1.0\" encoding=\"us-ascii\"?>" << std::endl
85  << "<!-- ?xml-stylesheet type=\"text/xsl\" href=\"http://ilcsoft.desy.de/marlin/marlin.xsl\"? -->" << std::endl
86  << "<!-- ?xml-stylesheet type=\"text/xsl\" href=\"marlin.xsl\"? -->" << std::endl << std::endl;
87  }
88  }
89 
90  //#ifndef MARLIN_NO_DLL
91 
92  //------ load shared libraries with processors ------
93 
94  StringVec libs ;
95  LCTokenizer tk1( libs, ':' ) ;
96 
97  std::string marlinProcs("") ;
98 
99  char * var = getenv("MARLIN_DLL" ) ;
100 
101  if( var != 0 ) {
102  marlinProcs = var ;
103  } else {
104  std::cout << std::endl << "<!-- You have no MARLIN_DLL variable in your environment "
105  " - so no processors will be loaded. ! --> " << std::endl << std::endl ;
106  }
107 
108  std::for_each( marlinProcs.begin(), marlinProcs.end(), tk1 ) ;
109 
110  ProcessorLoader loader( libs.begin() , libs.end() ) ;
111  if( loader.failedLoading() ){
112  return(1);
113  }
114 
115  //------- end processor libs -------------------------
116 
117  //#endif
118 
119 
120  const char* steeringFileName = "none" ;
121 
122  //map<string, map<string,string> > cmdlineparams;
123  CommandLineParametersMap cmdlineparams;
124 
125  // check for dynamic command line arguments
126  for( int i = 1 ; i < argc ; i++ ) {
127  // cout << "argv[" << i << "]:\t" << argv[i] << endl ;
128 
129  if( string( argv[i] ).substr( 0, 2 ) == "--" ){
130  // cout << "dynamic opt:\t" << string( argv[i] ).substr( 2 ) << endl ;
131 
132  // split dynamic argument by '=', i.e.
133  // --global.LCIOInputFiles="1.slcio 2.slcio 3.slcio" --> global.LCIOInputFiles , "1.slcio 2.slcio 3.slcio"
134  StringVec cmdlinearg, cmdlinekey ;
135  LCTokenizer t( cmdlinearg, '=' ) ;
136 
137  string param( argv[i] ) ;
138 
139  string s( param.substr( 2 ) ) ;
140  for_each( s.begin(), s.end(), t ) ;
141 
142  // cout << "split opt:\tkey: " << cmdlinearg[0] << ", value: " << cmdlinearg[1] << endl ;
143 
144  if( cmdlinearg.size() != 2 ){
145  cerr << endl << "*** invalid command line option: " << argv[i] << endl << endl;
146  return printUsage();
147  }
148 
149  // split first arg by '.'
150  // --global.LCIOInputFiles --> global , LCIOInputFiles
151  s = cmdlinearg[0] ;
152  LCTokenizer t2( cmdlinekey, '.', 2 ) ;
153 
154  for_each( s.begin(), s.end(), t2 ) ;
155 
156  if( cmdlinekey.size() != 2 ){
157  cerr << endl << "*** invalid command line option: " << argv[i] << endl << endl;
158  return printUsage();
159  }
160 
161  // // case insensitive command line options
162  // std::transform(cmdlinekey[0].begin(), cmdlinekey[0].end(), cmdlinekey[0].begin(), ::toupper);
163  // std::transform(cmdlinekey[1].begin(), cmdlinekey[1].end(), cmdlinekey[1].begin(), ::toupper);
164 
165  // cout << "split key:\tindex1: " << cmdlinekey[0] << ", index2: " << cmdlinekey[1] << endl ;
166 
167  // save dynamic options into map
168  cmdlineparams[ cmdlinekey[0] ][ cmdlinekey[1] ] = cmdlinearg[1] ;
169 
170  std::string type = cmdlinekey[0] == "constant" ? "constant" : "parameter" ;
171  cout << "<!-- steering file " << type << ": [ " << cmdlinekey[0] << "." << cmdlinekey[1] << " ] will be OVERWRITTEN with value: [\"" << cmdlinearg[1] << "\"] -->" << endl;
172 
173  // erase dynamic options from **argv
174  for( int j = i ; j < argc-1 ; j++ ){
175  argv[j] = argv[j+1];
176  }
177  argc--;
178  i--;
179  }
180  }
181 
182  cout << endl ;
183 
184  bool dryRun(false);
185 
186  // read file name from command line
187  if( argc > 1 ){
188 
189  if( std::string(argv[1]) == "-x" ){
191  return(0) ;
192  }
193  else if( std::string(argv[1]) == "-c" ){
194  if( argc == 3 ){
195  MarlinSteerCheck msc(argv[2], &cmdlineparams );
196  msc.dump_information();
197  return(0) ;
198  }
199  else{
200  std::cout << " usage: Marlin -c steeringFile.xml" << std::endl << std::endl;
201  return(1);
202  }
203  }
204  else if( std::string(argv[1]) == "-u" ){
205  if( argc == 4 ){
206  MarlinSteerCheck msc(argv[2], &cmdlineparams );
207  msc.dump_information();
208  return(msc.saveAsXMLFile(argv[3] )) ;
209  }
210  else{
211  std::cout << " usage: Marlin -u oldsteering.xml newsteering.xml" << std::endl << std::endl;
212  return(1);
213  }
214  }
215  else if( std::string(argv[1]) == "-d" ){
216  if( argc == 4 ){
217  MarlinSteerCheck msc(argv[2], &cmdlineparams );
218  msc.saveAsDOTFile(argv[3]);
219  return(0) ;
220  }
221  else{
222  std::cout << " usage: Marlin -d steer.xml diagram.dot" << std::endl << std::endl;
223  return(1);
224  }
225  }
226  else if( std::string(argv[1]) == "-n" ){
227  if( argc == 3 ){
228  dryRun = true ;
229  steeringFileName = argv[2] ;
230  }
231  else{
232  std::cout << " usage: Marlin " << argv[1] << " steering.xml" << std::endl << std::endl ;
233  return(1) ;
234  }
235  }
236  else if( std::string(argv[1]) == "-h" || std::string(argv[1]) == "-?" ){
237 
238  return printUsage() ;
239  }
240  else{
241  // one argument given: the steering file for normal running :
242  steeringFileName = argv[1] ;
243  }
244 
245  } else {
246 
247  return printUsage() ;
248  }
249 
250 
251  //###### init streamlog ######
252  std::string binname = argv[0] ;
253  binname = binname.substr( binname.find_last_of("/") + 1 , binname.size() ) ;
254  streamlog::out.init( std::cout , binname ) ;
255 
256 
257 
259 
260  // for now allow xml and old steering
261  std::string filen( steeringFileName ) ;
262 
263  if( filen.rfind(".xml") == std::string::npos || // .xml not found at all
264  !( filen.rfind(".xml")
265  + strlen(".xml") == filen.length() ) ) {
266  parser = std::unique_ptr<IParser> ( new Parser( steeringFileName ) );
267 
268  } else {
269 
270  parser = std::unique_ptr<IParser>( new XMLParser(steeringFileName) ) ;
271 
272  // tell parser to take into account any options defined on the command line
273  parser->setCmdLineParameters( cmdlineparams ) ;
274 
275  }
276 
277  parser->parse() ;
278 
279  Global::parameters = parser->getParameters("Global").get();
280 
281  //fg: can't use assert, as this generates no code when compiled with NDEBUG
282  if( Global::parameters == 0 ) {
283  std::cout << " Could not get global parameters from steering file ! " << std::endl
284  << " The program has to exit - sorry ! "
285  << std::endl ;
286  return(1) ;
287  }
288 
289  std::string outputSteeringFile = Global::parameters->getStringVal( "OutputSteeringFile" ) ;
290 
291  if( outputSteeringFile.size() > 0 ){
292  parser->write( outputSteeringFile ) ;
293  }
294 
295  if( dryRun ){
296  std::cout << "Marlin running in dry-run mode (-n option). Exiting ..." << std::endl ;
297  return(0) ;
298  }
299 
300  // //----- register log level names with the logstream ---------
301  streamlog::out.addLevelName<DEBUG>() ;
302  streamlog::out.addLevelName<DEBUG0>() ;
303  streamlog::out.addLevelName<DEBUG1>() ;
304  streamlog::out.addLevelName<DEBUG2>() ;
305  streamlog::out.addLevelName<DEBUG3>() ;
306  streamlog::out.addLevelName<DEBUG4>() ;
307  streamlog::out.addLevelName<DEBUG5>() ;
308  streamlog::out.addLevelName<DEBUG6>() ;
309  streamlog::out.addLevelName<DEBUG7>() ;
310  streamlog::out.addLevelName<DEBUG8>() ;
311  streamlog::out.addLevelName<DEBUG9>() ;
312  streamlog::out.addLevelName<MESSAGE>() ;
313  streamlog::out.addLevelName<MESSAGE0>() ;
314  streamlog::out.addLevelName<MESSAGE1>() ;
315  streamlog::out.addLevelName<MESSAGE2>() ;
316  streamlog::out.addLevelName<MESSAGE3>() ;
317  streamlog::out.addLevelName<MESSAGE4>() ;
318  streamlog::out.addLevelName<MESSAGE5>() ;
319  streamlog::out.addLevelName<MESSAGE6>() ;
320  streamlog::out.addLevelName<MESSAGE7>() ;
321  streamlog::out.addLevelName<MESSAGE8>() ;
322  streamlog::out.addLevelName<MESSAGE9>() ;
323  streamlog::out.addLevelName<WARNING>() ;
324  streamlog::out.addLevelName<WARNING0>() ;
325  streamlog::out.addLevelName<WARNING1>() ;
326  streamlog::out.addLevelName<WARNING2>() ;
327  streamlog::out.addLevelName<WARNING3>() ;
328  streamlog::out.addLevelName<WARNING4>() ;
329  streamlog::out.addLevelName<WARNING5>() ;
330  streamlog::out.addLevelName<WARNING6>() ;
331  streamlog::out.addLevelName<WARNING7>() ;
332  streamlog::out.addLevelName<WARNING8>() ;
333  streamlog::out.addLevelName<WARNING9>() ;
334  streamlog::out.addLevelName<ERROR>() ;
335  streamlog::out.addLevelName<ERROR0>() ;
336  streamlog::out.addLevelName<ERROR1>() ;
337  streamlog::out.addLevelName<ERROR2>() ;
338  streamlog::out.addLevelName<ERROR3>() ;
339  streamlog::out.addLevelName<ERROR4>() ;
340  streamlog::out.addLevelName<ERROR5>() ;
341  streamlog::out.addLevelName<ERROR6>() ;
342  streamlog::out.addLevelName<ERROR7>() ;
343  streamlog::out.addLevelName<ERROR8>() ;
344  streamlog::out.addLevelName<ERROR9>() ;
345  streamlog::out.addLevelName<SILENT>() ;
346 
347 
348  //-------- init logging level ------------
349  std::string verbosity = Global::parameters->getStringVal("Verbosity" ) ;
350  streamlog::logscope scope( streamlog::out ) ;
351 
352  scope.setLevel( verbosity ) ;
353 
354  createProcessors( *parser ) ;
355 
356 
357  //#ifdef USE_GEAR
358 
359  std::string gearFile = Global::parameters->getStringVal("GearXMLFile" ) ;
360 
361  if( gearFile.size() > 0 ) {
362 
363  gear::GearXML gearXML( gearFile ) ;
364 
365  Global::GEAR = gearXML.createGearMgr() ;
366 
367  streamlog_out( MESSAGE ) << " ---- instantiated GEAR from file " << gearFile << std::endl
368  << *Global::GEAR << std::endl ;
369 
370  } else {
371 
372  streamlog_out( MESSAGE ) << " ---- no GEAR XML file given --------- " << std::endl ;
373  Global::GEAR = new gear::GearMgrImpl ;
374  }
375 
376  //#endif
377 
378  StringVec lcioInputFiles ;
379 
380  if ( (Global::parameters->getStringVals("LCIOInputFiles" , lcioInputFiles ) ).size() == 0 ){
381 
382  int maxRecord = Global::parameters->getIntVal("MaxRecordNumber");
383  ProcessorMgr::instance()->init() ;
384  // fixme: pass maxRecord-1 (because of the runheader, which is generated)?
385  ProcessorMgr::instance()->readDataSource(maxRecord) ;
386  ProcessorMgr::instance()->end() ;
387 
388  } else {
389 
390 
391 
392  int maxRecord = Global::parameters->getIntVal("MaxRecordNumber") ;
393  int skipNEvents = Global::parameters->getIntVal("SkipNEvents");
394 
395  bool modify = ( Global::parameters->getStringVal("AllowToModifyEvent") == "true" ) ;
396 
397  if( modify ) {
398 
399  streamlog_out( WARNING ) << " ******************************************************************************* \n"
400  << " * AllowToModifyEvent is set to 'true' * \n"
401  << " * => all processors can modify the input event in processEvent() !! * \n"
402  << " * consider setting this flag to 'false' * \n"
403  << " * unless you really need it... * \n"
404  << " * - if you need a processor that modifies the input event * \n"
405  << " * please implement the EventModifier interface and use the modifyEvent() * \n"
406  << " * method for this * \n"
407  << " ******************************************************************************* \n"
408  << std::endl ;
409  }
410 
411  // create lcio reader
412  LCReader* lcReader = LCFactory::getInstance()->createLCReader() ;
413 
414  StringVec readColNames ;
415  if( (Global::parameters->getStringVals("LCIOReadCollectionNames" , readColNames ) ).size() != 0 ){
416 
417  streamlog_out( WARNING ) << " *********** Parameter LCIOReadCollectionNames given - will only read the following collections: **** "
418  << std::endl ;
419 
420  for( unsigned i=0,N=readColNames.size() ; i<N ; ++i ) {
421  streamlog_out( WARNING ) << " " << readColNames[i] << std::endl ;
422  }
423  streamlog_out( WARNING ) << " *************************************************************************************************** " << std::endl ;
424 
425 #if LCIO_PATCHVERSION_GE( 2,4,0 )
426 
427  lcReader->setReadCollectionNames( readColNames ) ;
428 #endif
429  }
430 
431  lcReader->registerLCRunListener( ProcessorMgr::instance() ) ;
432  lcReader->registerLCEventListener( ProcessorMgr::instance() ) ;
433 
434  ProcessorMgr::instance()->init() ;
435 
436  bool rewind = true ;
437 
438  while( rewind ) {
439 
440  rewind = false ;
441 
442  // process the data
443  lcReader->open( lcioInputFiles ) ;
444 
445 
446  if( skipNEvents > 0 ){
447 
448  streamlog_out( WARNING ) << " --- Marlin.cc - will skip first " << skipNEvents << " event(s)"
449  << std::endl << std::endl ;
450 
451  lcReader->skipNEvents( skipNEvents ) ;
452  }
453 
454  try{
455  if( maxRecord > 0 ){
456 
457  try{
458  lcReader->readStream( maxRecord ) ;
459  }
460  catch( lcio::EndOfDataException& e){
461 
462  streamlog_out( WARNING ) << e.what() << std::endl ;
463  }
464 
465  } else {
466 
467  lcReader->readStream() ;
468  }
469 
470 
471  } catch( StopProcessingException &e) {
472 
473  streamlog_out( ERROR ) << std::endl
474  << " **********************************************************" << std::endl
475  << " * *" << std::endl
476  << " * Stop of EventProcessiong requested by processor : *" << std::endl
477  << " * " << e.what() << std::endl
478  << " * will call end() method of all processors ! *" << std::endl
479  << " * *" << std::endl
480  << " **********************************************************" << std::endl
481  << std::endl ;
482 
483  } catch( RewindDataFilesException &e) {
484 
485  rewind = true ;
486 
487  streamlog_out( ERROR ) << std::endl
488  << " **********************************************************" << std::endl
489  << " * *" << std::endl
490  << " * Rewind data files requested by processor : *" << std::endl
491  << " * " << e.what() << std::endl
492  << " * will rewind to beginning ! *" << std::endl
493  << " * *" << std::endl
494  << " **********************************************************" << std::endl
495  << std::endl ;
496  }
497 
498 
499  lcReader->close() ;
500 
501  if( !rewind ) {
502 
503  ProcessorMgr::instance()->end() ;
504 
505  delete lcReader ;
506  }
507 
508  } // end rewind
509 
510  }
511 
512  //#ifdef USE_GEAR
513 
514  if( Global::GEAR != 0 )
515  delete Global::GEAR ;
516 
517  //#endif
518 
519  return 0 ;
520 
521  } catch( std::exception& e) {
522 
523  std::cerr << " ***********************************************\n"
524  << " A runtime error occured - (uncaught exception):\n"
525  << " " << e.what() << "\n"
526  << " Marlin will have to be terminated, sorry.\n"
527  << " ***********************************************\n"
528  << std:: endl ;
529 
530  return 1 ;
531 
532  }
533 
534 }
535 
536 // void createProcessors(XMLParser& parser) {
537 void createProcessors( const IParser& parser) {
538 
539  StringVec activeProcessors ;
540  Global::parameters->getStringVals("ActiveProcessors" , activeProcessors ) ;
541 
542  StringVec procConds ;
543  Global::parameters->getStringVals("ProcessorConditions" , procConds ) ;
544 
545  bool useConditions = ( activeProcessors.size() == procConds.size() ) ;
546 
547  // for( StringVec::iterator m = activeProcessors.begin() ; m != activeProcessors.end() ; m++){
548  for(unsigned int i=0 ; i< activeProcessors.size() ; i++ ) {
549 
550  std::shared_ptr<StringParameters> p = parser.getParameters( activeProcessors[i] );
551 
552  if( p!=0 ){
553  std::string type = p->getStringVal("ProcessorType") ;
554 
555  if( useConditions )
556  ProcessorMgr::instance()->addActiveProcessor( type , activeProcessors[i] , p , procConds[i] ) ;
557  else
558  ProcessorMgr::instance()->addActiveProcessor( type , activeProcessors[i] , p ) ;
559 
560  } else{
561  std::stringstream sstr ;
562  sstr << "Undefined processor : " << activeProcessors[i] << std::endl ;
563  streamlog_out( ERROR ) << sstr.str() ;
564  throw Exception( sstr.str() );
565  }
566  }
567 }
568 
569 void createProcessors(Parser& parser) {
570 
571  StringVec activeProcessors ;
572  Global::parameters->getStringVals("ActiveProcessors" , activeProcessors ) ;
573 
574  //for( StringVec::iterator m = activeProcessors.begin() ; m != activeProcessors.end() ; m++){
575  for(unsigned int i=0 ; i< activeProcessors.size() ; i++ ) {
576 
577  //std::shared_ptr<StringParameters> p = parser.getParameters( *m ) ;
578  std::shared_ptr<StringParameters> p = parser.getParameters( activeProcessors[i] );
579 
580 
581  streamlog_out( MESSAGE ) << " Parameters for processor " << activeProcessors[i]
582  << std::endl
583  << *p ;
584 
585  if( p!=0 ){
586  std::string type = p->getStringVal("ProcessorType") ;
587 
588  //if( ProcessorMgr::instance()->addActiveProcessor( type , *m , p ) ){
589  if( ProcessorMgr::instance()->addActiveProcessor( type , activeProcessors[i] , p ) ){
590 
591  // Processor* processor = ProcessorMgr::instance()->getActiveProcessor( *m ) ;
592  // processor->setParameters( p ) ;
593  }
594  } else{
595  std::stringstream sstr ;
596  sstr << "Undefined processor : " << activeProcessors[i] << std::endl ;
597  streamlog_out( ERROR ) << sstr.str() ;
598  throw Exception( sstr.str() );
599 
600  }
601 
602  }
603 }
604 
606 
607  ProcessorMgr::instance()->dumpRegisteredProcessors() ;
608 }
609 
611 
612  ProcessorMgr::instance()->dumpRegisteredProcessorsXML() ;
613 }
614 
615 
616 int printUsage() {
617 
618  std::cout << " Usage: Marlin [OPTION] [FILE]..." << std::endl
619  << " runs a Marlin application " << std::endl
620  << std::endl
621  << " Running the application with a given steering file:" << std::endl
622  << " Marlin steer.xml " << std::endl
623  << std::endl
624  << " Marlin [-h/-?] \t print this help information" << std::endl
625  << " Marlin -x \t print an example steering file to stdout" << std::endl
626  << " Marlin -c steer.xml \t check the given steering file for consistency" << std::endl
627  << " Marlin -u old.xml new.xml \t consistency check with update of xml file" << std::endl
628  << " Marlin -d steer.xml flow.dot\t create a program flow diagram (see: http://www.graphviz.org)" << std::endl
629  << std::endl
630  << " Example: " << std::endl
631  << " To create a new default steering file from any Marlin application, run" << std::endl
632  << " Marlin -x > mysteer.xml" << std::endl
633  << " and then use either an editor or the MarlinGUI to modify the created steering file " << std::endl
634  << " to configure your application and then run it. e.g. : " << std::endl
635  << " Marlin mysteer.xml > marlin.out 2>&1 &" << std::endl << std::endl
636  << " Dynamic command line options may be specified in order to overwrite individual steering file parameters, e.g.:" << std::endl
637  << " Marlin --global.LCIOInputFiles=\"input1.slcio input2.slcio\" --global.GearXMLFile=mydetector.xml" << std::endl
638  << " --MyLCIOOutputProcessor.LCIOWriteMode=WRITE_APPEND --MyLCIOOutputProcessor.LCIOOutputFile=out.slcio steer.xml" << std::endl << std::endl
639  << " NOTE: Dynamic options do NOT work together with Marlin options (-x, -f) nor with the MarlinGUI" << std::endl
640  << std::endl ;
641 
642  return(0) ;
643 
644 }
645 
XML parser for Marlin steering files.
Definition: XMLParser.h:106
std::shared_ptr< StringParameters > getParameters(const std::string &sectionName) const
Return the StringParameters defined for this section of the steering file.
Definition: Parser.cc:113
RewindDataFilesException used to stop the current proccessing of events, rewind to the first event an...
Definition: Exceptions.h:70
virtual void setCmdLineParameters(const CommandLineParametersMap &cmdlineparams)=0
set command line parameters
this class is a Marlin Steering File consistency check Tool.
T rfind(T...args)
T endl(T...args)
Processor loader - loads shared libraries with marlin processors.
T end(T...args)
void userException(int sig)
Definition: Marlin.cc:62
Interface for a parser of a steering file to be used with marlin.
Definition: IParser.h:19
virtual void parse()=0
Parse the input file.
StopProcessingException used to stop the current proccessing of events and call Processor::end().
Definition: Exceptions.h:52
void dump_information()
Dumps all information read from the steering file to stdout.
Simple parser class for Marlin.
Definition: Parser.h:36
STL class.
T getenv(T...args)
T find_last_of(T...args)
Helper class for Parser.
Definition: Parser.h:90
T rewind(T...args)
T exit(T...args)
T what(T...args)
T strlen(T...args)
bool saveAsDOTFile(const std::string &file)
Saves steering file in dot format.
T str(T...args)
void createProcessors(Parser &parser)
Definition: Marlin.cc:569
virtual void write(const std::string &fname) const =0
Write down the parsed file in a new file.
T signal(T...args)
STL class.
bool saveAsXMLFile(const std::string &file)
Saves the data to an XML file with the given name Returns false if error occured. ...
T get(T...args)
void listAvailableProcessors()
Definition: Marlin.cc:605
T size(T...args)
STL class.
T begin(T...args)
LCReader * lcReader
T substr(T...args)
int printUsage()
Definition: Marlin.cc:616
virtual std::shared_ptr< StringParameters > getParameters(const std::string &sectionName) const =0
Return the StringParameters defined for this section of the steering file.
T for_each(T...args)
int main(int argc, char *argv[])
Definition: main.cpp:9
void listAvailableProcessorsXML()
Definition: Marlin.cc:610