CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TTUBasicConfig Class Reference

#include <interface/RPCBasicConfig.h>

Inheritance diagram for TTUBasicConfig:
TTUConfiguration

Public Member Functions

bool initialise (int, int) override
 
void preprocess (TTUInput &) override
 
 TTUBasicConfig (const char *)
 
 TTUBasicConfig (const TTUBoardSpecs *)
 
 ~TTUBasicConfig () override
 Destructor. More...
 
- Public Member Functions inherited from TTUConfiguration
 TTUConfiguration (const char *)
 
 TTUConfiguration (const TTUBoardSpecs *)
 
TTULogicUnitttulogic ()
 
virtual ~TTUConfiguration ()=default
 

Private Attributes

bool m_debug
 
std::vector< int > m_vecforce
 
std::vector< int > m_vecmask
 

Additional Inherited Members

- Public Attributes inherited from TTUConfiguration
const TTUBoardSpecsm_ttuboardspecs
 

Detailed Description

Author
Andres Osorio
Date
2008-10-29

Definition at line 15 of file TTUBasicConfig.h.

Constructor & Destructor Documentation

TTUBasicConfig::TTUBasicConfig ( const char *  logic)

Definition at line 23 of file TTUBasicConfig.cc.

23  :
24  TTUConfiguration(logic),
25  m_debug{false}
26 {
27 }
TTUConfiguration(const char *)
TTUBasicConfig::TTUBasicConfig ( const TTUBoardSpecs ttuspecs)

Definition at line 17 of file TTUBasicConfig.cc.

17  :
18  TTUConfiguration(ttuspecs) ,
19  m_debug{false}
20 {
21 }
TTUConfiguration(const char *)
TTUBasicConfig::~TTUBasicConfig ( )
override

Destructor.

Definition at line 32 of file TTUBasicConfig.cc.

32  {
33 }

Member Function Documentation

bool TTUBasicConfig::initialise ( int  line,
int  ttuid 
)
overridevirtual

Implements TTUConfiguration.

Definition at line 36 of file TTUBasicConfig.cc.

References gather_cfg::cout, TTULogicUnit::initialise(), TTUBoardSpecs::m_boardspecs, m_debug, TTUConfiguration::m_ttuboardspecs, m_vecforce, m_vecmask, TTULogicUnit::setBoardSpecs(), TTULogicUnit::setlogic(), mps_update::status, and TTUConfiguration::ttulogic().

37 {
38 
39  bool status(false);
40 
41  //. read specifications and set it to the corresponding TTU board
42 
43  std::vector<TTUBoardSpecs::TTUBoardConfig>::const_iterator itr;
44  itr = m_ttuboardspecs->m_boardspecs.begin();
45 
46  int pos(0);
47  int maxboards = m_ttuboardspecs->m_boardspecs.size();
48 
49  for( pos=0; pos < maxboards; ++pos) {
50  if ( m_debug ) std::cout << "TTUBasicConfig::initialise> "
51  << m_ttuboardspecs->m_boardspecs[pos].m_Wheel1Id
52  << std::endl;
53  if ( m_ttuboardspecs->m_boardspecs[pos].m_runId == ttuid ) break;
54 
55  }
56 
57  // initialise logic unit
58 
59  if ( line == 2 ) {
60  ttulogic()->setlogic( "WedgeORLogic" );
61  } else {
62  ttulogic()->setlogic( (*itr).m_LogicType.c_str() );
63  }
64 
65  status = ttulogic()->initialise();
66 
67  //itr = m_ttuboardspecs->m_boardspecs.begin();
68 
70 
71  // get mask and force vectors
72 
73  m_vecmask.assign( (*itr).m_MaskedSectors.begin(), (*itr).m_MaskedSectors.end() );
74 
75  m_vecforce.assign( (*itr).m_ForcedSectors.begin(), (*itr).m_ForcedSectors.end() );
76 
77  if ( !status ) {
78  if( m_debug ) std::cout << "TTUConfiguration> Problem initialising the logic unit\n";
79  return false; };
80 
81  return status;
82 
83 }
std::vector< int > m_vecforce
const TTUBoardSpecs * m_ttuboardspecs
std::vector< int > m_vecmask
bool initialise()
Definition: TTULogicUnit.cc:31
void setlogic(const char *)
Definition: TTULogicUnit.cc:45
std::vector< TTUBoardConfig > m_boardspecs
Definition: TTUBoardSpecs.h:47
void setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig &)
Definition: TTULogicUnit.cc:52
TTULogicUnit * ttulogic()
void TTUBasicConfig::preprocess ( TTUInput input)
overridevirtual

Implements TTUConfiguration.

Definition at line 85 of file TTUBasicConfig.cc.

References gather_cfg::cout, m_debug, m_vecmask, and TTUInput::mask().

86 {
87 
88  if( m_debug ) std::cout << "TTUBasicConfig::preprocess> starts here" << std::endl;
89 
90  input.mask( m_vecmask );
91  //input.force( m_vecforce );
92 
93  if( m_debug ) std::cout << "TTUBasicConfig::preprocess> done" << std::endl;
94 
95 }
void mask(const std::vector< int > &)
Definition: TTUInput.cc:44
std::vector< int > m_vecmask

Member Data Documentation

bool TTUBasicConfig::m_debug
private

Definition at line 34 of file TTUBasicConfig.h.

Referenced by initialise(), and preprocess().

std::vector<int> TTUBasicConfig::m_vecforce
private

Definition at line 32 of file TTUBasicConfig.h.

Referenced by initialise().

std::vector<int> TTUBasicConfig::m_vecmask
private

Definition at line 31 of file TTUBasicConfig.h.

Referenced by initialise(), and preprocess().