test
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...
 
- Public Member Functions inherited from RBCConfiguration
virtual ~RBCConfiguration ()
 

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 14 of file RBCBasicConfig.h.

Constructor & Destructor Documentation

RBCBasicConfig::RBCBasicConfig ( )
inline

Standard constructor.

Definition at line 17 of file RBCBasicConfig.h.

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

Definition at line 28 of file RBCBasicConfig.cc.

References RBCConfiguration::m_rbclogic.

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

Definition at line 17 of file RBCBasicConfig.cc.

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

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

Destructor.

Definition at line 36 of file RBCBasicConfig.cc.

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

36  {
37 
38  if ( m_rbcinfo ) delete m_rbcinfo;
39  if ( m_rbclogic ) delete m_rbclogic;
40 
41  m_vecmask.clear();
42  m_vecforce.clear();
43 
44 }
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 47 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.

48 {
49 
50  bool status(false);
51 
52  //. read specifications
53 
54  std::vector<RBCBoardSpecs::RBCBoardConfig>::const_iterator itr;
55  itr = m_rbcboardspecs->v_boardspecs.begin();
56 
57  // initialise logic unit
58  m_rbclogic->setlogic( (*itr).m_LogicType.c_str() );
60 
61  m_rbclogic->setBoardSpecs( (*itr) );
62 
63  // get mask and force vectors
64 
65  m_vecmask.assign( (*itr).m_MaskedOrInput.begin(), (*itr).m_MaskedOrInput.end() );
66  m_vecforce.assign( (*itr).m_ForcedOrInput.begin(), (*itr).m_ForcedOrInput.end() );
67 
68  if ( !status ) {
69  if( m_debug ) std::cout << "RBCConfiguration> Problem initialising the logic unit\n";
70  return 0; };
71 
72  return 1;
73 
74 }
void setBoardSpecs(const RBCBoardSpecs::RBCBoardConfig &)
Definition: RBCLogicUnit.cc:69
std::vector< int > m_vecforce
void setlogic(const char *)
Definition: RBCLogicUnit.cc:64
bool initialise()
Definition: RBCLogicUnit.cc:44
RBCLogicUnit * m_rbclogic
std::vector< int > m_vecmask
std::vector< RBCBoardConfig > v_boardspecs
Definition: RBCBoardSpecs.h:43
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 76 of file RBCBasicConfig.cc.

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

77 {
78 
79  if( m_debug ) std::cout << "RBCBasicConfig::preprocess> starts here" << std::endl;
80 
81  input.mask( m_vecmask );
82  input.force( m_vecforce );
83 
84  if( m_debug ) std::cout << "RBCBasicConfig::preprocess> done" << std::endl;
85 
86 }
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
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

bool RBCBasicConfig::m_debug
private

Definition at line 38 of file RBCBasicConfig.h.

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

RBCId* RBCBasicConfig::m_rbcinfo
private

Definition at line 33 of file RBCBasicConfig.h.

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

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

Definition at line 36 of file RBCBasicConfig.h.

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

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

Definition at line 35 of file RBCBasicConfig.h.

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