#include <interface/RPCBasicConfig.h>
Public Member Functions | |
bool | initialise (int, int) |
void | preprocess (TTUInput &) |
TTUBasicConfig (const char *) | |
TTUBasicConfig () | |
Standard constructor. | |
TTUBasicConfig (const TTUBoardSpecs *) | |
virtual | ~TTUBasicConfig () |
Destructor. | |
Private Attributes | |
bool | m_debug |
std::vector< int > | m_vecforce |
std::vector< int > | m_vecmask |
Definition at line 16 of file TTUBasicConfig.h.
TTUBasicConfig::TTUBasicConfig | ( | ) | [inline] |
TTUBasicConfig::TTUBasicConfig | ( | const char * | logic | ) |
Definition at line 28 of file TTUBasicConfig.cc.
References m_debug, and TTUConfiguration::m_ttulogic.
{ m_ttulogic = new TTULogicUnit( logic ); m_debug = false; }
TTUBasicConfig::TTUBasicConfig | ( | const TTUBoardSpecs * | ttuspecs | ) |
Definition at line 18 of file TTUBasicConfig.cc.
References m_debug, TTUConfiguration::m_ttuboardspecs, and TTUConfiguration::m_ttulogic.
{ m_ttuboardspecs = ttuspecs; m_ttulogic = new TTULogicUnit(); m_debug = false; }
TTUBasicConfig::~TTUBasicConfig | ( | ) | [virtual] |
Destructor.
Definition at line 39 of file TTUBasicConfig.cc.
References TTUConfiguration::m_ttulogic, m_vecforce, and m_vecmask.
{ if (m_ttulogic) delete m_ttulogic; m_vecmask.clear(); m_vecforce.clear(); }
bool TTUBasicConfig::initialise | ( | int | line, |
int | ttuid | ||
) | [virtual] |
Implements TTUConfiguration.
Definition at line 49 of file TTUBasicConfig.cc.
References gather_cfg::cout, TTULogicUnit::initialise(), TTUBoardSpecs::m_boardspecs, m_debug, TTUConfiguration::m_ttuboardspecs, TTUConfiguration::m_ttulogic, m_vecforce, m_vecmask, pos, TTULogicUnit::setBoardSpecs(), TTULogicUnit::setlogic(), and ntuplemaker::status.
{ bool status(false); //. read specifications and set it to the corresponding TTU board std::vector<TTUBoardSpecs::TTUBoardConfig>::const_iterator itr; itr = m_ttuboardspecs->m_boardspecs.begin(); int pos(0); int maxboards = m_ttuboardspecs->m_boardspecs.size(); for( pos=0; pos < maxboards; ++pos) { if ( m_debug ) std::cout << "TTUBasicConfig::initialise> " << m_ttuboardspecs->m_boardspecs[pos].m_Wheel1Id << std::endl; if ( m_ttuboardspecs->m_boardspecs[pos].m_runId == ttuid ) break; } // initialise logic unit if ( line == 2 ) { m_ttulogic->setlogic( "WedgeORLogic" ); } else { m_ttulogic->setlogic( (*itr).m_LogicType.c_str() ); } status = m_ttulogic->initialise(); //itr = m_ttuboardspecs->m_boardspecs.begin(); m_ttulogic->setBoardSpecs( m_ttuboardspecs->m_boardspecs[pos] ); // get mask and force vectors m_vecmask.assign( (*itr).m_MaskedSectors.begin(), (*itr).m_MaskedSectors.end() ); m_vecforce.assign( (*itr).m_ForcedSectors.begin(), (*itr).m_ForcedSectors.end() ); if ( !status ) { if( m_debug ) std::cout << "TTUConfiguration> Problem initialising the logic unit\n"; return 0; }; return status; }
void TTUBasicConfig::preprocess | ( | TTUInput & | input | ) | [virtual] |
Implements TTUConfiguration.
Definition at line 98 of file TTUBasicConfig.cc.
References gather_cfg::cout, m_debug, m_vecmask, and TTUInput::mask().
bool TTUBasicConfig::m_debug [private] |
Definition at line 38 of file TTUBasicConfig.h.
Referenced by initialise(), preprocess(), and TTUBasicConfig().
std::vector<int> TTUBasicConfig::m_vecforce [private] |
Definition at line 36 of file TTUBasicConfig.h.
Referenced by initialise(), and ~TTUBasicConfig().
std::vector<int> TTUBasicConfig::m_vecmask [private] |
Definition at line 35 of file TTUBasicConfig.h.
Referenced by initialise(), preprocess(), and ~TTUBasicConfig().