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 bool getFinalOR () const
 
const bool getFinalORPreVeto () const
 
const bool getFinalORVeto () const
 
const int getOrbitNr () const
 get simple members More...
 
const int getPreScColumn () const
 
 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 (unsigned int bit, bool val)
 
void setAlgoDecisionInitial (unsigned int bit, bool val)
 Set decision bits. More...
 
void setAlgoDecisionPreScaled (unsigned int bit, bool val)
 
void setbxInEventNr (int bxNr)
 
void setbxNr (int bxNr)
 
void setFinalOR (bool fOR)
 
void setFinalORPreVeto (bool fOR)
 
void setFinalORVeto (bool fOR)
 
void setOrbitNr (int orbNr)
 set simple members More...
 
void setPreScColumn (int psC)
 
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...
 
bool m_finalOR
 
bool m_finalORPreVeto
 
bool m_finalORVeto
 
int m_orbitNr
 orbit number More...
 
int m_preScColumn
 

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 54 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal, m_algoDecisionInitial, m_algoDecisionPreScaled, m_bxInEvent, m_bxNr, m_finalOR, m_finalORPreVeto, m_finalORVeto, m_orbitNr, m_preScColumn, and maxPhysicsTriggers.

55 {
56 
57  //Clear out the header data
58  m_orbitNr=0;
59  m_bxNr=0;
60  m_bxInEvent=0;
61  m_finalOR=0;
62  m_finalORPreVeto = 0;
63  m_finalORVeto = 0;
64  m_preScColumn=0;
65 
66  // Reserve/Clear out the decision words
69 
72 
75 
76 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:112
bool m_finalORPreVeto
Definition: GlobalAlgBlk.h:105
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:98
static const unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.cc:27
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:114
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:101
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:113
bool m_finalORVeto
Definition: GlobalAlgBlk.h:106
GlobalAlgBlk::GlobalAlgBlk ( int  orbitNr,
int  bxNr,
int  bxInEvent 
)

Definition at line 32 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal, m_algoDecisionInitial, m_algoDecisionPreScaled, m_finalOR, m_preScColumn, and maxPhysicsTriggers.

32  :
33  m_orbitNr(orbitNr), m_bxNr(bxNr), m_bxInEvent(bxInEvent)
34 {
35 
36  //Clear out the header data
37  m_finalOR=0;
38  m_preScColumn=0;
39 
40  // Reserve/Clear out the decision words
43 
46 
49 
50 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:112
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:98
static const unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.cc:27
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:114
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:101
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:113
GlobalAlgBlk::~GlobalAlgBlk ( )
virtual

destructor

Definition at line 81 of file GlobalAlgBlk.cc.

82 {
83 
84  // empty now
85 }

Member Function Documentation

void GlobalAlgBlk::copyInitialToPrescaled ( )
inline

Copy vectors words.

Definition at line 72 of file GlobalAlgBlk.h.

References m_algoDecisionInitial, and m_algoDecisionPreScaled.

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

Definition at line 73 of file GlobalAlgBlk.h.

References m_algoDecisionFinal, and m_algoDecisionPreScaled.

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

Definition at line 136 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal.

137 {
138  if(bit>=m_algoDecisionFinal.size()) return false;
139  return m_algoDecisionFinal.at(bit);
140 }
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:114
bool GlobalAlgBlk::getAlgoDecisionInitial ( unsigned int  bit) const

Get decision bits.

Definition at line 126 of file GlobalAlgBlk.cc.

References m_algoDecisionInitial.

127 {
128  if(bit>=m_algoDecisionInitial.size()) return false;
129  return m_algoDecisionInitial.at(bit);
130 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:112
bool GlobalAlgBlk::getAlgoDecisionPreScaled ( unsigned int  bit) const

Definition at line 131 of file GlobalAlgBlk.cc.

References m_algoDecisionPreScaled.

132 {
133  if(bit>=m_algoDecisionPreScaled.size()) return false;
134  return m_algoDecisionPreScaled.at(bit);
135 }
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:113
const int GlobalAlgBlk::getbxInEventNr ( ) const
inline

Definition at line 65 of file GlobalAlgBlk.h.

References m_bxInEvent.

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

Definition at line 64 of file GlobalAlgBlk.h.

References m_bxNr.

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

Definition at line 66 of file GlobalAlgBlk.h.

References m_finalOR.

66 { return m_finalOR; }
const bool GlobalAlgBlk::getFinalORPreVeto ( ) const
inline

Definition at line 67 of file GlobalAlgBlk.h.

References m_finalORPreVeto.

67 { return m_finalORPreVeto; };
bool m_finalORPreVeto
Definition: GlobalAlgBlk.h:105
const bool GlobalAlgBlk::getFinalORVeto ( ) const
inline

Definition at line 68 of file GlobalAlgBlk.h.

References m_finalORVeto.

68 { return m_finalORVeto; }
bool m_finalORVeto
Definition: GlobalAlgBlk.h:106
const int GlobalAlgBlk::getOrbitNr ( ) const
inline

get simple members

Definition at line 63 of file GlobalAlgBlk.h.

References m_orbitNr.

63 { return m_orbitNr; }
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:95
const int GlobalAlgBlk::getPreScColumn ( ) const
inline

Definition at line 69 of file GlobalAlgBlk.h.

References m_preScColumn.

69 { return m_preScColumn; }
void GlobalAlgBlk::print ( std::ostream &  myCout) const

pretty print the content of a GlobalAlgBlk

Definition at line 166 of file GlobalAlgBlk.cc.

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

167 {
168 
169 
170  myCout << " uGtGlobalAlgBlk: " << std::endl;
171 
172  myCout << " Orbit Number (hex): 0x" << std::hex << std::setw(8) << std::setfill('0') << m_orbitNr << std::endl;
173 
174  myCout << " Bx Number (hex): 0x" << std::hex << std::setw(4) << std::setfill('0') << m_bxNr << std::endl;
175 
176  myCout << " Local Bx (hex): 0x" << std::hex << std::setw(1) << std::setfill('0') << m_bxInEvent << std::endl;
177 
178  myCout << " PreScale Column: " <<std::setw(2) << m_preScColumn << std::endl;
179 
180  myCout << " Final OR Veto: " << std::hex << std::setw(1) << std::setfill('0') << m_finalORVeto << std::endl;
181 
182  myCout << " Final OR: " << std::hex << std::setw(1) << std::setfill('0') << m_finalOR << std::endl;
183 
184  // Loop through bits to create a hex word of algorithm bits.
185  int lengthWd = m_algoDecisionInitial.size();
186  myCout << " Decision (Initial) 0x" << std::hex;
187  int digit = 0;
188  for(int i=lengthWd-1; i>-1; i--) {
189  if(m_algoDecisionInitial.at(i)) digit |= (1 << (i%4));
190  if((i%4) == 0){
191  myCout << std::hex << std::setw(1) << digit;
192  digit = 0;
193  if(i%32 == 0 && i<lengthWd-1) myCout << " ";
194  }
195  } //end loop over algorithm bits
196  myCout << std::endl;
197 
198  // Loop through bits to create a hex word of algorithm bits.
199  lengthWd = m_algoDecisionPreScaled.size();
200  myCout << " Decision (Prescaled) 0x" << std::hex;
201  digit = 0;
202  for(int i=lengthWd-1; i>-1; i--) {
203  if(m_algoDecisionPreScaled.at(i)) digit |= (1 << (i%4));
204  if((i%4) == 0){
205  myCout << std::hex << std::setw(1) << digit;
206  digit = 0;
207  if(i%32 == 0 && i<lengthWd-1) myCout << " ";
208  }
209  } //end loop over algorithm bits
210  myCout << std::endl;
211 
212 
213  // Loop through bits to create a hex word of algorithm bits.
214  lengthWd = m_algoDecisionFinal.size();
215  myCout << " Decision (Final) 0x" << std::hex;
216  digit = 0;
217  for(int i=lengthWd-1; i>-1; i--) {
218  if(m_algoDecisionFinal.at(i)) digit |= (1 << (i%4));
219  if((i%4) == 0){
220  myCout << std::hex << std::setw(1) << digit;
221  digit = 0;
222  if(i%32 == 0 && i<lengthWd-1) myCout << " ";
223  }
224  } //end loop over algorithm bits
225  myCout << std::endl;
226 
227 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:112
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:98
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:114
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:101
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:113
bool m_finalORVeto
Definition: GlobalAlgBlk.h:106
void GlobalAlgBlk::reset ( void  )

reset the content of a GlobalAlgBlk

Definition at line 144 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal, m_algoDecisionInitial, m_algoDecisionPreScaled, m_bxInEvent, m_bxNr, m_finalOR, m_finalORPreVeto, m_finalORVeto, m_orbitNr, m_preScColumn, and maxPhysicsTriggers.

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

145 {
146 
147  //Clear out the header data
148  m_orbitNr=0;
149  m_bxNr=0;
150  m_bxInEvent=0;
151  m_finalOR=0;
152  m_finalORPreVeto = 0;
153  m_finalORVeto = 0;
154  m_preScColumn=0;
155 
156  // Clear out the decision words
157  // but leave the vector intact
161 
162 
163 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:112
bool m_finalORPreVeto
Definition: GlobalAlgBlk.h:105
int m_bxNr
bunch cross number of the actual bx
Definition: GlobalAlgBlk.h:98
static const unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.cc:27
int m_orbitNr
orbit number
Definition: GlobalAlgBlk.h:95
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:114
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:101
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:113
bool m_finalORVeto
Definition: GlobalAlgBlk.h:106
void GlobalAlgBlk::setAlgoDecisionFinal ( unsigned int  bit,
bool  val 
)

Definition at line 113 of file GlobalAlgBlk.cc.

References LogTrace, and m_algoDecisionFinal.

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

114 {
115 
116  if(bit < m_algoDecisionFinal.size()) {
117  m_algoDecisionFinal.at(bit) = val;
118  } else {
119  // Need some erorr checking here.
120  LogTrace("L1TGlobal") << "Attempting to set an algorithm bit " << bit << " beyond limit " << m_algoDecisionFinal.size();
121  }
122 
123 }
#define LogTrace(id)
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:114
void GlobalAlgBlk::setAlgoDecisionInitial ( unsigned int  bit,
bool  val 
)

Set decision bits.

Definition at line 89 of file GlobalAlgBlk.cc.

References LogTrace, and m_algoDecisionInitial.

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

90 {
91  if(bit < m_algoDecisionInitial.size()) {
92 
93  m_algoDecisionInitial.at(bit) = val;
94 
95  } else {
96  // Need some erorr checking here.
97  LogTrace("L1TGlobal") << "Attempting to set an algorithm bit " << bit << " beyond limit " << m_algoDecisionInitial.size();
98  }
99 
100 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:112
#define LogTrace(id)
void GlobalAlgBlk::setAlgoDecisionPreScaled ( unsigned int  bit,
bool  val 
)

Definition at line 101 of file GlobalAlgBlk.cc.

References LogTrace, and m_algoDecisionPreScaled.

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

102 {
103 
104  if(bit < m_algoDecisionPreScaled.size()) {
105 
106  m_algoDecisionPreScaled.at(bit) = val;
107  } else {
108  // Need some erorr checking here.
109  LogTrace("L1TGlobal") << "Attempting to set an algorithm bit " << bit << " beyond limit " << m_algoDecisionPreScaled.size();
110  }
111 
112 }
#define LogTrace(id)
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:113
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:101
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:98
void GlobalAlgBlk::setFinalOR ( bool  fOR)
inline

Definition at line 59 of file GlobalAlgBlk.h.

References m_finalOR.

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

59 { m_finalOR = fOR; }
void GlobalAlgBlk::setFinalORPreVeto ( bool  fOR)
inline

Definition at line 58 of file GlobalAlgBlk.h.

References m_finalORPreVeto.

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

58 { m_finalORPreVeto = fOR; }
bool m_finalORPreVeto
Definition: GlobalAlgBlk.h:105
void GlobalAlgBlk::setFinalORVeto ( bool  fOR)
inline

Definition at line 57 of file GlobalAlgBlk.h.

References m_finalORVeto.

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

57 { m_finalORVeto = fOR; }
bool m_finalORVeto
Definition: GlobalAlgBlk.h:106
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:95
void GlobalAlgBlk::setPreScColumn ( int  psC)
inline

Definition at line 60 of file GlobalAlgBlk.h.

References m_preScColumn.

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

60 { m_preScColumn = psC; }

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 101 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 98 of file GlobalAlgBlk.h.

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

bool GlobalAlgBlk::m_finalOR
private

Definition at line 104 of file GlobalAlgBlk.h.

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

bool GlobalAlgBlk::m_finalORPreVeto
private

Definition at line 105 of file GlobalAlgBlk.h.

Referenced by getFinalORPreVeto(), GlobalAlgBlk(), reset(), and setFinalORPreVeto().

bool GlobalAlgBlk::m_finalORVeto
private

Definition at line 106 of file GlobalAlgBlk.h.

Referenced by getFinalORVeto(), GlobalAlgBlk(), print(), reset(), and setFinalORVeto().

int GlobalAlgBlk::m_orbitNr
private

orbit number

Definition at line 95 of file GlobalAlgBlk.h.

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

int GlobalAlgBlk::m_preScColumn
private

Definition at line 109 of file GlobalAlgBlk.h.

Referenced by getPreScColumn(), GlobalAlgBlk(), print(), reset(), and setPreScColumn().