CMS 3D CMS Logo

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

#include <RBCLogicUnit.h>

Inheritance diagram for RBCLogicUnit:
RPCLogicUnit

Public Member Functions

std::bitset< 6 > * getlayersignal (int _idx)
 
bool initialise ()
 
bool isTriggered ()
 
 RBCLogicUnit ()
 Standard constructor. More...
 
 RBCLogicUnit (const char *)
 
void run (const RBCInput &, std::bitset< 2 > &)
 
void setBoardSpecs (const RBCBoardSpecs::RBCBoardConfig &)
 
void setlogic (const char *)
 
 ~RBCLogicUnit () override
 Destructor. More...
 
- Public Member Functions inherited from RPCLogicUnit
 RPCLogicUnit ()
 Standard constructor. More...
 
 RPCLogicUnit (int, int, int)
 
virtual ~RPCLogicUnit ()
 Destructor. More...
 

Private Attributes

bool m_debug
 
std::bitset< 6 > * m_layersignal [2]
 
std::unique_ptr< RBCLogicm_logic
 
std::string m_logtype
 

Additional Inherited Members

- Public Attributes inherited from RPCLogicUnit
int m_propA
 
int m_propB
 
int m_propC
 

Detailed Description

Author
Andres Osorio
Date
2008-10-25

Definition at line 19 of file RBCLogicUnit.h.

Constructor & Destructor Documentation

◆ RBCLogicUnit() [1/2]

RBCLogicUnit::RBCLogicUnit ( )

Standard constructor.

Definition at line 15 of file RBCLogicUnit.cc.

15 : RPCLogicUnit(), m_debug{false} {}
RPCLogicUnit()
Standard constructor.
Definition: RPCLogicUnit.h:16

◆ RBCLogicUnit() [2/2]

RBCLogicUnit::RBCLogicUnit ( const char *  logic_type)

Definition at line 17 of file RBCLogicUnit.cc.

17 : RPCLogicUnit(), m_logtype{logic_type}, m_debug{false} {}
RPCLogicUnit()
Standard constructor.
Definition: RPCLogicUnit.h:16
std::string m_logtype
Definition: RBCLogicUnit.h:38

◆ ~RBCLogicUnit()

RBCLogicUnit::~RBCLogicUnit ( )
override

Destructor.

Definition at line 21 of file RBCLogicUnit.cc.

21 {}

Member Function Documentation

◆ getlayersignal()

std::bitset<6>* RBCLogicUnit::getlayersignal ( int  _idx)
inline

Definition at line 36 of file RBCLogicUnit.h.

References m_layersignal.

36 { return m_layersignal[_idx]; };
std::bitset< 6 > * m_layersignal[2]
Definition: RBCLogicUnit.h:44

◆ initialise()

bool RBCLogicUnit::initialise ( )

Definition at line 24 of file RBCLogicUnit.cc.

References gather_cfg::cout, m_debug, m_logic, m_logtype, and LogicTool< GenLogic >::retrieve().

24  {
25  LogicTool<RBCLogic> logtool;
26 
27  m_logic = logtool.retrieve(m_logtype);
28 
29  if (!m_logic) {
30  if (m_debug)
31  std::cout << "RBCLogicUnit> No logic found \n";
32  return false;
33  };
34 
35  return true;
36 }
std::unique_ptr< RBCLogic > m_logic
Definition: RBCLogicUnit.h:46
std::string m_logtype
Definition: RBCLogicUnit.h:38
std::unique_ptr< GenLogic > retrieve(const std::string &_logic_name)
...
Definition: LogicTool.h:29

◆ isTriggered()

bool RBCLogicUnit::isTriggered ( )
inline

Definition at line 38 of file RBCLogicUnit.h.

38 { return m_logic->m_triggersignal; };
std::unique_ptr< RBCLogic > m_logic
Definition: RBCLogicUnit.h:46

◆ run()

void RBCLogicUnit::run ( const RBCInput _input,
std::bitset< 2 > &  _decision 
)

Definition at line 42 of file RBCLogicUnit.cc.

References m_layersignal, and m_logic.

42  {
43  m_logic->process(_input, _decision);
44  m_layersignal[0] = m_logic->getlayersignal(0);
45  m_layersignal[1] = m_logic->getlayersignal(1);
46 }
std::unique_ptr< RBCLogic > m_logic
Definition: RBCLogicUnit.h:46
std::bitset< 6 > * m_layersignal[2]
Definition: RBCLogicUnit.h:44

◆ setBoardSpecs()

void RBCLogicUnit::setBoardSpecs ( const RBCBoardSpecs::RBCBoardConfig specs)

Definition at line 40 of file RBCLogicUnit.cc.

References m_logic, and HistogramManager_cfi::specs.

40 { m_logic->setBoardSpecs(specs); }
std::unique_ptr< RBCLogic > m_logic
Definition: RBCLogicUnit.h:46

◆ setlogic()

void RBCLogicUnit::setlogic ( const char *  _logic)

Member Data Documentation

◆ m_debug

bool RBCLogicUnit::m_debug
private

Definition at line 48 of file RBCLogicUnit.h.

Referenced by initialise().

◆ m_layersignal

std::bitset<6>* RBCLogicUnit::m_layersignal[2]
private

Definition at line 44 of file RBCLogicUnit.h.

Referenced by getlayersignal(), and run().

◆ m_logic

std::unique_ptr<RBCLogic> RBCLogicUnit::m_logic
private

Definition at line 46 of file RBCLogicUnit.h.

Referenced by initialise(), run(), and setBoardSpecs().

◆ m_logtype

std::string RBCLogicUnit::m_logtype
private

Definition at line 38 of file RBCLogicUnit.h.

Referenced by initialise(), and setlogic().