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

marlin::MarlinSteerCheck Class Reference

#include <MarlinSteerCheck.h>

List of all members.

Public Member Functions

 MarlinSteerCheck (const char *steerFileName=NULL)
 ~MarlinSteerCheck ()
CMProcessorgetMProcs ()
ProcVecgetAProcs ()
ProcVecgetIProcs ()
int existsProcessor (const std::string &type, const std::string &name="")
ColVecgetLCIOCols () const
StringVecgetLCIOFiles ()
sSetgetColsSet (const std::string &type, const std::string &name, CCProcessor *proc)
StringParametersgetGlobalParameters ()
void dumpColErrors (unsigned int i, std::ostream &stream, bool separators=false)
int addLCIOFile (const std::string &file)
void remLCIOFile (const std::string &file)
void changeLCIOFilePos (unsigned int pos, unsigned int newPos)
void addProcessor (bool status, const std::string &name, const std::string &type, StringParameters *p=NULL)
void remProcessor (unsigned int index, bool status)
void activateProcessor (unsigned int index)
void deactivateProcessor (unsigned int index)
void changeProcessorPos (unsigned int pos, unsigned int newPos)
void consistencyCheck ()
bool saveAsXMLFile (const std::string &file)
const std::string getXMLFileRelPath ()
const std::string getXMLFileAbsPath ()
const std::string getXMLFileName ()
const std::string getXMLFile ()
void dump_information ()
sSetgetErrors ()
sSetgetPConditions ()
const std::string getCondition (unsigned int index)
void addCondition (const std::string &condition)
void repCondition (const std::string &oldCond, const std::string &newCond)
void remCondition (const std::string &condition)

Private Member Functions

ColVecgetProcCols (const ProcVec &v, const std::string &iotype) const
ColVecgetAllCols () const
ProcVecgetAllProcs () const
bool parseXMLFile (const std::string &file)
CCProcessorpopProc (ProcVec &v, CCProcessor *p)
ColVecfindMatchingCols (ColVec &v, CCProcessor *srcProc, const std::string &type, const std::string &value="UNDEFINED", const std::string &name="UNDEFINED")

Private Attributes

sSet _errors
IParser_parser
StringParameters_gparam
std::string _steeringFile
std::string _XMLFileName
std::string _XMLFileAbsPath
std::string _XMLFileRelPath
ProcVec _aProc
ProcVec _iProc
sColVecMap _lcioCols
StringVec _lcioFiles
sSet _colValues
sSet _pConditions
CMProcessor_marlinProcs


Constructor & Destructor Documentation

marlin::MarlinSteerCheck::MarlinSteerCheck const char *  steerFileName = NULL  ) 
 

Definition at line 30 of file MarlinSteerCheck.cc.

References _errors, _gparam, _marlinProcs, _steeringFile, marlin::StringParameters::add(), parseXMLFile(), and EVENT::StringVec.

marlin::MarlinSteerCheck::~MarlinSteerCheck  ) 
 

Definition at line 106 of file MarlinSteerCheck.cc.

References _gparam, and _parser.


Member Function Documentation

void marlin::MarlinSteerCheck::activateProcessor unsigned int  index  ) 
 

Activate processor at the given index

Definition at line 361 of file MarlinSteerCheck.cc.

References _aProc, _iProc, marlin::CCProcessor::changeStatus(), consistencyCheck(), and popProc().

Referenced by parseXMLFile().

void marlin::MarlinSteerCheck::addCondition const std::string &  condition  ) 
 

Add a new Condition

Definition at line 731 of file MarlinSteerCheck.cc.

References _pConditions.

int marlin::MarlinSteerCheck::addLCIOFile const std::string &  file  ) 
 

Add LCIO file and read all collections inside it

Definition at line 166 of file MarlinSteerCheck.cc.

References _errors, _lcioCols, _lcioFiles, ACTIVE, IO::LCReader::close(), marlin::ColVec, consistencyCheck(), findMatchingCols(), EVENT::LCEvent::getCollection(), EVENT::LCEvent::getCollectionNames(), EVENT::LCCollection::getTypeName(), IO::LCReader::open(), IO::LCReader::readNextEvent(), and EVENT::StringVec.

Referenced by parseXMLFile().

void marlin::MarlinSteerCheck::addProcessor bool  status,
const std::string &  name,
const std::string &  type,
StringParameters p = NULL
 

Add a new processor

Definition at line 314 of file MarlinSteerCheck.cc.

References _aProc, _iProc, and consistencyCheck().

Referenced by parseXMLFile().

void marlin::MarlinSteerCheck::changeLCIOFilePos unsigned int  pos,
unsigned int  newPos
 

Change the LCIO File at the given index to the new given position

Definition at line 279 of file MarlinSteerCheck.cc.

References _lcioFiles, and EVENT::StringVec.

void marlin::MarlinSteerCheck::changeProcessorPos unsigned int  pos,
unsigned int  newPos
 

Change the active processor at the given index to the new given position

Definition at line 402 of file MarlinSteerCheck.cc.

References _aProc, consistencyCheck(), popProc(), and marlin::ProcVec.

void marlin::MarlinSteerCheck::consistencyCheck  ) 
 

Performs a check at all active processors to search for unavailable collections

Definition at line 430 of file MarlinSteerCheck.cc.

References _aProc, marlin::CCProcessor::addDCol(), marlin::CCProcessor::addUCol(), marlin::CCProcessor::clearError(), COL_ERRORS, marlin::ColVec, findMatchingCols(), marlin::CCProcessor::getCols(), getLCIOCols(), INPUT, and OUTPUT.

Referenced by activateProcessor(), addLCIOFile(), addProcessor(), changeProcessorPos(), deactivateProcessor(), parseXMLFile(), remLCIOFile(), and remProcessor().

void marlin::MarlinSteerCheck::deactivateProcessor unsigned int  index  ) 
 

Deactivate processor at the given index

Definition at line 379 of file MarlinSteerCheck.cc.

References _aProc, _iProc, marlin::CCProcessor::changeStatus(), consistencyCheck(), marlin::CCProcessor::getConditions(), and popProc().

void marlin::MarlinSteerCheck::dump_information  ) 
 

Dumps all information read from the steering file to stdout

Definition at line 974 of file MarlinSteerCheck.cc.

References _aProc, _errors, _iProc, _steeringFile, dblue, ddunkel, dgreen, dhell, dred, dumpColErrors(), dunderline, dyellow, endcolor, getLCIOCols(), and getLCIOFiles().

Referenced by main().

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

References _aProc, marlin::ColVec, dblue, dgreen, dhell, dred, dunderline, DUPLICATE, dyellow, endcolor, findMatchingCols(), getAllCols(), getLCIOCols(), getProcCols(), OUTPUT, marlin::sSet, and UNAVAILABLE.

Referenced by dump_information().

int marlin::MarlinSteerCheck::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 does not exist Returns 1 if the processor exists and is active Returns 2 if the processor exists and is inactive

Definition at line 346 of file MarlinSteerCheck.cc.

References _aProc, and _iProc.

ColVec & marlin::MarlinSteerCheck::findMatchingCols ColVec v,
CCProcessor srcProc,
const std::string &  type,
const std::string &  value = "UNDEFINED",
const std::string &  name = "UNDEFINED"
[private]
 

Definition at line 664 of file MarlinSteerCheck.cc.

References marlin::ColVec, and marlin::CCProcessor::getType().

Referenced by addLCIOFile(), consistencyCheck(), dumpColErrors(), and getColsSet().

ColVec & marlin::MarlinSteerCheck::getAllCols  )  const [private]
 

Definition at line 785 of file MarlinSteerCheck.cc.

References _aProc, _iProc, marlin::ColVec, getLCIOCols(), getProcCols(), and OUTPUT.

Referenced by dumpColErrors(), and getColsSet().

ProcVec & marlin::MarlinSteerCheck::getAllProcs  )  const [private]
 

Definition at line 711 of file MarlinSteerCheck.cc.

References _aProc, _iProc, and marlin::ProcVec.

ProcVec& marlin::MarlinSteerCheck::getAProcs  )  [inline]
 

Returns the Active Processors

Definition at line 86 of file MarlinSteerCheck.h.

References marlin::ProcVec.

sSet & marlin::MarlinSteerCheck::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 ComboBox)

Definition at line 119 of file MarlinSteerCheck.cc.

References _aProc, _colValues, ACTIVE, marlin::ColVec, findMatchingCols(), getAllCols(), marlin::CCProcessor::getCols(), getLCIOCols(), INPUT, marlin::CCProcessor::isActive(), OUTPUT, and marlin::sSet.

const string marlin::MarlinSteerCheck::getCondition unsigned int  index  ) 
 

Returns the condition for a given index

Definition at line 722 of file MarlinSteerCheck.cc.

References _pConditions.

sSet& marlin::MarlinSteerCheck::getErrors  )  [inline]
 

Returns a set with all the errors found after performing a consistency check

Definition at line 159 of file MarlinSteerCheck.h.

References marlin::sSet.

StringParameters* marlin::MarlinSteerCheck::getGlobalParameters  )  [inline]
 

Returns the Global Parameters

Definition at line 107 of file MarlinSteerCheck.h.

ProcVec& marlin::MarlinSteerCheck::getIProcs  )  [inline]
 

Returns the Inactive Processors

Definition at line 89 of file MarlinSteerCheck.h.

References marlin::ProcVec.

ColVec & marlin::MarlinSteerCheck::getLCIOCols  )  const
 

Returns the collections read from LCIO files

Definition at line 762 of file MarlinSteerCheck.cc.

References _lcioCols, and marlin::ColVec.

Referenced by consistencyCheck(), dump_information(), dumpColErrors(), getAllCols(), and getColsSet().

StringVec& marlin::MarlinSteerCheck::getLCIOFiles  )  [inline]
 

Returns the names of the LCIO files found in the global section

Definition at line 101 of file MarlinSteerCheck.h.

References EVENT::StringVec.

Referenced by dump_information(), and saveAsXMLFile().

CMProcessor* marlin::MarlinSteerCheck::getMProcs  )  [inline]
 

Returns the Marlin Processors

Definition at line 83 of file MarlinSteerCheck.h.

sSet& marlin::MarlinSteerCheck::getPConditions  )  [inline]
 

Returns a set with all the processor's conditions

Definition at line 162 of file MarlinSteerCheck.h.

References marlin::sSet.

ColVec & marlin::MarlinSteerCheck::getProcCols const ProcVec v,
const std::string &  iotype
const [private]
 

Definition at line 774 of file MarlinSteerCheck.cc.

References marlin::ColVec.

Referenced by dumpColErrors(), and getAllCols().

const std::string marlin::MarlinSteerCheck::getXMLFile  )  [inline]
 

Definition at line 153 of file MarlinSteerCheck.h.

const std::string marlin::MarlinSteerCheck::getXMLFileAbsPath  )  [inline]
 

Definition at line 147 of file MarlinSteerCheck.h.

const std::string marlin::MarlinSteerCheck::getXMLFileName  )  [inline]
 

Definition at line 150 of file MarlinSteerCheck.h.

const std::string marlin::MarlinSteerCheck::getXMLFileRelPath  )  [inline]
 

Definition at line 144 of file MarlinSteerCheck.h.

bool marlin::MarlinSteerCheck::parseXMLFile const std::string &  file  )  [private]
 

Definition at line 483 of file MarlinSteerCheck.cc.

References _aProc, _errors, _gparam, _iProc, _parser, _pConditions, _steeringFile, activateProcessor(), ACTIVE, marlin::StringParameters::add(), addLCIOFile(), addProcessor(), consistencyCheck(), marlin::StringParameters::erase(), marlin::IParser::getParameters(), marlin::StringParameters::getStringVal(), marlin::StringParameters::getStringVals(), INACTIVE, TiXmlDocument::LoadFile(), marlin::IParser::parse(), and EVENT::StringVec.

Referenced by MarlinSteerCheck().

CCProcessor * marlin::MarlinSteerCheck::popProc ProcVec v,
CCProcessor p
[private]
 

Definition at line 692 of file MarlinSteerCheck.cc.

References marlin::ProcVec.

Referenced by activateProcessor(), changeProcessorPos(), deactivateProcessor(), and remProcessor().

void marlin::MarlinSteerCheck::remCondition const std::string &  condition  ) 
 

Returns the condition for a given index

Definition at line 747 of file MarlinSteerCheck.cc.

References _aProc, _pConditions, and marlin::CCProcessor::getConditions().

void marlin::MarlinSteerCheck::remLCIOFile const std::string &  file  ) 
 

Remove LCIO file and all collections associated to it

Definition at line 256 of file MarlinSteerCheck.cc.

References _lcioCols, _lcioFiles, and consistencyCheck().

void marlin::MarlinSteerCheck::remProcessor unsigned int  index,
bool  status
 

Remove processor with the given status at the given index

Definition at line 328 of file MarlinSteerCheck.cc.

References _aProc, _iProc, consistencyCheck(), and popProc().

void marlin::MarlinSteerCheck::repCondition const std::string &  oldCond,
const std::string &  newCond
 

Replace a Condition

Definition at line 735 of file MarlinSteerCheck.cc.

References _aProc, _pConditions, and marlin::CCProcessor::getConditions().

bool marlin::MarlinSteerCheck::saveAsXMLFile const std::string &  file  ) 
 

Saves the data to an XML file with the given name Returns false if error occured

Definition at line 800 of file MarlinSteerCheck.cc.

References _aProc, _gparam, _iProc, getLCIOFiles(), marlin::StringParameters::getStringKeys(), marlin::StringParameters::getStringVals(), and EVENT::StringVec.

Referenced by main().


Member Data Documentation

ProcVec marlin::MarlinSteerCheck::_aProc [private]
 

Definition at line 221 of file MarlinSteerCheck.h.

Referenced by activateProcessor(), addProcessor(), changeProcessorPos(), consistencyCheck(), deactivateProcessor(), dump_information(), dumpColErrors(), existsProcessor(), getAllCols(), getAllProcs(), getColsSet(), parseXMLFile(), remCondition(), remProcessor(), repCondition(), and saveAsXMLFile().

sSet marlin::MarlinSteerCheck::_colValues [private]
 

Definition at line 226 of file MarlinSteerCheck.h.

Referenced by getColsSet().

sSet marlin::MarlinSteerCheck::_errors [private]
 

Definition at line 205 of file MarlinSteerCheck.h.

Referenced by addLCIOFile(), dump_information(), MarlinSteerCheck(), and parseXMLFile().

StringParameters* marlin::MarlinSteerCheck::_gparam [private]
 

Definition at line 214 of file MarlinSteerCheck.h.

Referenced by MarlinSteerCheck(), parseXMLFile(), saveAsXMLFile(), and ~MarlinSteerCheck().

ProcVec marlin::MarlinSteerCheck::_iProc [private]
 

Definition at line 222 of file MarlinSteerCheck.h.

Referenced by activateProcessor(), addProcessor(), deactivateProcessor(), dump_information(), existsProcessor(), getAllCols(), getAllProcs(), parseXMLFile(), remProcessor(), and saveAsXMLFile().

sColVecMap marlin::MarlinSteerCheck::_lcioCols [private]
 

Definition at line 223 of file MarlinSteerCheck.h.

Referenced by addLCIOFile(), getLCIOCols(), and remLCIOFile().

StringVec marlin::MarlinSteerCheck::_lcioFiles [private]
 

Definition at line 224 of file MarlinSteerCheck.h.

Referenced by addLCIOFile(), changeLCIOFilePos(), and remLCIOFile().

CMProcessor* marlin::MarlinSteerCheck::_marlinProcs [private]
 

Definition at line 230 of file MarlinSteerCheck.h.

Referenced by MarlinSteerCheck().

IParser* marlin::MarlinSteerCheck::_parser [private]
 

Definition at line 213 of file MarlinSteerCheck.h.

Referenced by parseXMLFile(), and ~MarlinSteerCheck().

sSet marlin::MarlinSteerCheck::_pConditions [private]
 

Definition at line 228 of file MarlinSteerCheck.h.

Referenced by addCondition(), getCondition(), parseXMLFile(), remCondition(), and repCondition().

std::string marlin::MarlinSteerCheck::_steeringFile [private]
 

Definition at line 216 of file MarlinSteerCheck.h.

Referenced by dump_information(), MarlinSteerCheck(), and parseXMLFile().

std::string marlin::MarlinSteerCheck::_XMLFileAbsPath [private]
 

Definition at line 218 of file MarlinSteerCheck.h.

std::string marlin::MarlinSteerCheck::_XMLFileName [private]
 

Definition at line 217 of file MarlinSteerCheck.h.

std::string marlin::MarlinSteerCheck::_XMLFileRelPath [private]
 

Definition at line 219 of file MarlinSteerCheck.h.


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