Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

marlin::CCProcessor Class Reference

#include <CCProcessor.h>

List of all members.

Public Member Functions

 CCProcessor (bool status, const std::string &name, const std::string &type, StringParameters *p=NULL)
 CCProcessor (CCProcessor &p)
 ~CCProcessor ()
bool hasErrors ()
bool hasParameters ()
bool hasErrorCols ()
bool isInstalled ()
bool isActive ()
bool hasCondition (const std::string &condition)
const std::string & getName ()
const std::string & getType ()
sSetgetConditions ()
const std::string getDescription ()
const std::string getError ()
const std::string getStatusDesc ()
bool isErrorCol (const std::string &type, const std::string &value)
bool isParamOptional (const std::string &key)
StringParametersgetParameters ()
const ssMapgetColHeaders (const std::string &iotype)
ColVecgetCols (const std::string &iotype, const std::string &type_name="ALL_COLLECTIONS")
sSetgetColTypeNames (const std::string &iotype)
void addCol (const std::string &iotype, const std::string &name, const std::string &type, const std::string &value)
void remCol (const std::string &iotype, const std::string &name, unsigned int index)
void addUCol (CCCollection *c)
void addDCol (CCCollection *c)
void changeStatus ()
void setName (const std::string &name)
void setConditions (const std::string &conditions)
void setError (int error)
void clearError (int error)
void setOptionalParam (const std::string &key, bool optional=true)
void writeToXML (std::ofstream &stream)

Private Member Functions

void addColsFromParam (StringParameters *p)
void writeColsToParam ()
void clearParameters ()
void setMarlinProc ()
CCCollectionpopCol (ColVec &v, CCCollection *c)

Private Attributes

bool _status
bool _error [MAX_ERRORS]
std::string _name
std::string _type
StringParameters_param
Processor_proc
StringVec _error_desc
StringVec _errors
sSet _conditions
ssColVecMap _cols
sssMap _types
sSet _optParams


Constructor & Destructor Documentation

marlin::CCProcessor::CCProcessor bool  status,
const std::string &  name,
const std::string &  type,
StringParameters p = NULL
 

Definition at line 11 of file CCProcessor.cc.

References _error, _error_desc, _param, addColsFromParam(), clearParameters(), NO_PARAMETERS, setError(), and setMarlinProc().

marlin::CCProcessor::CCProcessor CCProcessor p  ) 
 

Definition at line 43 of file CCProcessor.cc.

References _conditions, _error, _error_desc, _name, _optParams, _param, _status, _type, _types, addColsFromParam(), clearParameters(), setError(), and writeColsToParam().

marlin::CCProcessor::~CCProcessor  ) 
 

Definition at line 71 of file CCProcessor.cc.

References _cols, _param, and UNAVAILABLE.


Member Function Documentation

void marlin::CCProcessor::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 at line 289 of file CCProcessor.cc.

References _cols, and _types.

Referenced by addColsFromParam().

void marlin::CCProcessor::addColsFromParam StringParameters p  )  [private]
 

Definition at line 87 of file CCProcessor.cc.

References _param, _proc, addCol(), clearError(), marlin::Processor::getLCIOInType(), marlin::Processor::getLCIOOutType(), marlin::StringParameters::getStringKeys(), marlin::StringParameters::getStringVals(), INPUT, marlin::Processor::isInputCollectionName(), isInstalled(), marlin::Processor::isOutputCollectionName(), NO_PARAMETERS, OUTPUT, setError(), and EVENT::StringVec.

Referenced by CCProcessor().

void marlin::CCProcessor::addDCol CCCollection c  ) 
 

Adds a duplicate collection to this processor

Definition at line 318 of file CCProcessor.cc.

References _cols, COL_ERRORS, marlin::CCCollection::getType(), and setError().

Referenced by marlin::MarlinSteerCheck::consistencyCheck().

void marlin::CCProcessor::addUCol CCCollection c  ) 
 

Adds an unavailable collection to this processor

Definition at line 310 of file CCProcessor.cc.

References _cols, COL_ERRORS, marlin::CCCollection::getType(), and setError().

Referenced by marlin::MarlinSteerCheck::consistencyCheck().

void marlin::CCProcessor::changeStatus  ) 
 

Changes the processor status ( ACTIVE->INACTIVE or INACTIVE->ACTIVE )

Definition at line 280 of file CCProcessor.cc.

References _status, clearError(), and COL_ERRORS.

Referenced by marlin::MarlinSteerCheck::activateProcessor(), and marlin::MarlinSteerCheck::deactivateProcessor().

void marlin::CCProcessor::clearError int  error  ) 
 

Clears an error flag in this processor ( NO_PARAMETERS=0, NOT_INSTALLED=1, COL_ERRORS=2 )

Definition at line 405 of file CCProcessor.cc.

References _cols, _error, _error_desc, _errors, COL_ERRORS, DUPLICATE, EVENT::StringVec, and UNAVAILABLE.

Referenced by addColsFromParam(), changeStatus(), marlin::MarlinSteerCheck::consistencyCheck(), and setMarlinProc().

void marlin::CCProcessor::clearParameters  )  [private]
 

Definition at line 216 of file CCProcessor.cc.

References _cols, _optParams, _param, marlin::Processor::end(), marlin::StringParameters::erase(), marlin::StringParameters::getStringVals(), hasParameters(), INPUT, marlin::StringParameters::isParameterSet(), OUTPUT, and EVENT::StringVec.

Referenced by CCProcessor().

const ssMap& marlin::CCProcessor::getColHeaders const std::string &  iotype  )  [inline]
 

Returns a map with collection names and their respective types for INPUT/OUTPUT collections of this processor

Definition at line 105 of file CCProcessor.h.

References marlin::ssMap.

ColVec & marlin::CCProcessor::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 type If iotype == INPUT/OUTPUT then type_name is the name of the collection If iotype == UNAVAILABLE/DUPLICATE then type_name is the type of the collection

Definition at line 351 of file CCProcessor.cc.

References _cols, and marlin::ColVec.

Referenced by marlin::MarlinSteerCheck::consistencyCheck(), marlin::MarlinSteerCheck::getColsSet(), and isErrorCol().

sSet & marlin::CCProcessor::getColTypeNames const std::string &  iotype  ) 
 

Returns collection's types/names of a given iotype found in the processor If iotype == INPUT/OUTPUT then names are returned If iotype == UNAVAILABLE/DUPLICATE then types are returned

Definition at line 369 of file CCProcessor.cc.

References _cols, and marlin::sSet.

sSet& marlin::CCProcessor::getConditions  )  [inline]
 

Returns the Conditions of the processor

Definition at line 79 of file CCProcessor.h.

References marlin::sSet.

Referenced by marlin::MarlinSteerCheck::deactivateProcessor(), marlin::MarlinSteerCheck::remCondition(), and marlin::MarlinSteerCheck::repCondition().

const std::string marlin::CCProcessor::getDescription  )  [inline]
 

Returns the Description of the processor

Definition at line 82 of file CCProcessor.h.

Referenced by writeToXML().

const std::string marlin::CCProcessor::getError  )  [inline]
 

Returns a string with the error of the processor

Definition at line 90 of file CCProcessor.h.

const std::string& marlin::CCProcessor::getName  )  [inline]
 

Returns the Name of the processor

Definition at line 73 of file CCProcessor.h.

StringParameters* marlin::CCProcessor::getParameters  )  [inline]
 

Returns the string parameters for this processor

Definition at line 102 of file CCProcessor.h.

const std::string marlin::CCProcessor::getStatusDesc  )  [inline]
 

Returns a string with the processor status ( "Active", "Inactive" )

Definition at line 93 of file CCProcessor.h.

const std::string& marlin::CCProcessor::getType  )  [inline]
 

Returns the Type of the processor

Definition at line 76 of file CCProcessor.h.

Referenced by marlin::MarlinSteerCheck::findMatchingCols().

bool marlin::CCProcessor::hasCondition const std::string &  condition  ) 
 

Returns true if the processor is constrained by the given condition

Definition at line 200 of file CCProcessor.cc.

References _conditions.

bool marlin::CCProcessor::hasErrorCols  )  [inline]
 

Returns true if the processor has collection errors

Definition at line 61 of file CCProcessor.h.

bool marlin::CCProcessor::hasErrors  ) 
 

Returns true if the processor has errors

Definition at line 427 of file CCProcessor.cc.

References _error.

bool marlin::CCProcessor::hasParameters  )  [inline]
 

Returns true if the processor has parameters

Definition at line 58 of file CCProcessor.h.

Referenced by clearParameters(), writeColsToParam(), and writeToXML().

bool marlin::CCProcessor::isActive  )  [inline]
 

Returns true if the processor is active

Definition at line 67 of file CCProcessor.h.

Referenced by marlin::MarlinSteerCheck::getColsSet().

bool marlin::CCProcessor::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 at line 380 of file CCProcessor.cc.

References marlin::ColVec, DUPLICATE, getCols(), and UNAVAILABLE.

bool marlin::CCProcessor::isInstalled  )  [inline]
 

Returns true if the processor is installed

Definition at line 64 of file CCProcessor.h.

Referenced by addColsFromParam(), writeColsToParam(), and writeToXML().

bool marlin::CCProcessor::isParamOptional const std::string &  key  ) 
 

Returns true if a parameter is optional (optional means the parameter will be written out as a comment)

Definition at line 436 of file CCProcessor.cc.

References _optParams, and _type.

Referenced by writeToXML().

CCCollection * marlin::CCProcessor::popCol ColVec v,
CCCollection c
[private]
 

Definition at line 333 of file CCProcessor.cc.

References marlin::ColVec.

Referenced by remCol().

void marlin::CCProcessor::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 at line 326 of file CCProcessor.cc.

References _cols, and popCol().

void marlin::CCProcessor::setConditions const std::string &  conditions  ) 
 

Sets the processor's conditions

Definition at line 152 of file CCProcessor.cc.

References _conditions.

void marlin::CCProcessor::setError int  error  ) 
 

Activates an error flag in this processor ( NO_PARAMETERS=0, NOT_INSTALLED=1, COL_ERRORS=2 )

Definition at line 398 of file CCProcessor.cc.

References _error, _error_desc, and _errors.

Referenced by addColsFromParam(), addDCol(), addUCol(), CCProcessor(), and setMarlinProc().

void marlin::CCProcessor::setMarlinProc  )  [private]
 

Definition at line 207 of file CCProcessor.cc.

References _proc, _type, clearError(), NOT_INSTALLED, and setError().

Referenced by CCProcessor().

void marlin::CCProcessor::setName const std::string &  name  )  [inline]
 

Sets the processor's name

Definition at line 133 of file CCProcessor.h.

void marlin::CCProcessor::setOptionalParam const std::string &  key,
bool  optional = true
 

Sets a parameter as optional (if optional=true parameter is written out as a comment)

Definition at line 445 of file CCProcessor.cc.

References _optParams.

void marlin::CCProcessor::writeColsToParam  )  [private]
 

Definition at line 251 of file CCProcessor.cc.

References _cols, _param, marlin::StringParameters::add(), hasParameters(), isInstalled(), and EVENT::StringVec.

Referenced by CCProcessor().

void marlin::CCProcessor::writeToXML std::ofstream &  stream  ) 
 

Writes this processor to a stream using the XML format

Definition at line 454 of file CCProcessor.cc.

References _cols, _name, _param, _type, getDescription(), marlin::StringParameters::getStringKeys(), marlin::StringParameters::getStringVals(), marlin::CCCollection::getType(), marlin::CCCollection::getValue(), hasParameters(), isInstalled(), isParamOptional(), EVENT::StringVec, marlin::ProcessorParameter::type(), and UNAVAILABLE.


Member Data Documentation

ssColVecMap marlin::CCProcessor::_cols [private]
 

Definition at line 176 of file CCProcessor.h.

Referenced by addCol(), addDCol(), addUCol(), clearError(), clearParameters(), getCols(), getColTypeNames(), remCol(), writeColsToParam(), writeToXML(), and ~CCProcessor().

sSet marlin::CCProcessor::_conditions [private]
 

Definition at line 174 of file CCProcessor.h.

Referenced by CCProcessor(), hasCondition(), and setConditions().

bool marlin::CCProcessor::_error[MAX_ERRORS] [private]
 

Definition at line 165 of file CCProcessor.h.

Referenced by CCProcessor(), clearError(), hasErrors(), and setError().

StringVec marlin::CCProcessor::_error_desc [private]
 

Definition at line 171 of file CCProcessor.h.

Referenced by CCProcessor(), clearError(), and setError().

StringVec marlin::CCProcessor::_errors [private]
 

Definition at line 172 of file CCProcessor.h.

Referenced by clearError(), and setError().

std::string marlin::CCProcessor::_name [private]
 

Definition at line 166 of file CCProcessor.h.

Referenced by CCProcessor(), and writeToXML().

sSet marlin::CCProcessor::_optParams [private]
 

Definition at line 183 of file CCProcessor.h.

Referenced by CCProcessor(), clearParameters(), isParamOptional(), and setOptionalParam().

StringParameters* marlin::CCProcessor::_param [private]
 

Definition at line 168 of file CCProcessor.h.

Referenced by addColsFromParam(), CCProcessor(), clearParameters(), writeColsToParam(), writeToXML(), and ~CCProcessor().

Processor* marlin::CCProcessor::_proc [private]
 

Definition at line 169 of file CCProcessor.h.

Referenced by addColsFromParam(), and setMarlinProc().

bool marlin::CCProcessor::_status [private]
 

Definition at line 164 of file CCProcessor.h.

Referenced by CCProcessor(), and changeStatus().

std::string marlin::CCProcessor::_type [private]
 

Definition at line 167 of file CCProcessor.h.

Referenced by CCProcessor(), isParamOptional(), setMarlinProc(), and writeToXML().

sssMap marlin::CCProcessor::_types [private]
 

Definition at line 180 of file CCProcessor.h.

Referenced by addCol(), and CCProcessor().


The documentation for this class was generated from the following files:
Generated on Sun Jun 3 06:32:30 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1