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

References initialise(), and preprocess().

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

Definition at line 24 of file RBCBasicConfig.cc.

24  :
25  RBCConfiguration(_logic) {
26 }
RBCBasicConfig::RBCBasicConfig ( const RBCBoardSpecs rbcspecs,
RBCId info 
)

Definition at line 17 of file RBCBasicConfig.cc.

17  :
18  RBCConfiguration(rbcspecs),
19  m_debug{false}
20 {
21 }

Member Function Documentation

bool RBCBasicConfig::initialise ( )
overridevirtual

Implements RBCConfiguration.

Definition at line 29 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.

Referenced by RBCBasicConfig().

30 {
31 
32  bool status(false);
33 
34  //. read specifications
35 
36  std::vector<RBCBoardSpecs::RBCBoardConfig>::const_iterator itr;
37  itr = m_rbcboardspecs->v_boardspecs.begin();
38 
39  // initialise logic unit
40  m_rbclogic->setlogic( (*itr).m_LogicType.c_str() );
41  status = m_rbclogic->initialise();
42 
43  m_rbclogic->setBoardSpecs( (*itr) );
44 
45  // get mask and force vectors
46 
47  m_vecmask.assign( (*itr).m_MaskedOrInput.begin(), (*itr).m_MaskedOrInput.end() );
48  m_vecforce.assign( (*itr).m_ForcedOrInput.begin(), (*itr).m_ForcedOrInput.end() );
49 
50  if ( !status ) {
51  if( m_debug ) std::cout << "RBCConfiguration> Problem initialising the logic unit\n";
52  return false; };
53 
54  return true;
55 
56 }
std::vector< int > m_vecforce
std::unique_ptr< RBCLogicUnit > m_rbclogic
std::vector< int > m_vecmask
std::vector< RBCBoardConfig > v_boardspecs
Definition: RBCBoardSpecs.h:43
const RBCBoardSpecs * m_rbcboardspecs
void RBCBasicConfig::preprocess ( RBCInput input)
overridevirtual

Implements RBCConfiguration.

Definition at line 58 of file RBCBasicConfig.cc.

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

Referenced by RBCBasicConfig().

59 {
60 
61  if( m_debug ) std::cout << "RBCBasicConfig::preprocess> starts here" << std::endl;
62 
63  input.mask( m_vecmask );
64  input.force( m_vecforce );
65 
66  if( m_debug ) std::cout << "RBCBasicConfig::preprocess> done" << std::endl;
67 
68 }
std::vector< int > m_vecforce
void mask(const std::vector< int > &)
Definition: RBCInput.cc:37
void force(const std::vector< int > &)
Definition: RBCInput.cc:52
std::vector< int > m_vecmask

Member Data Documentation

bool RBCBasicConfig::m_debug
private

Definition at line 34 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().

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

Definition at line 32 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().

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

Definition at line 31 of file RBCBasicConfig.h.

Referenced by initialise(), and preprocess().