#include <DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerEvmReadoutRecord.h>
Public Member Functions | |
const bool | decision () const |
const bool | decision (int bxInEvent) const |
get Global Trigger decision and the decision word overloaded w.r.t. | |
const DecisionWord | decisionWord () const |
const DecisionWord | decisionWord (int bxInEvent) const |
std::vector< L1GtFdlWord > & | gtFdlVector () |
const std::vector< L1GtFdlWord > | gtFdlVector () const |
get the vector of L1GtFdlWord | |
const L1GtFdlWord | gtFdlWord () const |
const L1GtFdlWord | gtFdlWord (int bxInEvent) const |
get / set FDL word (record) in the GT readout record | |
const L1GtfeExtWord | gtfeWord () const |
get / set GTFE word (record) in the GT readout record | |
L1GlobalTriggerEvmReadoutRecord (const L1GlobalTriggerEvmReadoutRecord &) | |
copy constructor | |
L1GlobalTriggerEvmReadoutRecord (const int numberBxInEvent, const int numberFdlBoards) | |
L1GlobalTriggerEvmReadoutRecord (int NumberBxInEvent) | |
L1GlobalTriggerEvmReadoutRecord () | |
constructors | |
bool | operator!= (const L1GlobalTriggerEvmReadoutRecord &) const |
unequal operator | |
L1GlobalTriggerEvmReadoutRecord & | operator= (const L1GlobalTriggerEvmReadoutRecord &) |
assignment operator | |
bool | operator== (const L1GlobalTriggerEvmReadoutRecord &) const |
equal operator | |
void | print (std::ostream &myCout) const |
pretty print the content of a L1GlobalTriggerEvmReadoutRecord | |
void | printGtDecision (std::ostream &myCout) const |
void | printGtDecision (std::ostream &myCout, int bxInEventValue) const |
print global decision and algorithm decision word | |
void | printTechnicalTrigger (std::ostream &myCout) const |
void | printTechnicalTrigger (std::ostream &myCout, int bxInEventValue) const |
print technical triggers | |
void | reset () |
clear the record | |
void | setDecision (bool t) |
void | setDecision (bool t, int bxInEvent) |
set global decision and the decision word | |
void | setDecisionWord (const DecisionWord &decisionWordValue) |
void | setDecisionWord (const DecisionWord &decisionWordValue, int bxInEvent) |
void | setGtFdlWord (const L1GtFdlWord &) |
void | setGtFdlWord (const L1GtFdlWord &, int bxInEvent) |
void | setGtfeWord (const L1GtfeExtWord &) |
void | setTcsWord (const L1TcsWord &) |
const L1TcsWord | tcsWord () const |
get / set TCS word (record) in the GT readout record | |
virtual | ~L1GlobalTriggerEvmReadoutRecord () |
destructor | |
Private Attributes | |
std::vector< L1GtFdlWord > | m_gtFdlWord |
L1GtfeExtWord | m_gtfeWord |
L1TcsWord | m_tcsWord |
Friends | |
std::ostream & | operator<< (std::ostream &, const L1GlobalTriggerEvmReadoutRecord &) |
output stream operator |
Description: see header file.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 38 of file L1GlobalTriggerEvmReadoutRecord.h.
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord | ( | ) |
constructors
Definition at line 32 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtFdlWord, m_gtfeWord, and m_tcsWord.
00033 { 00034 00035 m_gtfeWord = L1GtfeExtWord(); 00036 m_tcsWord = L1TcsWord(); 00037 00038 // reserve just one L1GtFdlWord 00039 m_gtFdlWord.reserve(1); 00040 00041 }
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord | ( | int | NumberBxInEvent | ) |
Definition at line 43 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtFdlWord, m_gtfeWord, and m_tcsWord.
00044 { 00045 00046 m_gtfeWord = L1GtfeExtWord(); 00047 m_tcsWord = L1TcsWord(); 00048 00049 m_gtFdlWord.reserve(NumberBxInEvent); 00050 m_gtFdlWord.assign(NumberBxInEvent, L1GtFdlWord()); 00051 00052 // min value of bxInEvent 00053 int minBxInEvent = (NumberBxInEvent + 1)/2 - NumberBxInEvent; 00054 //int maxBxInEvent = (NumberBxInEvent + 1)/2 - 1; // not needed 00055 00056 // matrix index [0, NumberBxInEvent) -> bxInEvent [minBxInEvent, maxBxInEvent] 00057 // warning: matrix index != bxInEvent 00058 for (int iFdl = 0; iFdl < NumberBxInEvent; ++iFdl) { 00059 int iBxInEvent = minBxInEvent + iFdl; 00060 m_gtFdlWord[iFdl].setBxInEvent(iBxInEvent); 00061 } 00062 00063 }
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord | ( | const int | numberBxInEvent, | |
const int | numberFdlBoards | |||
) |
Definition at line 65 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtFdlWord, m_gtfeWord, and m_tcsWord.
00068 { 00069 00070 // GTFE board 00071 m_gtfeWord = L1GtfeExtWord(); 00072 00073 // TCS board 00074 m_tcsWord = L1TcsWord(); 00075 00076 // FDL board 00077 if (numberFdlBoards > 0) { 00078 m_gtFdlWord.reserve(numberBxInEvent); 00079 } 00080 00081 }
L1GlobalTriggerEvmReadoutRecord::L1GlobalTriggerEvmReadoutRecord | ( | const L1GlobalTriggerEvmReadoutRecord & | result | ) |
copy constructor
Definition at line 85 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtFdlWord, m_gtfeWord, and m_tcsWord.
00087 { 00088 00089 m_gtfeWord = result.m_gtfeWord; 00090 m_tcsWord = result.m_tcsWord; 00091 m_gtFdlWord = result.m_gtFdlWord; 00092 00093 }
L1GlobalTriggerEvmReadoutRecord::~L1GlobalTriggerEvmReadoutRecord | ( | ) | [virtual] |
const bool L1GlobalTriggerEvmReadoutRecord::decision | ( | ) | const |
Definition at line 200 of file L1GlobalTriggerEvmReadoutRecord.cc.
00201 { 00202 00203 int bxInEventL1Accept = 0; 00204 return decision(bxInEventL1Accept); 00205 }
get Global Trigger decision and the decision word overloaded w.r.t.
bxInEvent argument bxInEvent not given: for bunch cross with L1Accept
Definition at line 155 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), Exception, and m_gtFdlWord.
00156 { 00157 00158 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); 00159 itBx != m_gtFdlWord.end(); ++itBx) { 00160 00161 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00162 return (*itBx).finalOR(); 00163 } 00164 } 00165 00166 // if bunch cross not found, throw exception (action: SkipEvent) 00167 00168 throw cms::Exception("NotFound") 00169 << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n" 00170 << "Can not return global decision for this bx!\n" 00171 << std::endl; 00172 00173 return false; 00174 }
const DecisionWord L1GlobalTriggerEvmReadoutRecord::decisionWord | ( | ) | const |
Definition at line 208 of file L1GlobalTriggerEvmReadoutRecord.cc.
00209 { 00210 00211 int bxInEventL1Accept = 0; 00212 return decisionWord(bxInEventL1Accept); 00213 }
const DecisionWord L1GlobalTriggerEvmReadoutRecord::decisionWord | ( | int | bxInEvent | ) | const |
Definition at line 176 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), Exception, and m_gtFdlWord.
00178 { 00179 00180 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); 00181 itBx != m_gtFdlWord.end(); ++itBx) { 00182 00183 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00184 return (*itBx).gtDecisionWord(); 00185 } 00186 } 00187 00188 // if bunch cross not found, throw exception (action: SkipEvent) 00189 00190 throw cms::Exception("NotFound") 00191 << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n" 00192 << "Can not return decision word for this bx!\n" 00193 << std::endl; 00194 00195 DecisionWord dW; // empty; it does not arrive here 00196 return dW; 00197 }
std::vector<L1GtFdlWord>& L1GlobalTriggerEvmReadoutRecord::gtFdlVector | ( | ) | [inline] |
Definition at line 112 of file L1GlobalTriggerEvmReadoutRecord.h.
References m_gtFdlWord.
00113 { 00114 return m_gtFdlWord; 00115 }
const std::vector<L1GtFdlWord> L1GlobalTriggerEvmReadoutRecord::gtFdlVector | ( | ) | const [inline] |
get the vector of L1GtFdlWord
Definition at line 107 of file L1GlobalTriggerEvmReadoutRecord.h.
References m_gtFdlWord.
00108 { 00109 return m_gtFdlWord; 00110 }
const L1GtFdlWord L1GlobalTriggerEvmReadoutRecord::gtFdlWord | ( | ) | const |
Definition at line 401 of file L1GlobalTriggerEvmReadoutRecord.cc.
00402 { 00403 00404 int bxInEventL1Accept = 0; 00405 return gtFdlWord(bxInEventL1Accept); 00406 }
const L1GtFdlWord L1GlobalTriggerEvmReadoutRecord::gtFdlWord | ( | int | bxInEvent | ) | const |
get / set FDL word (record) in the GT readout record
Definition at line 379 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), Exception, and m_gtFdlWord.
00380 { 00381 00382 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); 00383 itBx != m_gtFdlWord.end(); ++itBx) { 00384 00385 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00386 return (*itBx); 00387 } 00388 } 00389 00390 // if bunch cross not found, throw exception (action: SkipEvent) 00391 00392 throw cms::Exception("NotFound") 00393 << "\nError: requested L1GtFdlWord for bx = " << bxInEventValue << " does not exist.\n" 00394 << std::endl; 00395 00396 // return empty record - actually does not arrive here 00397 return L1GtFdlWord(); 00398 00399 }
const L1GtfeExtWord L1GlobalTriggerEvmReadoutRecord::gtfeWord | ( | ) | const |
get / set GTFE word (record) in the GT readout record
Definition at line 349 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtfeWord.
00350 { 00351 00352 return m_gtfeWord; 00353 00354 }
bool L1GlobalTriggerEvmReadoutRecord::operator!= | ( | const L1GlobalTriggerEvmReadoutRecord & | result | ) | const |
L1GlobalTriggerEvmReadoutRecord & L1GlobalTriggerEvmReadoutRecord::operator= | ( | const L1GlobalTriggerEvmReadoutRecord & | result | ) |
assignment operator
Definition at line 104 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtFdlWord, m_gtfeWord, and m_tcsWord.
00106 { 00107 00108 if ( this != &result ) { 00109 00110 m_gtfeWord = result.m_gtfeWord; 00111 m_tcsWord = result.m_tcsWord; 00112 m_gtFdlWord = result.m_gtFdlWord; 00113 00114 } 00115 00116 return *this; 00117 00118 }
bool L1GlobalTriggerEvmReadoutRecord::operator== | ( | const L1GlobalTriggerEvmReadoutRecord & | result | ) | const |
equal operator
Definition at line 121 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtFdlWord, m_gtfeWord, and m_tcsWord.
00123 { 00124 00125 if (m_gtfeWord != result.m_gtfeWord) { 00126 return false; 00127 } 00128 00129 if (m_tcsWord != result.m_tcsWord) { 00130 return false; 00131 } 00132 00133 if (m_gtFdlWord != result.m_gtFdlWord) { 00134 return false; 00135 } 00136 00137 // all members identical 00138 return true; 00139 00140 }
void L1GlobalTriggerEvmReadoutRecord::print | ( | std::ostream & | myCout | ) | const |
pretty print the content of a L1GlobalTriggerEvmReadoutRecord
pretty print the content of a L1GlobalTriggerReadoutRecord
Definition at line 454 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), m_gtFdlWord, m_gtfeWord, m_tcsWord, L1GtfeExtWord::print(), and L1TcsWord::print().
00455 { 00456 00457 myCout << "\n L1GlobalTriggerEvmReadoutRecord::print \n" << std::endl; 00458 00459 m_gtfeWord.print(myCout); 00460 00461 m_tcsWord.print(myCout); 00462 00463 for (std::vector<L1GtFdlWord>::const_iterator itFdl = m_gtFdlWord.begin(); 00464 itFdl != m_gtFdlWord.end(); ++itFdl) { 00465 00466 itFdl->print(myCout); 00467 00468 } 00469 00470 }
void L1GlobalTriggerEvmReadoutRecord::printGtDecision | ( | std::ostream & | myCout | ) | const |
Definition at line 304 of file L1GlobalTriggerEvmReadoutRecord.cc.
References printGtDecision().
00305 { 00306 00307 int bxInEventL1Accept = 0; 00308 printGtDecision(myCout, bxInEventL1Accept); 00309 00310 }
void L1GlobalTriggerEvmReadoutRecord::printGtDecision | ( | std::ostream & | myCout, | |
int | bxInEventValue | |||
) | const |
print global decision and algorithm decision word
Definition at line 278 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), and m_gtFdlWord.
Referenced by printGtDecision().
00280 { 00281 00282 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); 00283 itBx != m_gtFdlWord.end(); ++itBx) { 00284 00285 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00286 00287 myCout << "\nL1 Global Trigger Record: " << std::endl; 00288 00289 myCout 00290 << "\t Bunch cross " << bxInEventValue 00291 << std::endl 00292 << "\t Global Decision = " << std::setw(5) << (*itBx).globalDecision() 00293 << std::endl 00294 << "\t Decision word (bitset style) = "; 00295 00296 (*itBx).printGtDecisionWord(myCout); 00297 } 00298 } 00299 00300 myCout << std::endl; 00301 00302 }
void L1GlobalTriggerEvmReadoutRecord::printTechnicalTrigger | ( | std::ostream & | myCout | ) | const |
Definition at line 338 of file L1GlobalTriggerEvmReadoutRecord.cc.
References printTechnicalTrigger().
00339 { 00340 00341 int bxInEventL1Accept = 0; 00342 printTechnicalTrigger(myCout, bxInEventL1Accept); 00343 00344 }
void L1GlobalTriggerEvmReadoutRecord::printTechnicalTrigger | ( | std::ostream & | myCout, | |
int | bxInEventValue | |||
) | const |
print technical triggers
Definition at line 313 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), and m_gtFdlWord.
Referenced by printTechnicalTrigger().
00316 { 00317 00318 for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); 00319 itBx != m_gtFdlWord.end(); ++itBx) { 00320 00321 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00322 00323 myCout << "\nL1 Global Trigger Record: " << std::endl; 00324 00325 myCout 00326 << "\t Bunch cross " << bxInEventValue 00327 << std::endl 00328 << "\t Technical Trigger word (bitset style) = "; 00329 00330 (*itBx).printGtTechnicalTriggerWord(myCout); 00331 } 00332 } 00333 00334 myCout << std::endl; 00335 00336 }
Definition at line 261 of file L1GlobalTriggerEvmReadoutRecord.cc.
References setDecision().
00262 { 00263 00264 int bxInEventL1Accept = 0; 00265 setDecision(t, bxInEventL1Accept); 00266 }
set global decision and the decision word
Definition at line 218 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), Exception, and m_gtFdlWord.
Referenced by setDecision().
00219 { 00220 00221 for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin(); 00222 itBx != m_gtFdlWord.end(); ++itBx) { 00223 00224 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00225 (*itBx).setFinalOR(static_cast<uint16_t> (t)); // TODO FIXME when manipulating partitions 00226 } 00227 } 00228 00229 // if bunch cross not found, throw exception (action: SkipEvent) 00230 00231 throw cms::Exception("NotFound") 00232 << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n" 00233 << "Can not set global decision for this bx!\n" 00234 << std::endl; 00235 00236 }
void L1GlobalTriggerEvmReadoutRecord::setDecisionWord | ( | const DecisionWord & | decisionWordValue | ) |
Definition at line 268 of file L1GlobalTriggerEvmReadoutRecord.cc.
References setDecisionWord().
00270 { 00271 00272 int bxInEventL1Accept = 0; 00273 setDecisionWord(decisionWordValue, bxInEventL1Accept); 00274 00275 }
void L1GlobalTriggerEvmReadoutRecord::setDecisionWord | ( | const DecisionWord & | decisionWordValue, | |
int | bxInEvent | |||
) |
Definition at line 238 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), Exception, and m_gtFdlWord.
Referenced by setDecisionWord().
00241 { 00242 00243 for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin(); 00244 itBx != m_gtFdlWord.end(); ++itBx) { 00245 00246 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00247 (*itBx).setGtDecisionWord (decisionWordValue); 00248 } 00249 } 00250 00251 // if bunch cross not found, throw exception (action: SkipEvent) 00252 00253 throw cms::Exception("NotFound") 00254 << "\nError: requested GtFdlWord for bx = " << bxInEventValue << " does not exist.\n" 00255 << "Can not set decision word for this bx!\n" 00256 << std::endl; 00257 00258 }
void L1GlobalTriggerEvmReadoutRecord::setGtFdlWord | ( | const L1GtFdlWord & | gtFdlWordValue | ) |
Definition at line 434 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtFdlWord.
00435 { 00436 00437 // just push back the new FDL block 00438 m_gtFdlWord.push_back(gtFdlWordValue); 00439 00440 }
void L1GlobalTriggerEvmReadoutRecord::setGtFdlWord | ( | const L1GtFdlWord & | gtFdlWordValue, | |
int | bxInEvent | |||
) |
Definition at line 408 of file L1GlobalTriggerEvmReadoutRecord.cc.
References lat::endl(), Exception, LogDebug, and m_gtFdlWord.
00410 { 00411 00412 // if a L1GtFdlWord exists for bxInEventValue, replace it 00413 for (std::vector<L1GtFdlWord>::iterator itBx = m_gtFdlWord.begin(); 00414 itBx != m_gtFdlWord.end(); ++itBx) { 00415 00416 if ( (*itBx).bxInEvent() == bxInEventValue ) { 00417 *itBx = gtFdlWordValue; 00418 LogDebug("L1GlobalTriggerEvmReadoutRecord") 00419 << "Replacing L1GtFdlWord for bunch bx = " << bxInEventValue << "\n" 00420 << std::endl; 00421 return; 00422 } 00423 } 00424 00425 // if bunch cross not found, throw exception (action: SkipEvent) 00426 // all L1GtFdlWord are created in the record constructor for allowed bunch crosses 00427 00428 throw cms::Exception("NotFound") 00429 << "\nError: Cannot set L1GtFdlWord for bx = " << bxInEventValue 00430 << std::endl; 00431 00432 }
void L1GlobalTriggerEvmReadoutRecord::setGtfeWord | ( | const L1GtfeExtWord & | gtfeWordValue | ) |
Definition at line 356 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_gtfeWord.
00357 { 00358 00359 m_gtfeWord = gtfeWordValue; 00360 00361 }
Definition at line 371 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_tcsWord.
00372 { 00373 00374 m_tcsWord = tcsWordValue; 00375 00376 }
const L1TcsWord L1GlobalTriggerEvmReadoutRecord::tcsWord | ( | ) | const |
get / set TCS word (record) in the GT readout record
Definition at line 364 of file L1GlobalTriggerEvmReadoutRecord.cc.
References m_tcsWord.
00365 { 00366 00367 return m_tcsWord; 00368 00369 }
std::ostream& operator<< | ( | std::ostream & | s, | |
const L1GlobalTriggerEvmReadoutRecord & | result | |||
) | [friend] |
output stream operator
Definition at line 474 of file L1GlobalTriggerEvmReadoutRecord.cc.
00475 { 00476 // TODO FIXME put together all prints 00477 s << "Not available yet - sorry"; 00478 00479 return s; 00480 00481 }
std::vector<L1GtFdlWord> L1GlobalTriggerEvmReadoutRecord::m_gtFdlWord [private] |
Definition at line 142 of file L1GlobalTriggerEvmReadoutRecord.h.
Referenced by decision(), decisionWord(), gtFdlVector(), gtFdlWord(), L1GlobalTriggerEvmReadoutRecord(), operator=(), operator==(), print(), printGtDecision(), printTechnicalTrigger(), setDecision(), setDecisionWord(), and setGtFdlWord().
Definition at line 139 of file L1GlobalTriggerEvmReadoutRecord.h.
Referenced by gtfeWord(), L1GlobalTriggerEvmReadoutRecord(), operator=(), operator==(), print(), and setGtfeWord().
Definition at line 140 of file L1GlobalTriggerEvmReadoutRecord.h.
Referenced by L1GlobalTriggerEvmReadoutRecord(), operator=(), operator==(), print(), setTcsWord(), and tcsWord().