CMS 3D CMS Logo

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

#include <GlobalAlgBlk.h>

Public Member Functions

void copyInitialToInterm ()
 Copy vectors words. More...
 
void copyIntermToFinal ()
 
std::vector< bool > const & getAlgoDecisionFinal () const
 
bool getAlgoDecisionFinal (unsigned int bit) const
 
std::vector< bool > const & getAlgoDecisionInitial () const
 Get decision bits. More...
 
bool getAlgoDecisionInitial (unsigned int bit) const
 Get decision bits. More...
 
std::vector< bool > const & getAlgoDecisionInterm () const
 
bool getAlgoDecisionInterm (unsigned int bit) const
 
const int getbxInEventNr () const
 
const bool getFinalOR () const
 
const bool getFinalORPreVeto () const
 
const bool getFinalORVeto () const
 
const int getL1FirmwareUUID () const
 
const int getL1MenuUUID () 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 setAlgoDecisionInterm (unsigned int bit, bool val)
 
void setbxInEventNr (int bxNr)
 
void setFinalOR (bool fOR)
 
void setFinalORPreVeto (bool fOR)
 
void setFinalORVeto (bool fOR)
 
void setL1FirmwareUUID (int fuuid)
 
void setL1MenuUUID (int uuid)
 set simple members More...
 
void setPreScColumn (int psC)
 
virtual ~GlobalAlgBlk ()
 destructor More...
 

Static Public Attributes

static const unsigned int maxPhysicsTriggers = 512
 

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 -> L1FirmwareUUID More...
 
bool m_finalOR
 
bool m_finalORPreVeto
 
bool m_finalORVeto
 
int m_orbitNr
 orbit number -> L1MenuUUID 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 53 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.

54 {
55 
56  //Clear out the header data
57  m_orbitNr=0;
58  m_bxNr=0;
59  m_bxInEvent=0;
60  m_finalOR=0;
61  m_finalORPreVeto = 0;
62  m_finalORVeto = 0;
63  m_preScColumn=0;
64 
65  // Reserve/Clear out the decision words
68 
71 
74 
75 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:124
bool m_finalORPreVeto
Definition: GlobalAlgBlk.h:117
int m_bxNr
bunch cross number of the actual bx -> L1FirmwareUUID
Definition: GlobalAlgBlk.h:110
static const unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.h:52
int m_orbitNr
orbit number -> L1MenuUUID
Definition: GlobalAlgBlk.h:107
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:126
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:113
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:125
bool m_finalORVeto
Definition: GlobalAlgBlk.h:118
GlobalAlgBlk::GlobalAlgBlk ( int  orbitNr,
int  bxNr,
int  bxInEvent 
)

Definition at line 31 of file GlobalAlgBlk.cc.

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

31  :
32  m_orbitNr(orbitNr), m_bxNr(bxNr), m_bxInEvent(bxInEvent)
33 {
34 
35  //Clear out the header data
36  m_finalOR=0;
37  m_preScColumn=0;
38 
39  // Reserve/Clear out the decision words
42 
45 
48 
49 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:124
int m_bxNr
bunch cross number of the actual bx -> L1FirmwareUUID
Definition: GlobalAlgBlk.h:110
static const unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.h:52
int m_orbitNr
orbit number -> L1MenuUUID
Definition: GlobalAlgBlk.h:107
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:126
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:113
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:125
GlobalAlgBlk::~GlobalAlgBlk ( )
virtual

destructor

Definition at line 80 of file GlobalAlgBlk.cc.

81 {
82 
83  // empty now
84 }

Member Function Documentation

void GlobalAlgBlk::copyInitialToInterm ( )
inline

Copy vectors words.

Definition at line 73 of file GlobalAlgBlk.h.

References m_algoDecisionInitial, and m_algoDecisionPreScaled.

Referenced by l1t::GlobalBoard::runFDL().

std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:124
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:125
void GlobalAlgBlk::copyIntermToFinal ( )
inline
std::vector<bool> const& GlobalAlgBlk::getAlgoDecisionFinal ( ) const
inline
bool GlobalAlgBlk::getAlgoDecisionFinal ( unsigned int  bit) const

Definition at line 135 of file GlobalAlgBlk.cc.

References m_algoDecisionFinal.

136 {
137  if(bit>=m_algoDecisionFinal.size()) return false;
138  return m_algoDecisionFinal.at(bit);
139 }
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:126
std::vector<bool> const& GlobalAlgBlk::getAlgoDecisionInitial ( ) const
inline

Get decision bits.

Definition at line 82 of file GlobalAlgBlk.h.

References m_algoDecisionInitial.

Referenced by getAlgoDecisionFinal(), and l1t::GlobalBoard::runFDL().

82  {
83  return m_algoDecisionInitial;
84  }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:124
bool GlobalAlgBlk::getAlgoDecisionInitial ( unsigned int  bit) const

Get decision bits.

Definition at line 125 of file GlobalAlgBlk.cc.

References m_algoDecisionInitial.

126 {
127  if(bit>=m_algoDecisionInitial.size()) return false;
128  return m_algoDecisionInitial.at(bit);
129 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:124
std::vector<bool> const& GlobalAlgBlk::getAlgoDecisionInterm ( ) const
inline

Definition at line 85 of file GlobalAlgBlk.h.

References m_algoDecisionPreScaled.

Referenced by getAlgoDecisionFinal(), and l1t::GlobalBoard::runFDL().

85  {
87  }
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:125
bool GlobalAlgBlk::getAlgoDecisionInterm ( unsigned int  bit) const

Definition at line 130 of file GlobalAlgBlk.cc.

References m_algoDecisionPreScaled.

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

Definition at line 66 of file GlobalAlgBlk.h.

References m_bxInEvent.

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

Definition at line 67 of file GlobalAlgBlk.h.

References m_finalOR.

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

Definition at line 68 of file GlobalAlgBlk.h.

References m_finalORPreVeto.

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

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

Definition at line 69 of file GlobalAlgBlk.h.

References m_finalORVeto.

Referenced by L1TGlobalPrescaler::filter(), and l1t::stage2::GlobalAlgBlkUnpacker::unpack().

69 { return m_finalORVeto; }
bool m_finalORVeto
Definition: GlobalAlgBlk.h:118
const int GlobalAlgBlk::getL1FirmwareUUID ( ) const
inline

Definition at line 65 of file GlobalAlgBlk.h.

References m_bxNr.

65 { return m_bxNr; }
int m_bxNr
bunch cross number of the actual bx -> L1FirmwareUUID
Definition: GlobalAlgBlk.h:110
const int GlobalAlgBlk::getL1MenuUUID ( ) const
inline

get simple members

Definition at line 64 of file GlobalAlgBlk.h.

References m_orbitNr.

64 { return m_orbitNr; }
int m_orbitNr
orbit number -> L1MenuUUID
Definition: GlobalAlgBlk.h:107
const int GlobalAlgBlk::getPreScColumn ( ) const
inline

Definition at line 70 of file GlobalAlgBlk.h.

References m_preScColumn.

Referenced by PSMonitor::analyze(), and L1TGlobalPrescaler::filter().

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

pretty print the content of a GlobalAlgBlk

Definition at line 165 of file GlobalAlgBlk.cc.

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

Referenced by getAlgoDecisionFinal().

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

reset the content of a GlobalAlgBlk

Definition at line 143 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 getAlgoDecisionFinal(), l1t::GlobalBoard::GlobalBoard(), l1t::GlobalBoard::init(), l1t::GlobalBoard::reset(), and l1t::GlobalBoard::runGTL().

144 {
145 
146  //Clear out the header data
147  m_orbitNr=0;
148  m_bxNr=0;
149  m_bxInEvent=0;
150  m_finalOR=0;
151  m_finalORPreVeto = 0;
152  m_finalORVeto = 0;
153  m_preScColumn=0;
154 
155  // Clear out the decision words
156  // but leave the vector intact
160 
161 
162 }
std::vector< bool > m_algoDecisionInitial
Definition: GlobalAlgBlk.h:124
bool m_finalORPreVeto
Definition: GlobalAlgBlk.h:117
int m_bxNr
bunch cross number of the actual bx -> L1FirmwareUUID
Definition: GlobalAlgBlk.h:110
static const unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.h:52
int m_orbitNr
orbit number -> L1MenuUUID
Definition: GlobalAlgBlk.h:107
std::vector< bool > m_algoDecisionFinal
Definition: GlobalAlgBlk.h:126
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:113
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:125
bool m_finalORVeto
Definition: GlobalAlgBlk.h:118
void GlobalAlgBlk::setAlgoDecisionFinal ( unsigned int  bit,
bool  val 
)

Definition at line 112 of file GlobalAlgBlk.cc.

References LogTrace, m_algoDecisionFinal, and heppy_batch::val.

Referenced by copyIntermToFinal(), L1TGlobalPrescaler::filter(), l1t::GlobalBoard::runFDL(), and l1t::stage2::GlobalAlgBlkUnpacker::unpack().

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

Set decision bits.

Definition at line 88 of file GlobalAlgBlk.cc.

References LogTrace, m_algoDecisionInitial, and heppy_batch::val.

Referenced by copyIntermToFinal(), l1t::GlobalBoard::runGTL(), and l1t::stage2::GlobalAlgBlkUnpacker::unpack().

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

Definition at line 100 of file GlobalAlgBlk.cc.

References LogTrace, m_algoDecisionPreScaled, and heppy_batch::val.

Referenced by copyIntermToFinal(), l1t::GlobalBoard::runFDL(), and l1t::stage2::GlobalAlgBlkUnpacker::unpack().

101 {
102 
103  if(bit < m_algoDecisionPreScaled.size()) {
104 
105  m_algoDecisionPreScaled.at(bit) = val;
106  } else {
107  // Need some erorr checking here.
108  LogTrace("L1TGlobal") << "Attempting to set an algorithm bit " << bit << " beyond limit " << m_algoDecisionPreScaled.size();
109  }
110 
111 }
#define LogTrace(id)
std::vector< bool > m_algoDecisionPreScaled
Definition: GlobalAlgBlk.h:125
void GlobalAlgBlk::setbxInEventNr ( int  bxNr)
inline

Definition at line 57 of file GlobalAlgBlk.h.

References m_bxInEvent.

Referenced by l1t::GlobalBoard::fillAlgRecord().

57 { m_bxInEvent = bxNr; }
int m_bxInEvent
bunch cross in the GT event record (E,F,0,1,2)
Definition: GlobalAlgBlk.h:113
void GlobalAlgBlk::setFinalOR ( bool  fOR)
inline
void GlobalAlgBlk::setFinalORPreVeto ( bool  fOR)
inline
void GlobalAlgBlk::setFinalORVeto ( bool  fOR)
inline

Definition at line 58 of file GlobalAlgBlk.h.

References m_finalORVeto.

Referenced by l1t::GlobalBoard::fillAlgRecord(), and l1t::stage2::GlobalAlgBlkUnpacker::unpack().

58 { m_finalORVeto = fOR; }
bool m_finalORVeto
Definition: GlobalAlgBlk.h:118
void GlobalAlgBlk::setL1FirmwareUUID ( int  fuuid)
inline

Definition at line 56 of file GlobalAlgBlk.h.

References m_bxNr.

Referenced by l1t::GlobalBoard::fillAlgRecord(), and l1t::stage2::GlobalAlgBlkUnpacker::unpack().

56 { m_bxNr = fuuid; }
int m_bxNr
bunch cross number of the actual bx -> L1FirmwareUUID
Definition: GlobalAlgBlk.h:110
void GlobalAlgBlk::setL1MenuUUID ( int  uuid)
inline

set simple members

Definition at line 55 of file GlobalAlgBlk.h.

References m_orbitNr, and createPayload::uuid.

Referenced by l1t::GlobalBoard::fillAlgRecord(), and l1t::stage2::GlobalAlgBlkUnpacker::unpack().

55 { m_orbitNr = uuid; }
int m_orbitNr
orbit number -> L1MenuUUID
Definition: GlobalAlgBlk.h:107
void GlobalAlgBlk::setPreScColumn ( int  psC)
inline

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

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

int GlobalAlgBlk::m_bxNr
private

bunch cross number of the actual bx -> L1FirmwareUUID

Definition at line 110 of file GlobalAlgBlk.h.

Referenced by getL1FirmwareUUID(), GlobalAlgBlk(), print(), reset(), and setL1FirmwareUUID().

bool GlobalAlgBlk::m_finalOR
private

Definition at line 116 of file GlobalAlgBlk.h.

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

bool GlobalAlgBlk::m_finalORPreVeto
private

Definition at line 117 of file GlobalAlgBlk.h.

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

bool GlobalAlgBlk::m_finalORVeto
private

Definition at line 118 of file GlobalAlgBlk.h.

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

int GlobalAlgBlk::m_orbitNr
private

orbit number -> L1MenuUUID

Definition at line 107 of file GlobalAlgBlk.h.

Referenced by getL1MenuUUID(), GlobalAlgBlk(), print(), reset(), and setL1MenuUUID().

int GlobalAlgBlk::m_preScColumn
private

Definition at line 121 of file GlobalAlgBlk.h.

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

const unsigned int GlobalAlgBlk::maxPhysicsTriggers = 512
static