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} {}
TTUConfiguration(const char *)

◆ TTUBasicConfig() [2/2]

TTUBasicConfig::TTUBasicConfig ( const TTUBoardSpecs ttuspecs)

Definition at line 15 of file TTUBasicConfig.cc.

15 : TTUConfiguration(ttuspecs), m_debug{false} {}
TTUConfiguration(const char *)

◆ ~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.

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().

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 }
std::vector< int > m_vecforce
const TTUBoardSpecs * m_ttuboardspecs
std::vector< int > m_vecmask
bool initialise()
Definition: TTULogicUnit.cc:23
void setlogic(const char *)
Definition: TTULogicUnit.cc:36
std::vector< TTUBoardConfig > m_boardspecs
Definition: TTUBoardSpecs.h:46
void setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig &)
Definition: TTULogicUnit.cc:38
TTULogicUnit * ttulogic()

◆ preprocess()

void TTUBasicConfig::preprocess ( TTUInput input)
overridevirtual

Implements TTUConfiguration.

Definition at line 72 of file TTUBasicConfig.cc.

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

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 }
std::vector< int > m_vecmask
static std::string const input
Definition: EdmProvDump.cc:50

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().