CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 RBCBoardSpecs *rbcspecs)
 
 RBCConfiguration (const char *_logic)
 
 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::RBCBasicConfig ( )
inline

Standard constructor.

Definition at line 17 of file RBCBasicConfig.h.

17 : m_debug{false} {};
RBCBasicConfig::RBCBasicConfig ( const char *  _logic)

Definition at line 18 of file RBCBasicConfig.cc.

18 : RBCConfiguration(_logic) {}
RBCBasicConfig::RBCBasicConfig ( const RBCBoardSpecs rbcspecs,
RBCId info 
)

Definition at line 15 of file RBCBasicConfig.cc.

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

Member Function Documentation

bool RBCBasicConfig::initialise ( )
overridevirtual

Implements RBCConfiguration.

Definition at line 21 of file RBCBasicConfig.cc.

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

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 }
std::vector< int > m_vecforce
list status
Definition: mps_update.py:107
std::unique_ptr< RBCLogicUnit > m_rbclogic
std::vector< int > m_vecmask
std::vector< RBCBoardConfig > v_boardspecs
Definition: RBCBoardSpecs.h:40
tuple cout
Definition: gather_cfg.py:144
const RBCBoardSpecs * m_rbcboardspecs
void RBCBasicConfig::preprocess ( RBCInput input)
overridevirtual

Implements RBCConfiguration.

Definition at line 49 of file RBCBasicConfig.cc.

References gather_cfg::cout, RBCInput::force(), m_debug, m_vecforce, m_vecmask, and RBCInput::mask().

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 }
std::vector< int > m_vecforce
void mask(const std::vector< int > &)
Definition: RBCInput.cc:37
void force(const std::vector< int > &)
Definition: RBCInput.cc:51
std::vector< int > m_vecmask
tuple cout
Definition: gather_cfg.py:144

Member Data Documentation

bool RBCBasicConfig::m_debug
private

Definition at line 32 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().

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

Definition at line 30 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().

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

Definition at line 29 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().