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

#include <GlobalAlgBlk.h>

Public Member Functions

void copyInitialToPrescaled ()
 Copy vectors words. More...
 
void copyPrescaledToFinal ()
 
bool getAlgoDecisionFinal (unsigned int bit) const
 
bool getAlgoDecisionInitial (unsigned int bit) const
 Get decision bits. More...
 
bool getAlgoDecisionPreScaled (unsigned int bit) const
 
const int getbxInEventNr () const
 
const int getbxNr () const
 
const int getFinalOR () const
 
const int getOrbitNr () const
 get simple members More...
 
 GlobalAlgBlk ()
 constructors More...
 
 GlobalAlgBlk (int orbitNr, int bxNr, int bxInEvent)
 
void print (std::ostream &myCout) const
 pretty print the content of a GlobalAlgBlk More...
 
void reset ()
 reset the content of a GlobalAlgBlk More...
 
void setAlgoDecisionFinal (int bit, bool val)
 
void setAlgoDecisionInitial (int bit, bool val)
 Set decision bits. More...
 
void setAlgoDecisionPreScaled (int bit, bool val)
 
void setbxInEventNr (int bxNr)
 
void setbxNr (int bxNr)
 
void setFinalOR (int fOR)
 
void setOrbitNr (int orbNr)
 set simple members More...
 
virtual ~GlobalAlgBlk ()
 destructor More...
 

Private Attributes

std::vector< bool > m_algoDecisionFinal
 
std::vector< bool > m_algoDecisionInitial
 
std::vector< bool > m_algoDecisionPreScaled
 
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...
 
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 36 of file GlobalAlgBlk.h.

Constructor & Destructor Documentation

GlobalAlgBlk::GlobalAlgBlk ( )

constructors

Definition at line 51 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal, m_algoDecisionInitial, m_algoDecisionPreScaled, m_bxInEvent, m_bxNr, m_finalOR, m_orbitNr, and L1GlobalTriggerReadoutSetup::NumberPhysTriggers.

52 {
53 
54  //Clear out the header data
55  m_orbitNr=0;
56  m_bxNr=0;
57  m_bxInEvent=0;
58  m_finalOR=0;
59 
60  // Reserve/Clear out the decision words
63 
66 
69 
70 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:101
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:92
static const unsigned int NumberPhysTriggers
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:89
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:103
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
GlobalAlgBlk::GlobalAlgBlk ( int  orbitNr,
int  bxNr,
int  bxInEvent 
)

Definition at line 30 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal, m_algoDecisionInitial, m_algoDecisionPreScaled, 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 
43 
46 
47 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:101
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:92
static const unsigned int NumberPhysTriggers
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:89
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:103
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
GlobalAlgBlk::~GlobalAlgBlk ( )
virtual

destructor

Definition at line 75 of file GlobalAlgBlk.cc.

76 {
77 
78  // empty now
79 }

Member Function Documentation

void GlobalAlgBlk::copyInitialToPrescaled ( )
inline

Copy vectors words.

Definition at line 66 of file GlobalAlgBlk.h.

References m_algoDecisionInitial, and m_algoDecisionPreScaled.

std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:101
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
void GlobalAlgBlk::copyPrescaledToFinal ( )
inline

Definition at line 67 of file GlobalAlgBlk.h.

References m_algoDecisionFinal, and m_algoDecisionPreScaled.

std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:103
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
bool GlobalAlgBlk::getAlgoDecisionFinal ( unsigned int  bit) const

Definition at line 114 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal.

115 {
116  if(bit>=m_algoDecisionFinal.size()) return false;
117  return m_algoDecisionFinal.at(bit);
118 }
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:103
bool GlobalAlgBlk::getAlgoDecisionInitial ( unsigned int  bit) const

Get decision bits.

Definition at line 104 of file GlobalAlgBlk.cc.

References m_algoDecisionInitial.

105 {
106  if(bit>=m_algoDecisionInitial.size()) return false;
107  return m_algoDecisionInitial.at(bit);
108 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:101
bool GlobalAlgBlk::getAlgoDecisionPreScaled ( unsigned int  bit) const

Definition at line 109 of file GlobalAlgBlk.cc.

References m_algoDecisionPreScaled.

110 {
111  if(bit>=m_algoDecisionPreScaled.size()) return false;
112  return m_algoDecisionPreScaled.at(bit);
113 }
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
const int GlobalAlgBlk::getbxInEventNr ( ) const
inline

Definition at line 62 of file GlobalAlgBlk.h.

References m_bxInEvent.

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

Definition at line 61 of file GlobalAlgBlk.h.

References m_bxNr.

61 { return m_bxNr; }
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:92
const int GlobalAlgBlk::getFinalOR ( ) const
inline

Definition at line 63 of file GlobalAlgBlk.h.

References m_finalOR.

63 { return m_finalOR; }
const int GlobalAlgBlk::getOrbitNr ( ) const
inline

get simple members

Definition at line 60 of file GlobalAlgBlk.h.

References m_orbitNr.

60 { return m_orbitNr; }
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:89
void GlobalAlgBlk::print ( std::ostream &  myCout) const

pretty print the content of a GlobalAlgBlk

Definition at line 141 of file GlobalAlgBlk.cc.

References i, m_algoDecisionFinal, m_algoDecisionInitial, m_algoDecisionPreScaled, m_bxInEvent, m_bxNr, m_finalOR, and m_orbitNr.

142 {
143 
144 
145  myCout << " uGtGlobalAlgBlk: " << std::endl;
146 
147  myCout << " Orbit Number (hex): 0x" << std::hex << std::setw(8) << std::setfill('0') << m_orbitNr << std::endl;
148 
149  myCout << " Bx Number (hex): 0x" << std::hex << std::setw(4) << std::setfill('0') << m_bxNr << std::endl;
150 
151  myCout << " Local Bx (hex): 0x" << std::hex << std::setw(1) << std::setfill('0') << m_bxInEvent << std::endl;
152 
153  myCout << " Final OR (hex): Ox" << std::hex << std::setw(1) << std::setfill('0') << m_finalOR << std::endl;
154 
155  // Loop through bits to create a hex word of algorithm bits.
156  int lengthWd = m_algoDecisionInitial.size();
157  myCout << " Decision (Initial) 0x" << std::hex;
158  int digit = 0;
159  for(int i=lengthWd-1; i>-1; i--) {
160  if(m_algoDecisionInitial.at(i)) digit |= (1 << (i%4));
161  if((i%4) == 0){
162  myCout << std::hex << std::setw(1) << digit;
163  digit = 0;
164  }
165  } //end loop over algorithm bits
166  myCout << std::endl;
167 
168  // Loop through bits to create a hex word of algorithm bits.
169  lengthWd = m_algoDecisionPreScaled.size();
170  myCout << " Decision (Prescaled) 0x" << std::hex;
171  digit = 0;
172  for(int i=lengthWd-1; i>-1; i--) {
173  if(m_algoDecisionPreScaled.at(i)) digit |= (1 << (i%4));
174  if((i%4) == 0){
175  myCout << std::hex << std::setw(1) << digit;
176  digit = 0;
177  }
178  } //end loop over algorithm bits
179  myCout << std::endl;
180 
181 
182  // Loop through bits to create a hex word of algorithm bits.
183  lengthWd = m_algoDecisionFinal.size();
184  myCout << " Decision (Final) 0x" << std::hex;
185  digit = 0;
186  for(int i=lengthWd-1; i>-1; i--) {
187  if(m_algoDecisionFinal.at(i)) digit |= (1 << (i%4));
188  if((i%4) == 0){
189  myCout << std::hex << std::setw(1) << digit;
190  digit = 0;
191  }
192  } //end loop over algorithm bits
193  myCout << std::endl;
194 
195 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:101
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:92
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:89
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:103
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
void GlobalAlgBlk::reset ( void  )

reset the content of a GlobalAlgBlk

Definition at line 122 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal, m_algoDecisionInitial, m_algoDecisionPreScaled, m_bxInEvent, m_bxNr, m_finalOR, m_orbitNr, and L1GlobalTriggerReadoutSetup::NumberPhysTriggers.

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

123 {
124 
125  //Clear out the header data
126  m_orbitNr=0;
127  m_bxNr=0;
128  m_bxInEvent=0;
129  m_finalOR=0;
130 
131  // Clear out the decision words
132  // but leave the vector intact
136 
137 
138 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:101
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:92
static const unsigned int NumberPhysTriggers
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:89
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:103
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
void GlobalAlgBlk::setAlgoDecisionFinal ( int  bit,
bool  val 
)

Definition at line 98 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal.

Referenced by l1t::stage2::GlobalAlgBlkUnpacker::unpack().

99 {
100  m_algoDecisionFinal.at(bit) = val;
101 }
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:103
void GlobalAlgBlk::setAlgoDecisionInitial ( int  bit,
bool  val 
)

Set decision bits.

Definition at line 83 of file GlobalAlgBlk.cc.

References m_algoDecisionInitial.

84 {
85 // if(bit < m_algoDecisionInitial.size()) {
86 
87  m_algoDecisionInitial.at(bit) = val;
88 
89  // }
90  // Need some erorr checking here.
91 
92 
93 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:101
void GlobalAlgBlk::setAlgoDecisionPreScaled ( int  bit,
bool  val 
)

Definition at line 94 of file GlobalAlgBlk.cc.

References m_algoDecisionPreScaled.

95 {
96  m_algoDecisionPreScaled.at(bit) = val;
97 }
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:102
void GlobalAlgBlk::setbxInEventNr ( int  bxNr)
inline

Definition at line 56 of file GlobalAlgBlk.h.

References m_bxInEvent.

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

Definition at line 55 of file GlobalAlgBlk.h.

References m_bxNr.

55 { m_bxNr = bxNr; }
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:92
void GlobalAlgBlk::setFinalOR ( int  fOR)
inline

Definition at line 57 of file GlobalAlgBlk.h.

References m_finalOR.

Referenced by l1t::stage2::GlobalAlgBlkUnpacker::unpack().

57 { m_finalOR = fOR; }
void GlobalAlgBlk::setOrbitNr ( int  orbNr)
inline

set simple members

Definition at line 54 of file GlobalAlgBlk.h.

References m_orbitNr.

54 { m_orbitNr = orbNr; }
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:89

Member Data Documentation

std::vector<bool> GlobalAlgBlk::m_algoDecisionFinal
private
std::vector<bool> GlobalAlgBlk::m_algoDecisionInitial
private
std::vector<bool> GlobalAlgBlk::m_algoDecisionPreScaled
private
int GlobalAlgBlk::m_bxInEvent
private

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

Definition at line 95 of file GlobalAlgBlk.h.

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

int GlobalAlgBlk::m_bxNr
private

bunch cross number of the actual bx

Definition at line 92 of file GlobalAlgBlk.h.

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

int GlobalAlgBlk::m_finalOR
private

Definition at line 98 of file GlobalAlgBlk.h.

Referenced by getFinalOR(), GlobalAlgBlk(), print(), reset(), and setFinalOR().

int GlobalAlgBlk::m_orbitNr
private

orbit number

Definition at line 89 of file GlobalAlgBlk.h.

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