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() [1/2]

TTUBasicConfig::TTUBasicConfig ( const char *  logic)

Definition at line 17 of file TTUBasicConfig.cc.

17 : TTUConfiguration(logic), m_debug{false} {}

◆ TTUBasicConfig() [2/2]

TTUBasicConfig::TTUBasicConfig ( const TTUBoardSpecs ttuspecs)

Definition at line 15 of file TTUBasicConfig.cc.

15 : TTUConfiguration(ttuspecs), m_debug{false} {}

◆ ~TTUBasicConfig()

TTUBasicConfig::~TTUBasicConfig ( )
override

Destructor.

Definition at line 22 of file TTUBasicConfig.cc.

22 {}

Member Function Documentation

◆ initialise()

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

Implements TTUConfiguration.

Definition at line 25 of file TTUBasicConfig.cc.

25  {
26  bool status(false);
27 
28  //. read specifications and set it to the corresponding TTU board
29 
30  std::vector<TTUBoardSpecs::TTUBoardConfig>::const_iterator itr;
31  itr = m_ttuboardspecs->m_boardspecs.begin();
32 
33  int pos(0);
34  int maxboards = m_ttuboardspecs->m_boardspecs.size();
35 
36  for (pos = 0; pos < maxboards; ++pos) {
37  if (m_debug)
38  std::cout << "TTUBasicConfig::initialise> " << m_ttuboardspecs->m_boardspecs[pos].m_Wheel1Id << std::endl;
39  if (m_ttuboardspecs->m_boardspecs[pos].m_runId == ttuid)
40  break;
41  }
42 
43  // initialise logic unit
44 
45  if (line == 2) {
46  ttulogic()->setlogic("WedgeORLogic");
47  } else {
48  ttulogic()->setlogic((*itr).m_LogicType.c_str());
49  }
50 
51  status = ttulogic()->initialise();
52 
53  //itr = m_ttuboardspecs->m_boardspecs.begin();
54 
56 
57  // get mask and force vectors
58 
59  m_vecmask.assign((*itr).m_MaskedSectors.begin(), (*itr).m_MaskedSectors.end());
60 
61  m_vecforce.assign((*itr).m_ForcedSectors.begin(), (*itr).m_ForcedSectors.end());
62 
63  if (!status) {
64  if (m_debug)
65  std::cout << "TTUConfiguration> Problem initialising the logic unit\n";
66  return false;
67  };
68 
69  return status;
70 }

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

◆ preprocess()

void TTUBasicConfig::preprocess ( TTUInput input)
overridevirtual

Implements TTUConfiguration.

Definition at line 72 of file TTUBasicConfig.cc.

72  {
73  if (m_debug)
74  std::cout << "TTUBasicConfig::preprocess> starts here" << std::endl;
75 
76  input.mask(m_vecmask);
77  //input.force( m_vecforce );
78 
79  if (m_debug)
80  std::cout << "TTUBasicConfig::preprocess> done" << std::endl;
81 }

References gather_cfg::cout, input, m_debug, and m_vecmask.

Member Data Documentation

◆ m_debug

bool TTUBasicConfig::m_debug
private

Definition at line 32 of file TTUBasicConfig.h.

Referenced by initialise(), and preprocess().

◆ m_vecforce

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

Definition at line 30 of file TTUBasicConfig.h.

Referenced by initialise().

◆ m_vecmask

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

Definition at line 29 of file TTUBasicConfig.h.

Referenced by initialise(), and preprocess().

TTUConfiguration::m_ttuboardspecs
const TTUBoardSpecs * m_ttuboardspecs
Definition: TTUConfiguration.h:32
input
static const std::string input
Definition: EdmProvDump.cc:48
mps_update.status
status
Definition: mps_update.py:68
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
TTUBasicConfig::m_vecmask
std::vector< int > m_vecmask
Definition: TTUBasicConfig.h:29
TTULogicUnit::setlogic
void setlogic(const char *)
Definition: TTULogicUnit.cc:36
TTUConfiguration::ttulogic
TTULogicUnit * ttulogic()
Definition: TTUConfiguration.h:30
TTUConfiguration::TTUConfiguration
TTUConfiguration(const char *)
Definition: TTUConfiguration.cc:29
TTULogicUnit::initialise
bool initialise()
Definition: TTULogicUnit.cc:23
TTUBasicConfig::m_vecforce
std::vector< int > m_vecforce
Definition: TTUBasicConfig.h:30
TTUBoardSpecs::m_boardspecs
std::vector< TTUBoardConfig > m_boardspecs
Definition: TTUBoardSpecs.h:46
TTULogicUnit::setBoardSpecs
void setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig &)
Definition: TTULogicUnit.cc:38
mps_splice.line
line
Definition: mps_splice.py:76
TTUBasicConfig::m_debug
bool m_debug
Definition: TTUBasicConfig.h:32