CMS 3D CMS Logo

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

#include <interface/RBCBasicConfig.h>

Inheritance diagram for RBCBasicConfig:
RBCConfiguration

Public Member Functions

bool initialise () override
 
void preprocess (RBCInput &) override
 
 RBCBasicConfig ()
 Standard constructor. More...
 
 RBCBasicConfig (const char *)
 
 RBCBasicConfig (const RBCBoardSpecs *, RBCId *)
 
- Public Member Functions inherited from RBCConfiguration
RBCConfigurationoperator= (RBCConfiguration &&)=default
 
 RBCConfiguration ()
 
 RBCConfiguration (const char *_logic)
 
 RBCConfiguration (const RBCBoardSpecs *rbcspecs)
 
 RBCConfiguration (RBCConfiguration &&)=default
 
RBCLogicUnitrbclogic ()
 
virtual ~RBCConfiguration ()=default
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from RBCConfiguration
const RBCBoardSpecsm_rbcboardspecs
 
std::unique_ptr< RBCLogicUnitm_rbclogic
 

Detailed Description

Author
Andres Osorio
Date
2008-10-29

Definition at line 14 of file RBCBasicConfig.h.

Constructor & Destructor Documentation

◆ RBCBasicConfig() [1/3]

RBCBasicConfig::RBCBasicConfig ( )
inline

Standard constructor.

Definition at line 17 of file RBCBasicConfig.h.

17 : m_debug{false} {};

◆ RBCBasicConfig() [2/3]

RBCBasicConfig::RBCBasicConfig ( const char *  _logic)

Definition at line 18 of file RBCBasicConfig.cc.

18 : RBCConfiguration(_logic) {}

◆ RBCBasicConfig() [3/3]

RBCBasicConfig::RBCBasicConfig ( const RBCBoardSpecs rbcspecs,
RBCId info 
)

Definition at line 15 of file RBCBasicConfig.cc.

16  : RBCConfiguration(rbcspecs), m_debug{false} {}

Member Function Documentation

◆ initialise()

bool RBCBasicConfig::initialise ( )
overridevirtual

Implements RBCConfiguration.

Definition at line 21 of file RBCBasicConfig.cc.

21  {
22  bool status(false);
23 
24  //. read specifications
25 
26  std::vector<RBCBoardSpecs::RBCBoardConfig>::const_iterator itr;
27  itr = m_rbcboardspecs->v_boardspecs.begin();
28 
29  // initialise logic unit
30  m_rbclogic->setlogic((*itr).m_LogicType.c_str());
31  status = m_rbclogic->initialise();
32 
33  m_rbclogic->setBoardSpecs((*itr));
34 
35  // get mask and force vectors
36 
37  m_vecmask.assign((*itr).m_MaskedOrInput.begin(), (*itr).m_MaskedOrInput.end());
38  m_vecforce.assign((*itr).m_ForcedOrInput.begin(), (*itr).m_ForcedOrInput.end());
39 
40  if (!status) {
41  if (m_debug)
42  std::cout << "RBCConfiguration> Problem initialising the logic unit\n";
43  return false;
44  };
45 
46  return true;
47 }

References gather_cfg::cout, m_debug, RBCConfiguration::m_rbcboardspecs, RBCConfiguration::m_rbclogic, m_vecforce, m_vecmask, mps_update::status, and RBCBoardSpecs::v_boardspecs.

◆ preprocess()

void RBCBasicConfig::preprocess ( RBCInput input)
overridevirtual

Implements RBCConfiguration.

Definition at line 49 of file RBCBasicConfig.cc.

49  {
50  if (m_debug)
51  std::cout << "RBCBasicConfig::preprocess> starts here" << std::endl;
52 
53  input.mask(m_vecmask);
54  input.force(m_vecforce);
55 
56  if (m_debug)
57  std::cout << "RBCBasicConfig::preprocess> done" << std::endl;
58 }

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

Member Data Documentation

◆ m_debug

bool RBCBasicConfig::m_debug
private

Definition at line 32 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().

◆ m_vecforce

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

Definition at line 30 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().

◆ m_vecmask

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

Definition at line 29 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().

input
static const std::string input
Definition: EdmProvDump.cc:48
mps_update.status
status
Definition: mps_update.py:69
RBCConfiguration::m_rbclogic
std::unique_ptr< RBCLogicUnit > m_rbclogic
Definition: RBCConfiguration.h:38
RBCBasicConfig::m_vecforce
std::vector< int > m_vecforce
Definition: RBCBasicConfig.h:30
gather_cfg.cout
cout
Definition: gather_cfg.py:144
RBCBoardSpecs::v_boardspecs
std::vector< RBCBoardConfig > v_boardspecs
Definition: RBCBoardSpecs.h:40
RBCConfiguration::m_rbcboardspecs
const RBCBoardSpecs * m_rbcboardspecs
Definition: RBCConfiguration.h:37
RBCConfiguration::RBCConfiguration
RBCConfiguration()
Definition: RBCConfiguration.h:22
RBCBasicConfig::m_debug
bool m_debug
Definition: RBCBasicConfig.h:32
RBCBasicConfig::m_vecmask
std::vector< int > m_vecmask
Definition: RBCBasicConfig.h:29