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
GlobalExtBlk Class Reference

#include <GlobalExtBlk.h>

Public Member Functions

const int getbxInEventNr () const
 
const int getbxNr () const
 
bool getExternalDecision (unsigned int bit) const
 Get decision bits. More...
 
const int getFinalOR () const
 
const int getOrbitNr () const
 get simple members More...
 
 GlobalExtBlk ()
 constructors More...
 
 GlobalExtBlk (int orbitNr, int bxNr, int bxInEvent)
 
void print (std::ostream &myCout) const
 pretty print the content of a GlobalExtBlk More...
 
void reset ()
 reset the content of a GlobalExtBlk More...
 
void setbxInEventNr (int bxNr)
 
void setbxNr (int bxNr)
 
void setExternalDecision (int bit, bool val)
 Set decision bits. More...
 
void setFinalOR (int fOR)
 
void setOrbitNr (int orbNr)
 set simple members More...
 
virtual ~GlobalExtBlk ()
 destructor More...
 

Private Attributes

int m_bxInEvent
 bunch cross in the GT event record (E,F,0,1,2) More...
 
int m_bxNr
 bunch cross number of the actual bx More...
 
std::vector< bool > m_extDecision
 
int m_finalOR
 
int m_orbitNr
 orbit number More...
 

Detailed Description

Description: L1 micro Global Trigger - Block holding Algorithm Information

Implementation: <TODO: enter implementation details>

Author
: Brian Winer - Ohio State

Description: see header file.

Implementation: <TODO: enter implementation details>

Author
: Brian Winer – Ohio State

Definition at line 35 of file GlobalExtBlk.h.

Constructor & Destructor Documentation

GlobalExtBlk::GlobalExtBlk ( )

constructors

Definition at line 45 of file GlobalExtBlk.cc.

References m_bxInEvent, m_bxNr, m_extDecision, m_finalOR, m_orbitNr, and L1GlobalTriggerReadoutSetup::NumberPhysTriggers.

46 {
47 
48  //Clear out the header data
49  m_orbitNr=0;
50  m_bxNr=0;
51  m_bxInEvent=0;
52  m_finalOR=0;
53 
54  // Reserve/Clear out the decision words
57 
58 }
static const unsigned int NumberPhysTriggers
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalExtBlk.h:84
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalExtBlk.h:81
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:90
int m_orbitNr
orbit number
Definition: GlobalExtBlk.h:78
GlobalExtBlk::GlobalExtBlk ( int  orbitNr,
int  bxNr,
int  bxInEvent 
)

Definition at line 30 of file GlobalExtBlk.cc.

References m_extDecision, m_finalOR, and L1GlobalTriggerReadoutSetup::NumberPhysTriggers.

30  :
31  m_orbitNr(orbitNr), m_bxNr(bxNr), m_bxInEvent(bxInEvent)
32 {
33 
34  //Clear out the header data
35  m_finalOR=0;
36 
37  // Reserve/Clear out the decision words
40 
41 }
static const unsigned int NumberPhysTriggers
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalExtBlk.h:84
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalExtBlk.h:81
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:90
int m_orbitNr
orbit number
Definition: GlobalExtBlk.h:78
GlobalExtBlk::~GlobalExtBlk ( )
virtual

destructor

Definition at line 63 of file GlobalExtBlk.cc.

64 {
65 
66  // empty now
67 }

Member Function Documentation

const int GlobalExtBlk::getbxInEventNr ( ) const
inline

Definition at line 59 of file GlobalExtBlk.h.

References m_bxInEvent.

59 { return m_bxInEvent; }
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalExtBlk.h:84
const int GlobalExtBlk::getbxNr ( ) const
inline

Definition at line 58 of file GlobalExtBlk.h.

References m_bxNr.

58 { return m_bxNr; }
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalExtBlk.h:81
bool GlobalExtBlk::getExternalDecision ( unsigned int  bit) const

Get decision bits.

Definition at line 84 of file GlobalExtBlk.cc.

References m_extDecision.

85 {
86  if(bit>=m_extDecision.size()) return false;
87  return m_extDecision.at(bit);
88 }
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:90
const int GlobalExtBlk::getFinalOR ( ) const
inline

Definition at line 60 of file GlobalExtBlk.h.

References m_finalOR.

60 { return m_finalOR; }
const int GlobalExtBlk::getOrbitNr ( ) const
inline

get simple members

Definition at line 57 of file GlobalExtBlk.h.

References m_orbitNr.

57 { return m_orbitNr; }
int m_orbitNr
orbit number
Definition: GlobalExtBlk.h:78
void GlobalExtBlk::print ( std::ostream &  myCout) const

pretty print the content of a GlobalExtBlk

Definition at line 109 of file GlobalExtBlk.cc.

References i, m_bxInEvent, m_bxNr, m_extDecision, and m_orbitNr.

110 {
111 
112  myCout << " GlobalExtBlk " << std::endl;
113 
114  myCout << " Orbit Number (hex): 0x" << std::hex << std::setw(8) << std::setfill('0') << m_orbitNr << std::endl;
115 
116  myCout << " Bx Number (hex): 0x" << std::hex << std::setw(4) << std::setfill('0') << m_bxNr << std::endl;
117 
118  myCout << " Local Bx (hex): 0x" << std::hex << std::setw(1) << std::setfill('0') << m_bxInEvent << std::endl;
119 
120  // Loop through bits to create a hex word of algorithm bits.
121  int lengthWd = m_extDecision.size();
122  myCout << " External Condition 0x" << std::hex;
123  int digit = 0;
124  for(int i=lengthWd-1; i>-1; i--) {
125  if(m_extDecision.at(i)) digit |= (1 << (i%4));
126  if((i%4) == 0){
127  myCout << std::hex << std::setw(1) << digit;
128  digit = 0;
129  }
130  } //end loop over algorithm bits
131  myCout << std::endl;
132 
133 }
int i
Definition: DBlmapReader.cc:9
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalExtBlk.h:84
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalExtBlk.h:81
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:90
int m_orbitNr
orbit number
Definition: GlobalExtBlk.h:78
void GlobalExtBlk::reset ( void  )

reset the content of a GlobalExtBlk

Definition at line 92 of file GlobalExtBlk.cc.

References m_bxInEvent, m_bxNr, m_extDecision, m_finalOR, m_orbitNr, and L1GlobalTriggerReadoutSetup::NumberPhysTriggers.

Referenced by l1t::GtBoard::GtBoard().

93 {
94 
95  //Clear out the header data
96  m_orbitNr=0;
97  m_bxNr=0;
98  m_bxInEvent=0;
99  m_finalOR=0;
100 
101  // Clear out the decision words
102  // but leave the vector intact
104 
105 
106 }
static const unsigned int NumberPhysTriggers
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalExtBlk.h:84
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalExtBlk.h:81
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:90
int m_orbitNr
orbit number
Definition: GlobalExtBlk.h:78
void GlobalExtBlk::setbxInEventNr ( int  bxNr)
inline

Definition at line 53 of file GlobalExtBlk.h.

References m_bxInEvent.

53 { m_bxInEvent = bxNr; }
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalExtBlk.h:84
void GlobalExtBlk::setbxNr ( int  bxNr)
inline

Definition at line 52 of file GlobalExtBlk.h.

References m_bxNr.

52 { m_bxNr = bxNr; }
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalExtBlk.h:81
void GlobalExtBlk::setExternalDecision ( int  bit,
bool  val 
)

Set decision bits.

Definition at line 71 of file GlobalExtBlk.cc.

References m_extDecision.

72 {
73 // if(bit < m_algoDecision.size()) {
74 
75  m_extDecision.at(bit) = val;
76 
77 // }
78  // Need some erorr checking here.
79 
80 }
std::vector< bool > m_extDecision
Definition: GlobalExtBlk.h:90
void GlobalExtBlk::setFinalOR ( int  fOR)
inline

Definition at line 54 of file GlobalExtBlk.h.

References m_finalOR.

54 { m_finalOR = fOR; }
void GlobalExtBlk::setOrbitNr ( int  orbNr)
inline

set simple members

Definition at line 51 of file GlobalExtBlk.h.

References m_orbitNr.

51 { m_orbitNr = orbNr; }
int m_orbitNr
orbit number
Definition: GlobalExtBlk.h:78

Member Data Documentation

int GlobalExtBlk::m_bxInEvent
private

bunch cross in the GT event record (E,F,0,1,2)

Definition at line 84 of file GlobalExtBlk.h.

Referenced by getbxInEventNr(), GlobalExtBlk(), print(), reset(), and setbxInEventNr().

int GlobalExtBlk::m_bxNr
private

bunch cross number of the actual bx

Definition at line 81 of file GlobalExtBlk.h.

Referenced by getbxNr(), GlobalExtBlk(), print(), reset(), and setbxNr().

std::vector<bool> GlobalExtBlk::m_extDecision
private

Definition at line 90 of file GlobalExtBlk.h.

Referenced by getExternalDecision(), GlobalExtBlk(), print(), reset(), and setExternalDecision().

int GlobalExtBlk::m_finalOR
private

Definition at line 87 of file GlobalExtBlk.h.

Referenced by getFinalOR(), GlobalExtBlk(), reset(), and setFinalOR().

int GlobalExtBlk::m_orbitNr
private

orbit number

Definition at line 78 of file GlobalExtBlk.h.

Referenced by getOrbitNr(), GlobalExtBlk(), print(), reset(), and setOrbitNr().