4 #include "marlin/Processor.h"
11 #define INACTIVE false
12 #define NO_PARAMETERS 0
13 #define NOT_INSTALLED 1
15 #define INPUT "lcioInType"
16 #define OUTPUT "lcioOutType"
17 #define UNAVAILABLE "lcioUnavailableType"
18 #define DUPLICATE "lcioDuplicate"
24 typedef std::set< std::string > sSet;
25 typedef std::vector< CCCollection* > ColVec;
26 typedef std::map< std::string, std::string > ssMap;
27 typedef std::map< std::string, ssMap > sssMap;
28 typedef std::map< std::string, ColVec > sColVecMap;
29 typedef std::map< std::string, sColVecMap > ssColVecMap;
71 const std::string&
getName(){
return _name; }
74 const std::string&
getType(){
return _type; }
81 "This processor is NOT installed in your Marlin binary: parameter descriptions and types lost!!");
88 const std::string
getError(){
return ( _errors.size() != 0 ? _errors[0] :
"" ); }
94 bool isErrorCol(
const std::string& type,
const std::string& value );
103 const ssMap&
getColHeaders(
const std::string& iotype ){
return _types[iotype]; }
108 ColVec&
getCols(
const std::string& iotype,
const std::string& type_name=
"ALL_COLLECTIONS" );
116 void addCol(
const std::string& iotype,
const std::string& name,
const std::string& type,
const std::string& value );
119 void remCol(
const std::string& iotype,
const std::string& name,
unsigned int index );
131 void setName(
const std::string& name ){ _name = name; };
154 void writeColsToParam();
155 void clearParameters();
156 void setMarlinProc();
163 bool _error[MAX_ERRORS];
169 StringVec _error_desc;
void addDCol(CCCollection *c)
Adds a duplicate collection to this processor.
Definition: CCProcessor.cc:318
const std::string getError()
Returns a string with the error of the processor.
Definition: CCProcessor.h:88
sSet & getConditions()
Returns the Conditions of the processor.
Definition: CCProcessor.h:77
bool isErrorCol(const std::string &type, const std::string &value)
Returns true if the given collection is in the unavailable or duplicate list of this processor...
Definition: CCProcessor.cc:380
handles information about LCIO collections needed by MarlinSteerCheck
Definition: CCCollection.h:17
void remCol(const std::string &iotype, const std::string &name, unsigned int index)
Removes collection of the given iotype ( INPUT / OUTPUT ) with the given name at the given index...
Definition: CCProcessor.cc:326
void setError(int error)
Activates an error flag in this processor ( NO_PARAMETERS=0, NOT_INSTALLED=1, COL_ERRORS=2 ) ...
Definition: CCProcessor.cc:398
handles information about marlin processors and their collections needed by MarlinSteerCheck ...
Definition: CCProcessor.h:39
sSet & getColTypeNames(const std::string &iotype)
Returns collection's types/names of a given iotype found in the processor If iotype == INPUT/OUTPUT t...
Definition: CCProcessor.cc:369
void clearError(int error)
Clears an error flag in this processor ( NO_PARAMETERS=0, NOT_INSTALLED=1, COL_ERRORS=2 ) ...
Definition: CCProcessor.cc:405
void setConditions(const std::string &conditions)
Sets the processor's conditions.
Definition: CCProcessor.cc:152
bool isParamOptional(const std::string &key)
Returns true if a parameter is optional (optional means the parameter will be written out as a commen...
Definition: CCProcessor.cc:436
bool isInstalled()
Returns true if the processor is installed.
Definition: CCProcessor.h:62
void setOptionalParam(const std::string &key, bool optional=true)
Sets a parameter as optional (if optional=true parameter is written out as a comment) ...
Definition: CCProcessor.cc:445
StringParameters * getParameters()
Returns the string parameters for this processor.
Definition: CCProcessor.h:100
void writeToXML(std::ofstream &stream)
Writes this processor to a stream using the XML format.
Definition: CCProcessor.cc:454
bool hasErrors()
Returns true if the processor has errors.
Definition: CCProcessor.cc:427
const std::string & description()
Description of processor.
Definition: Processor.h:192
const std::string & getType()
Returns the Type of the processor.
Definition: CCProcessor.h:74
bool hasCondition(const std::string &condition)
Returns true if the processor is constrained by the given condition.
Definition: CCProcessor.cc:200
void changeStatus()
Changes the processor status ( ACTIVE->INACTIVE or INACTIVE->ACTIVE )
Definition: CCProcessor.cc:280
const std::string & getName()
Returns the Name of the processor.
Definition: CCProcessor.h:71
ColVec & getCols(const std::string &iotype, const std::string &type_name="ALL_COLLECTIONS")
Returns collections of a given iotype ( INPUT, OUTPUT, UNAVAILABLE, DUPLICATE ) for a given name or t...
Definition: CCProcessor.cc:351
void addCol(const std::string &iotype, const std::string &name, const std::string &type, const std::string &value)
Adds a collection of the given iotype ( INPUT / OUTPUT ) with the given name, type and value...
Definition: CCProcessor.cc:289
const ssMap & getColHeaders(const std::string &iotype)
Returns a map with collection names and their respective types for INPUT/OUTPUT collections of this p...
Definition: CCProcessor.h:103
bool hasParameters()
Returns true if the processor has parameters.
Definition: CCProcessor.h:56
Base class for Marlin processors.
Definition: Processor.h:63
void setName(const std::string &name)
Sets the processor's name.
Definition: CCProcessor.h:131
const std::string getStatusDesc()
Returns a string with the processor status ( "Active", "Inactive" )
Definition: CCProcessor.h:91
bool isActive()
Returns true if the processor is active.
Definition: CCProcessor.h:65
Simple parameters class for Marlin.
Definition: StringParameters.h:34
const std::string getDescription()
Returns the Description of the processor.
Definition: CCProcessor.h:80
bool hasErrorCols()
Returns true if the processor has collection errors.
Definition: CCProcessor.h:59
void addUCol(CCCollection *c)
Adds an unavailable collection to this processor.
Definition: CCProcessor.cc:310