#include <TTUConfigurator.h>
Public Member Functions | |
RBCBoardSpecs * | getRbcSpecs () |
TTUBoardSpecs * | getTtuSpecs () |
void | process () |
TTUConfigurator (const std::string &) | |
TTUConfigurator () | |
Standard constructor. | |
virtual | ~TTUConfigurator () |
Destructor. | |
Public Attributes | |
bool | m_hasConfig |
Private Member Functions | |
void | addData (RBCBoardSpecs *) |
void | addData (TTUBoardSpecs *) |
Private Attributes | |
std::ifstream * | m_in |
RBCBoardSpecs * | m_rbcspecs |
TTUBoardSpecs * | m_ttuspecs |
This is an auxiliary class to read an ascii or xml configuration file for the RPC Technical Trigger - to by pass reading configuration from database via EventSetup
Definition at line 31 of file TTUConfigurator.h.
TTUConfigurator::TTUConfigurator | ( | ) | [inline] |
TTUConfigurator::TTUConfigurator | ( | const std::string & | infile | ) |
Definition at line 19 of file TTUConfigurator.cc.
References m_hasConfig, m_in, m_rbcspecs, and m_ttuspecs.
{ m_in = new std::ifstream(); m_in->open( infile.c_str() ); if(!m_in->is_open()) { edm::LogError("TTUConfigurator") << "TTUConfigurator cannot open file"; m_hasConfig = false; } else { m_hasConfig = true; } m_rbcspecs = new RBCBoardSpecs(); m_ttuspecs = new TTUBoardSpecs(); }
TTUConfigurator::~TTUConfigurator | ( | ) | [virtual] |
Destructor.
Definition at line 38 of file TTUConfigurator.cc.
References m_in, m_rbcspecs, and m_ttuspecs.
{ if ( m_in ) { m_in->close(); delete m_in; } if ( m_rbcspecs ) delete m_rbcspecs; if ( m_ttuspecs ) delete m_ttuspecs; }
void TTUConfigurator::addData | ( | RBCBoardSpecs * | specs | ) | [private] |
Definition at line 60 of file TTUConfigurator.cc.
References i, and RBCBoardSpecs::v_boardspecs.
Referenced by process().
{ RBCBoardSpecs::RBCBoardConfig * board; for( int i=0; i < 30; i++) { board = new RBCBoardSpecs::RBCBoardConfig(); (*m_in) >> (*board); specs->v_boardspecs.push_back( *board ); } }
void TTUConfigurator::addData | ( | TTUBoardSpecs * | specs | ) | [private] |
Definition at line 77 of file TTUConfigurator.cc.
References i, and TTUBoardSpecs::m_boardspecs.
{ TTUBoardSpecs::TTUBoardConfig * board; for(int i=0; i < 3; i++){ board= new TTUBoardSpecs::TTUBoardConfig(); (*m_in) >> (*board); specs->m_boardspecs.push_back( *board ); } }
RBCBoardSpecs* TTUConfigurator::getRbcSpecs | ( | ) | [inline] |
Definition at line 40 of file TTUConfigurator.h.
References m_rbcspecs.
Referenced by RPCTechnicalTrigger::beginRun().
{ return m_rbcspecs; };
TTUBoardSpecs* TTUConfigurator::getTtuSpecs | ( | ) | [inline] |
Definition at line 42 of file TTUConfigurator.h.
References m_ttuspecs.
Referenced by RPCTechnicalTrigger::beginRun().
{ return m_ttuspecs; };
void TTUConfigurator::process | ( | ) |
Definition at line 52 of file TTUConfigurator.cc.
References addData(), m_rbcspecs, and m_ttuspecs.
Referenced by RPCTechnicalTrigger::beginRun().
{ addData( m_rbcspecs ); addData( m_ttuspecs ); }
Definition at line 46 of file TTUConfigurator.h.
Referenced by RPCTechnicalTrigger::beginRun(), and TTUConfigurator().
std::ifstream* TTUConfigurator::m_in [private] |
Definition at line 52 of file TTUConfigurator.h.
Referenced by TTUConfigurator(), and ~TTUConfigurator().
RBCBoardSpecs* TTUConfigurator::m_rbcspecs [private] |
Definition at line 57 of file TTUConfigurator.h.
Referenced by getRbcSpecs(), process(), TTUConfigurator(), and ~TTUConfigurator().
TTUBoardSpecs* TTUConfigurator::m_ttuspecs [private] |
Definition at line 58 of file TTUConfigurator.h.
Referenced by getTtuSpecs(), process(), TTUConfigurator(), and ~TTUConfigurator().