1 #ifndef MARLINSTEERCHECK_H
2 #define MARLINSTEERCHECK_H
4 #include "marlin/CCProcessor.h"
5 #include "marlin/CCCollection.h"
6 #include "marlin/CMProcessor.h"
7 #include "marlin/XMLParser.h"
15 #define clrscr() printf("\033[2J")
16 #define dblue() printf("\x1b[34m")
17 #define dred() printf("\x1b[31m")
18 #define dyellow() printf("\x1b[33m")
19 #define dgreen() printf("\x1b[32m")
20 #define dunderline() printf("\x1b[4m")
21 #define ditalic() printf("\x1b[3m")
22 #define ddunkel() printf("\x1b[2m")
23 #define dhell() printf("\x1b[1m")
24 #define dblink() printf("\x1b[5m")
25 #define endcolor() printf("\x1b[m")
50 typedef std::vector< CCProcessor* > ProcVec;
77 MarlinSteerCheck(
const char* steerFileName=NULL,
const CommandLineParametersMap * cmdlineparams=NULL );
95 int existsProcessor(
const std::string& type,
const std::string& name=
"" );
110 void dumpColErrors(
unsigned int i, std::ostream& stream,
bool separators=
false );
144 const std::string getXMLFileRelPath(){
return _XMLFileRelPath; }
147 const std::string getXMLFileAbsPath(){
return _XMLFileAbsPath; }
150 const std::string getXMLFileName(){
return _XMLFileName; }
153 const std::string getXMLFile(){
return _steeringFile; }
171 void repCondition(
const std::string& oldCond,
const std::string& newCond );
186 ColVec& getProcCols(
const ProcVec& v,
const std::string& iotype )
const;
189 ColVec& getAllCols()
const;
192 ProcVec& getAllProcs()
const;
195 bool parseXMLFile(
const std::string& file,
const CommandLineParametersMap * cmdlineparams=NULL );
201 ColVec& findMatchingCols( ColVec& v,
CCProcessor* srcProc,
202 const std::string& type,
const std::string& value=
"UNDEFINED",
const std::string& name=
"UNDEFINED" );
219 std::string _steeringFile;
220 std::string _XMLFileName;
221 std::string _XMLFileAbsPath;
222 std::string _XMLFileRelPath;
226 sColVecMap _lcioCols;
227 StringVec _lcioFiles;
void remProcessor(unsigned int index, bool status)
Remove processor with the given status at the given index.
Definition: MarlinSteerCheck.cc:342
This singleton class contains an instance of every available marlin processor type.
Definition: CMProcessor.h:21
void repCondition(const std::string &oldCond, const std::string &newCond)
Replace a Condition.
Definition: MarlinSteerCheck.cc:759
sSet & getPConditions()
Returns a set with all the processor's conditions.
Definition: MarlinSteerCheck.h:162
this class is a Marlin Steering File consistency check Tool.
Definition: MarlinSteerCheck.h:72
ColVec & getLCIOCols() const
Returns the collections read from LCIO files.
Definition: MarlinSteerCheck.cc:786
void remCondition(const std::string &condition)
Removes the given condition.
Definition: MarlinSteerCheck.cc:771
StringParameters * getGlobalParameters()
Returns the Global Parameters.
Definition: MarlinSteerCheck.h:107
Interface for a parser of a steering file to be used with marlin.
Definition: IParser.h:18
handles information about marlin processors and their collections needed by MarlinSteerCheck ...
Definition: CCProcessor.h:39
void dump_information()
Dumps all information read from the steering file to stdout.
Definition: MarlinSteerCheck.cc:1100
const std::string getCondition(unsigned int index)
Returns the condition for a given index.
Definition: MarlinSteerCheck.cc:746
void activateProcessor(unsigned int index)
Activate processor at the given index.
Definition: MarlinSteerCheck.cc:375
sSet & getColsSet(const std::string &type, const std::string &name, CCProcessor *proc)
Returns a list of all available Collections for a given type, name and processor (to use in a ComboBo...
Definition: MarlinSteerCheck.cc:126
bool saveAsDOTFile(const std::string &file)
Saves steering file in dot format.
Definition: MarlinSteerCheck.cc:1003
sSet & getErrors()
Returns a set with all the errors found after performing a consistency check.
Definition: MarlinSteerCheck.h:159
ProcVec & getIProcs()
Returns the Inactive Processors.
Definition: MarlinSteerCheck.h:89
bool saveAsXMLFile(const std::string &file)
Saves the data to an XML file with the given name Returns false if error occured. ...
Definition: MarlinSteerCheck.cc:824
void consistencyCheck()
Performs a check at all active processors to search for unavailable collections.
Definition: MarlinSteerCheck.cc:444
CMProcessor * getMProcs()
Returns the Marlin Processors.
Definition: MarlinSteerCheck.h:83
void changeProcessorPos(unsigned int pos, unsigned int newPos)
Change the active processor at the given index to the new given position.
Definition: MarlinSteerCheck.cc:416
void dumpColErrors(unsigned int i, std::ostream &stream, bool separators=false)
Writes the collection errors for the active processor with given index to the given stream...
Definition: MarlinSteerCheck.cc:1207
void deactivateProcessor(unsigned int index)
Deactivate processor at the given index.
Definition: MarlinSteerCheck.cc:393
void addProcessor(bool status, const std::string &name, const std::string &type, StringParameters *p=NULL)
Add a new processor.
Definition: MarlinSteerCheck.cc:328
ProcVec & getAProcs()
Returns the Active Processors.
Definition: MarlinSteerCheck.h:86
StringVec & getLCIOFiles()
Returns the names of the LCIO files found in the global section.
Definition: MarlinSteerCheck.h:101
void changeLCIOFilePos(unsigned int pos, unsigned int newPos)
Change the LCIO File at the given index to the new given position.
Definition: MarlinSteerCheck.cc:293
void addCondition(const std::string &condition)
Add a new Condition.
Definition: MarlinSteerCheck.cc:755
int addLCIOFile(const std::string &file)
Add LCIO file and read all collections inside it.
Definition: MarlinSteerCheck.cc:173
void remLCIOFile(const std::string &file)
Remove LCIO file and all collections associated to it.
Definition: MarlinSteerCheck.cc:270
Simple parameters class for Marlin.
Definition: StringParameters.h:34
int existsProcessor(const std::string &type, const std::string &name="")
Check if a processor of the given type with the given name already exists Returns 0 if the processor ...
Definition: MarlinSteerCheck.cc:360