CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 ()
 
void preprocess (RBCInput &)
 
 RBCBasicConfig ()
 Standard constructor. More...
 
 RBCBasicConfig (const char *)
 
 RBCBasicConfig (const RBCBoardSpecs *, RBCId *)
 
virtual ~RBCBasicConfig ()
 Destructor. More...
 

Private Attributes

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

Additional Inherited Members

- Public Attributes inherited from RBCConfiguration
const RBCBoardSpecsm_rbcboardspecs
 
RBCBoardSpecs::RBCBoardConfigm_rbcconf
 
RBCLogicUnitm_rbclogic
 

Detailed Description

Author
Andres Osorio
Date
2008-10-29

Definition at line 15 of file RBCBasicConfig.h.

Constructor & Destructor Documentation

RBCBasicConfig::RBCBasicConfig ( )
inline

Standard constructor.

Definition at line 18 of file RBCBasicConfig.h.

18 {};
RBCBasicConfig::RBCBasicConfig ( const char *  _logic)

Definition at line 29 of file RBCBasicConfig.cc.

References RBCConfiguration::m_rbclogic.

29  {
30 
31  m_rbclogic = new RBCLogicUnit( _logic );
32 
33 }
RBCLogicUnit * m_rbclogic
RBCBasicConfig::RBCBasicConfig ( const RBCBoardSpecs rbcspecs,
RBCId info 
)

Definition at line 18 of file RBCBasicConfig.cc.

References m_debug, RBCConfiguration::m_rbcboardspecs, m_rbcinfo, and RBCConfiguration::m_rbclogic.

19 {
20 
21  m_rbcboardspecs = rbcspecs;
22  m_rbclogic = new RBCLogicUnit();
23  m_rbcinfo = new RBCId( *info );
24 
25  m_debug = false;
26 
27 }
Definition: RBCId.h:17
RBCLogicUnit * m_rbclogic
const RBCBoardSpecs * m_rbcboardspecs
RBCBasicConfig::~RBCBasicConfig ( )
virtual

Destructor.

Definition at line 37 of file RBCBasicConfig.cc.

References m_rbcinfo, RBCConfiguration::m_rbclogic, m_vecforce, and m_vecmask.

37  {
38 
39  if ( m_rbcinfo ) delete m_rbcinfo;
40  if ( m_rbclogic ) delete m_rbclogic;
41 
42  m_vecmask.clear();
43  m_vecforce.clear();
44 
45 }
std::vector< int > m_vecforce
RBCLogicUnit * m_rbclogic
std::vector< int > m_vecmask

Member Function Documentation

bool RBCBasicConfig::initialise ( )
virtual

Implements RBCConfiguration.

Definition at line 48 of file RBCBasicConfig.cc.

References gather_cfg::cout, RBCLogicUnit::initialise(), m_debug, RBCConfiguration::m_rbcboardspecs, RBCConfiguration::m_rbclogic, m_vecforce, m_vecmask, RBCLogicUnit::setBoardSpecs(), RBCLogicUnit::setlogic(), ntuplemaker::status, and RBCBoardSpecs::v_boardspecs.

49 {
50 
51  bool status(false);
52 
53  //. read specifications
54 
55  std::vector<RBCBoardSpecs::RBCBoardConfig>::const_iterator itr;
56  itr = m_rbcboardspecs->v_boardspecs.begin();
57 
58  // initialise logic unit
59  m_rbclogic->setlogic( (*itr).m_LogicType.c_str() );
61 
62  m_rbclogic->setBoardSpecs( (*itr) );
63 
64  // get mask and force vectors
65 
66  m_vecmask.assign( (*itr).m_MaskedOrInput.begin(), (*itr).m_MaskedOrInput.end() );
67  m_vecforce.assign( (*itr).m_ForcedOrInput.begin(), (*itr).m_ForcedOrInput.end() );
68 
69  if ( !status ) {
70  if( m_debug ) std::cout << "RBCConfiguration> Problem initialising the logic unit\n";
71  return 0; };
72 
73  return 1;
74 
75 }
void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig &)
Definition: RBCLogicUnit.cc:70
std::vector< int > m_vecforce
void setlogic(const char *)
Definition: RBCLogicUnit.cc:65
bool initialise()
Definition: RBCLogicUnit.cc:45
RBCLogicUnit * m_rbclogic
std::vector< int > m_vecmask
std::vector< RBCBoardConfig > v_boardspecs
Definition: RBCBoardSpecs.h:39
tuple cout
Definition: gather_cfg.py:121
tuple status
Definition: ntuplemaker.py:245
const RBCBoardSpecs * m_rbcboardspecs
void RBCBasicConfig::preprocess ( RBCInput input)
virtual

Implements RBCConfiguration.

Definition at line 77 of file RBCBasicConfig.cc.

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

78 {
79 
80  if( m_debug ) std::cout << "RBCBasicConfig::preprocess> starts here" << std::endl;
81 
82  input.mask( m_vecmask );
83  input.force( m_vecforce );
84 
85  if( m_debug ) std::cout << "RBCBasicConfig::preprocess> done" << std::endl;
86 
87 }
std::vector< int > m_vecforce
void mask(const std::vector< int > &)
Definition: RBCInput.cc:38
void force(const std::vector< int > &)
Definition: RBCInput.cc:53
std::vector< int > m_vecmask
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

bool RBCBasicConfig::m_debug
private

Definition at line 39 of file RBCBasicConfig.h.

Referenced by initialise(), preprocess(), and RBCBasicConfig().

RBCId* RBCBasicConfig::m_rbcinfo
private

Definition at line 34 of file RBCBasicConfig.h.

Referenced by RBCBasicConfig(), and ~RBCBasicConfig().

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

Definition at line 37 of file RBCBasicConfig.h.

Referenced by initialise(), preprocess(), and ~RBCBasicConfig().

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

Definition at line 36 of file RBCBasicConfig.h.

Referenced by initialise(), preprocess(), and ~RBCBasicConfig().