test
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
l1t::GlobalBoard Class Reference

#include <GlobalBoard.h>

Public Member Functions

void fillAlgRecord (int iBxInEvent, std::auto_ptr< GlobalAlgBlkBxCollection > &uGtAlgRecord, int prescaleSet, int menuUUID, int firmwareUUID)
 Fill the Daq Records. More...
 
const std::bitset
< GlobalAlgBlk::maxPhysicsTriggers > & 
getAlgorithmOR () const
 return algorithm OR decision More...
 
const BXVector< const
l1t::L1Candidate * > * 
getCandL1EG () const
 pointer to EG data list More...
 
const BXVector< const
l1t::EtSum * > * 
getCandL1EtSum () const
 pointer to Tau data list More...
 
const BXVector< const
GlobalExtBlk * > * 
getCandL1External () const
 pointer to Tau data list More...
 
const BXVector< const
l1t::L1Candidate * > * 
getCandL1Jet () const
 pointer to Jet data list More...
 
const BXVector< const
l1t::Muon * > * 
getCandL1Mu () const
 return global muon trigger candidate More...
 
const BXVector< const
l1t::L1Candidate * > * 
getCandL1Tau () const
 pointer to Tau data list More...
 
const std::bitset
< GlobalAlgBlk::maxPhysicsTriggers > & 
getDecisionWord () const
 return decision More...
 
 GlobalBoard ()
 
void init (const int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet, int bxFirst, int bxLast)
 initialize the class (mainly reserve) More...
 
void printGmtData (const int iBxInEvent) const
 print received Muon dataWord More...
 
void receiveCaloObjectData (edm::Event &, const edm::EDGetTokenT< BXVector< l1t::EGamma >> &, const edm::EDGetTokenT< BXVector< l1t::Tau >> &, const edm::EDGetTokenT< BXVector< l1t::Jet >> &, const edm::EDGetTokenT< BXVector< l1t::EtSum >> &, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, const bool receiveEtSums)
 receive data from Global Muon Trigger More...
 
void receiveExternalData (edm::Event &, const edm::EDGetTokenT< BXVector< GlobalExtBlk > > &, const bool receiveExt)
 
void receiveMuonObjectData (edm::Event &, const edm::EDGetTokenT< BXVector< l1t::Muon > > &, const bool receiveMu, const int nrL1Mu)
 
void reset ()
 clear uGT More...
 
void resetCalo ()
 
void resetExternal ()
 
void resetMu ()
 
void runFDL (edm::Event &iEvent, const int iBxInEvent, const int totalBxInEvent, const unsigned int numberPhysTriggers, const std::vector< int > &prescaleFactorsAlgoTrig, const std::vector< unsigned int > &triggerMaskAlgoTrig, const std::vector< unsigned int > &triggerMaskVetoAlgoTrig, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked)
 run the uGT FDL (Apply Prescales and Veto) More...
 
void runGTL (edm::Event &iEvent, const edm::EventSetup &evSetup, const TriggerMenu *m_l1GtMenu, const bool produceL1GtObjectMapRecord, const int iBxInEvent, std::auto_ptr< GlobalObjectMapRecord > &gtObjectMapRecord, const unsigned int numberPhysTriggers, const int nrL1Mu, const int nrL1EG, const int nrL1Tau, const int nrL1Jet)
 run the uGT GTL (Conditions and Algorithms) More...
 
void setBxFirst (int bx)
 
void setBxLast (int bx)
 
void setVerbosity (const int verbosity)
 
virtual ~GlobalBoard ()
 

Private Attributes

bool m_algFinalOr
 
bool m_algFinalOrVeto
 
bool m_algInitialOr
 
bool m_algIntermOr
 
bool m_algPrescaledOr
 
unsigned int m_boardEventCount
 
int m_bxFirst_
 
int m_bxLast_
 
BXVector< const
l1t::L1Candidate * > * 
m_candL1EG
 
BXVector< const l1t::EtSum * > * m_candL1EtSum
 
BXVector< const GlobalExtBlk * > * m_candL1External
 
BXVector< const
l1t::L1Candidate * > * 
m_candL1Jet
 
BXVector< const l1t::Muon * > * m_candL1Mu
 
BXVector< const
l1t::L1Candidate * > * 
m_candL1Tau
 
std::vector
< AlgorithmEvaluation::ConditionEvaluationMap
m_conditionResultMaps
 
bool m_firstEv
 
bool m_firstEvLumiSegment
 
std::bitset
< GlobalAlgBlk::maxPhysicsTriggers
m_gtlAlgorithmOR
 
std::bitset
< GlobalAlgBlk::maxPhysicsTriggers
m_gtlDecisionWord
 
bool m_isDebugEnabled
 
const L1CaloGeometrym_l1CaloGeometry
 
unsigned long long m_l1CaloGeometryCacheID
 
const TriggerMenum_l1GtMenu
 
unsigned long long m_l1GtMenuCacheID
 
const L1MuTriggerScalesm_l1MuTriggerScales
 
unsigned long long m_l1MuTriggerScalesCacheID
 
std::vector< std::vector< int > > m_prescaleCounterAlgoTrig
 prescale counters: NumberPhysTriggers counters per bunch cross in event More...
 
GlobalAlgBlk m_uGtAlgBlk
 
int m_uGtBoardNumber
 
bool m_uGtFinalBoard
 
int m_verbosity
 verbosity level More...
 

Detailed Description

Definition at line 52 of file GlobalBoard.h.

Constructor & Destructor Documentation

GlobalBoard::GlobalBoard ( )

Definition at line 58 of file GlobalBoard.cc.

References m_boardEventCount, m_gtlAlgorithmOR, m_gtlDecisionWord, m_l1CaloGeometryCacheID, m_l1GtMenuCacheID, m_l1MuTriggerScalesCacheID, m_uGtAlgBlk, m_uGtBoardNumber, m_uGtFinalBoard, and GlobalAlgBlk::reset().

58  :
65  m_firstEv(true),
68 {
69 
71 
72  m_gtlAlgorithmOR.reset();
73  m_gtlDecisionWord.reset();
74 
75  // initialize cached IDs
76  m_l1GtMenuCacheID = 0ULL;
79 
80  // Counter for number of events board sees
82 
83  // Need to expand use with more than one uGt GlobalBoard for now assume 1
84  m_uGtBoardNumber = 0;
85  m_uGtFinalBoard = true;
86 
87 
88 }
bool isDebugEnabled()
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
unsigned long long m_l1MuTriggerScalesCacheID
Definition: GlobalBoard.h:227
unsigned long long m_l1GtMenuCacheID
Definition: GlobalBoard.h:220
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
unsigned int m_boardEventCount
Definition: GlobalBoard.h:278
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
void reset()
reset the content of a GlobalAlgBlk
unsigned long long m_l1CaloGeometryCacheID
Definition: GlobalBoard.h:224
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
bool m_firstEvLumiSegment
Definition: GlobalBoard.h:261
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
GlobalBoard::~GlobalBoard ( )
virtual

Definition at line 91 of file GlobalBoard.cc.

91  {
92 
93  //reset(); //why would we need a reset?
94  delete m_candL1Mu;
95  delete m_candL1EG;
96  delete m_candL1Tau;
97  delete m_candL1Jet;
98  delete m_candL1EtSum;
99  delete m_candL1External;
100 
101 // delete m_gtEtaPhiConversions;
102 
103 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236

Member Function Documentation

void GlobalBoard::fillAlgRecord ( int  iBxInEvent,
std::auto_ptr< GlobalAlgBlkBxCollection > &  uGtAlgRecord,
int  prescaleSet,
int  menuUUID,
int  firmwareUUID 
)

Fill the Daq Records.

Definition at line 928 of file GlobalBoard.cc.

References LogDebug.

Referenced by L1TGlobalProducer::produce().

934 {
935 
936  if (m_verbosity) {
937  LogDebug("L1TGlobal")
938  << "\n**** GlobalBoard fill DAQ Records for bx= " << iBxInEvent
939  << std::endl;
940 
941  }
942 
943 // Set header information
944  m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF));
945  m_uGtAlgBlk.setPreScColumn(prescaleSet);
946  m_uGtAlgBlk.setL1MenuUUID(menuUUID);
947  m_uGtAlgBlk.setL1FirmwareUUID(firmwareUUID);
948 
952 
953 
954  uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk);
955 
956 }
#define LogDebug(id)
void setL1MenuUUID(int uuid)
set simple members
Definition: GlobalAlgBlk.h:55
void setFinalORPreVeto(bool fOR)
Definition: GlobalAlgBlk.h:59
void setbxInEventNr(int bxNr)
Definition: GlobalAlgBlk.h:57
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
void setFinalOR(bool fOR)
Definition: GlobalAlgBlk.h:60
void setFinalORVeto(bool fOR)
Definition: GlobalAlgBlk.h:58
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
void setL1FirmwareUUID(int fuuid)
Definition: GlobalAlgBlk.h:56
void setPreScColumn(int psC)
Definition: GlobalAlgBlk.h:61
const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& l1t::GlobalBoard::getAlgorithmOR ( ) const
inline

return algorithm OR decision

Definition at line 137 of file GlobalBoard.h.

References m_gtlAlgorithmOR.

138  {
139  return m_gtlAlgorithmOR;
140  }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1EG ( ) const
inline

pointer to EG data list

Definition at line 149 of file GlobalBoard.h.

References m_candL1EG.

150  {
151  return m_candL1EG;
152  }
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
const BXVector<const l1t::EtSum*>* l1t::GlobalBoard::getCandL1EtSum ( ) const
inline

pointer to Tau data list

Definition at line 168 of file GlobalBoard.h.

References m_candL1EtSum.

169  {
170  return m_candL1EtSum;
171  }
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
const BXVector<const GlobalExtBlk*>* l1t::GlobalBoard::getCandL1External ( ) const
inline

pointer to Tau data list

Definition at line 174 of file GlobalBoard.h.

References m_candL1External.

175  {
176  return m_candL1External;
177  }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1Jet ( ) const
inline

pointer to Jet data list

Definition at line 155 of file GlobalBoard.h.

References m_candL1Jet.

156  {
157  return m_candL1Jet;
158  }
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
const BXVector<const l1t::Muon*>* l1t::GlobalBoard::getCandL1Mu ( ) const
inline

return global muon trigger candidate

Definition at line 143 of file GlobalBoard.h.

References m_candL1Mu.

144  {
145  return m_candL1Mu;
146  }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
const BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::getCandL1Tau ( ) const
inline

pointer to Tau data list

Definition at line 162 of file GlobalBoard.h.

References m_candL1Tau.

163  {
164  return m_candL1Tau;
165  }
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
const std::bitset<GlobalAlgBlk::maxPhysicsTriggers>& l1t::GlobalBoard::getDecisionWord ( ) const
inline

return decision

Definition at line 131 of file GlobalBoard.h.

References m_gtlDecisionWord.

132  {
133  return m_gtlDecisionWord;
134  }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
void GlobalBoard::init ( const int  numberPhysTriggers,
const int  nrL1Mu,
const int  nrL1EG,
const int  nrL1Tau,
const int  nrL1Jet,
int  bxFirst,
int  bxLast 
)

initialize the class (mainly reserve)

Definition at line 118 of file GlobalBoard.cc.

References LogDebug.

Referenced by L1TGlobalProducer::produce().

119  {
120 
121  setBxFirst(bxFirst);
122  setBxLast(bxLast);
123 
124  m_candL1Mu->setBXRange( m_bxFirst_, m_bxLast_ );
125  m_candL1EG->setBXRange( m_bxFirst_, m_bxLast_ );
126  m_candL1Tau->setBXRange( m_bxFirst_, m_bxLast_ );
127  m_candL1Jet->setBXRange( m_bxFirst_, m_bxLast_ );
128  m_candL1EtSum->setBXRange( m_bxFirst_, m_bxLast_ );
130 
131  m_uGtAlgBlk.reset();
132 
133  LogDebug("L1TGlobal") << "\t Initializing Board with bxFirst = " << m_bxFirst_ << ", bxLast = " << m_bxLast_ << std::endl;
134 
135 
136 }
#define LogDebug(id)
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
void setBxLast(int bx)
Definition: GlobalBoard.cc:112
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
void reset()
reset the content of a GlobalAlgBlk
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
void setBxFirst(int bx)
Definition: GlobalBoard.cc:106
void setBXRange(int bxFirst, int bxLast)
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
void GlobalBoard::printGmtData ( const int  iBxInEvent) const

print received Muon dataWord

Definition at line 1007 of file GlobalBoard.cc.

References LogTrace.

1007  {
1008 
1009  LogTrace("L1TGlobal")
1010  << "\nl1t::L1GlobalTrigger: uGMT data received for BxInEvent = "
1011  << iBxInEvent << std::endl;
1012 
1013  int nrL1Mu = m_candL1Mu->size(iBxInEvent);
1014  LogTrace("L1TGlobal")
1015  << "Number of GMT muons = " << nrL1Mu << "\n"
1016  << std::endl;
1017 
1018  LogTrace("L1TGlobal") << std::endl;
1019 
1020 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
#define LogTrace(id)
void GlobalBoard::receiveCaloObjectData ( edm::Event iEvent,
const edm::EDGetTokenT< BXVector< l1t::EGamma >> &  egInputToken,
const edm::EDGetTokenT< BXVector< l1t::Tau >> &  tauInputToken,
const edm::EDGetTokenT< BXVector< l1t::Jet >> &  jetInputToken,
const edm::EDGetTokenT< BXVector< l1t::EtSum >> &  sumInputToken,
const bool  receiveEG,
const int  nrL1EG,
const bool  receiveTau,
const int  nrL1Tau,
const bool  receiveJet,
const int  nrL1Jet,
const bool  receiveEtSums 
)

receive data from Global Muon Trigger

Definition at line 141 of file GlobalBoard.cc.

References edm::Event::getByToken(), i, edm::HandleBase::isValid(), metsig::jet, LogDebug, and metsig::tau.

Referenced by L1TGlobalProducer::produce().

149  {
150 
151  if (m_verbosity) {
152  LogDebug("L1TGlobal")
153  << "\n**** Board receiving Calo Data "
154  //<< "\n from input tag " << caloInputTag << "\n"
155  << std::endl;
156 
157  }
158 
159  resetCalo();
160 
161  // get data from Calorimeter
162  if (receiveEG) {
164  iEvent.getByToken(egInputToken, egData);
165 
166  if (!egData.isValid()) {
167  if (m_verbosity) {
168  edm::LogWarning("L1TGlobal")
169  << "\nWarning: BXVector<l1t::EGamma> with input tag "
170  //<< caloInputTag
171  << "\nrequested in configuration, but not found in the event.\n"
172  << std::endl;
173  }
174  } else {
175  // bx in EG data
176  for(int i = egData->getFirstBX(); i <= egData->getLastBX(); ++i) {
177 
178  // Prevent from pushing back bx that is outside of allowed range
179  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
180 
181  //Loop over EG in this bx
182  for(std::vector<l1t::EGamma>::const_iterator eg = egData->begin(i); eg != egData->end(i); ++eg) {
183 
184  (*m_candL1EG).push_back(i,&(*eg));
185  LogDebug("L1TGlobal") << "EG Pt " << eg->hwPt() << " Eta " << eg->hwEta() << " Phi " << eg->hwPhi() << " Qual " << eg->hwQual() <<" Iso " << eg->hwIso() << std::endl;
186  } //end loop over EG in bx
187  } //end loop over bx
188 
189  } //end if over valid EG data
190 
191  } //end if ReveiveEG data
192 
193 
194  if (receiveTau) {
196  iEvent.getByToken(tauInputToken, tauData);
197 
198  if (!tauData.isValid()) {
199  if (m_verbosity) {
200  edm::LogWarning("L1TGlobal")
201  << "\nWarning: BXVector<l1t::Tau> with input tag "
202  //<< caloInputTag
203  << "\nrequested in configuration, but not found in the event.\n"
204  << std::endl;
205  }
206  } else {
207  // bx in tau data
208  for(int i = tauData->getFirstBX(); i <= tauData->getLastBX(); ++i) {
209 
210  // Prevent from pushing back bx that is outside of allowed range
211  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
212 
213  //Loop over tau in this bx
214  for(std::vector<l1t::Tau>::const_iterator tau = tauData->begin(i); tau != tauData->end(i); ++tau) {
215 
216  (*m_candL1Tau).push_back(i,&(*tau));
217  LogDebug("L1TGlobal") << "tau Pt " << tau->hwPt() << " Eta " << tau->hwEta() << " Phi " << tau->hwPhi() << " Qual " << tau->hwQual() <<" Iso " << tau->hwIso() << std::endl;
218  } //end loop over tau in bx
219  } //end loop over bx
220 
221  } //end if over valid tau data
222 
223  } //end if ReveiveTau data
224 
225 
226  if (receiveJet) {
228  iEvent.getByToken(jetInputToken, jetData);
229 
230  if (!jetData.isValid()) {
231  if (m_verbosity) {
232  edm::LogWarning("L1TGlobal")
233  << "\nWarning: BXVector<l1t::Jet> with input tag "
234  //<< caloInputTag
235  << "\nrequested in configuration, but not found in the event.\n"
236  << std::endl;
237  }
238  } else {
239  // bx in jet data
240  for(int i = jetData->getFirstBX(); i <= jetData->getLastBX(); ++i) {
241 
242  // Prevent from pushing back bx that is outside of allowed range
243  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
244 
245  //Loop over jet in this bx
246  for(std::vector<l1t::Jet>::const_iterator jet = jetData->begin(i); jet != jetData->end(i); ++jet) {
247 
248  (*m_candL1Jet).push_back(i,&(*jet));
249  LogDebug("L1TGlobal") << "Jet Pt " << jet->hwPt() << " Eta " << jet->hwEta() << " Phi " << jet->hwPhi() << " Qual " << jet->hwQual() <<" Iso " << jet->hwIso() << std::endl;
250  } //end loop over jet in bx
251  } //end loop over bx
252 
253  } //end if over valid jet data
254 
255  } //end if ReveiveJet data
256 
257 
258  if(receiveEtSums) {
260  iEvent.getByToken(sumInputToken, etSumData);
261 
262  if(!etSumData.isValid()) {
263  if (m_verbosity) {
264  edm::LogWarning("L1TGlobal")
265  << "\nWarning: BXVector<l1t::EtSum> with input tag "
266  //<< caloInputTag
267  << "\nrequested in configuration, but not found in the event.\n"
268  << std::endl;
269  }
270  } else {
271 
272  for(int i = etSumData->getFirstBX(); i <= etSumData->getLastBX(); ++i) {
273 
274  // Prevent from pushing back bx that is outside of allowed range
275  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
276 
277  //Loop over jet in this bx
278  for(std::vector<l1t::EtSum>::const_iterator etsum = etSumData->begin(i); etsum != etSumData->end(i); ++etsum) {
279 
280  (*m_candL1EtSum).push_back(i,&(*etsum));
281 
282 /* In case we need to split these out
283  switch ( etsum->getType() ) {
284  case l1t::EtSum::EtSumType::kMissingEt:
285  (*m_candETM).push_back(i,&(*etsum));
286  LogDebug("L1TGlobal") << "ETM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
287  break;
288  case l1t::EtSum::EtSumType::kMissingHt:
289  (*m_candHTM.push_back(i,&(*etsum);
290  LogDebug("L1TGlobal") << "HTM: Pt " << etsum->hwPt() << " Phi " << etsum->hwPhi() << std::endl;
291  break;
292  case l1t::EtSum::EtSumType::kTotalEt:
293  (*m_candETT.push_back(i,&(*etsum);
294  LogDebug("L1TGlobal") << "ETT: Pt " << etsum->hwPt() << std::endl;
295  break;
296  case l1t::EtSum::EtSumType::kTotalHt:
297  (*m_candHTT.push_back(i,&(*etsum);
298  LogDebug("L1TGlobal") << "HTT: Pt " << etsum->hwPt() << std::endl;
299  break;
300  }
301 */
302 
303  } //end loop over jet in bx
304  } //end loop over Bx
305 
306  }
307 
308 
309  }
310 
311 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
bool isValid() const
Definition: HandleBase.h:75
void GlobalBoard::receiveExternalData ( edm::Event iEvent,
const edm::EDGetTokenT< BXVector< GlobalExtBlk > > &  extInputToken,
const bool  receiveExt 
)

Definition at line 364 of file GlobalBoard.cc.

References edm::Event::getByToken(), i, edm::HandleBase::isValid(), and LogDebug.

Referenced by L1TGlobalProducer::produce().

366  {
367 
368  if (m_verbosity) {
369  LogDebug("L1TGlobal")
370  << "\n**** GlobalBoard receiving external data = "
371  //<< "\n from input tag " << muInputTag << "\n"
372  << std::endl;
373  }
374 
375  resetExternal();
376 
377  // get data from Global Muon Trigger
378  if (receiveExt) {
380  iEvent.getByToken(extInputToken, extData);
381 
382  if (!extData.isValid()) {
383  if (m_verbosity) {
384  edm::LogWarning("L1TGlobal")
385  << "\nWarning: BXVector<GlobalExtBlk> with input tag "
386  //<< muInputTag
387  << "\nrequested in configuration, but not found in the event.\n"
388  << std::endl;
389  }
390  } else {
391  // bx in muon data
392  for(int i = extData->getFirstBX(); i <= extData->getLastBX(); ++i) {
393 
394  // Prevent from pushing back bx that is outside of allowed range
395  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
396 
397  //Loop over ext in this bx
398  for(std::vector<GlobalExtBlk>::const_iterator ext = extData->begin(i); ext != extData->end(i); ++ext) {
399 
400  (*m_candL1External).push_back(i,&(*ext));
401  } //end loop over ext in bx
402  } //end loop over bx
403 
404  } //end if over valid ext data
405 
406  } //end if ReveiveExt data
407 
408 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
bool isValid() const
Definition: HandleBase.h:75
void GlobalBoard::receiveMuonObjectData ( edm::Event iEvent,
const edm::EDGetTokenT< BXVector< l1t::Muon > > &  muInputToken,
const bool  receiveMu,
const int  nrL1Mu 
)

Definition at line 315 of file GlobalBoard.cc.

References edm::Event::getByToken(), i, edm::HandleBase::isValid(), LogDebug, and RPCpg::mu.

Referenced by L1TGlobalProducer::produce().

317  {
318 
319  if (m_verbosity) {
320  LogDebug("L1TGlobal")
321  << "\n**** GlobalBoard receiving muon data = "
322  //<< "\n from input tag " << muInputTag << "\n"
323  << std::endl;
324  }
325 
326  resetMu();
327 
328  // get data from Global Muon Trigger
329  if (receiveMu) {
331  iEvent.getByToken(muInputToken, muonData);
332 
333  if (!muonData.isValid()) {
334  if (m_verbosity) {
335  edm::LogWarning("L1TGlobal")
336  << "\nWarning: BXVector<l1t::Muon> with input tag "
337  //<< muInputTag
338  << "\nrequested in configuration, but not found in the event.\n"
339  << std::endl;
340  }
341  } else {
342  // bx in muon data
343  for(int i = muonData->getFirstBX(); i <= muonData->getLastBX(); ++i) {
344 
345  // Prevent from pushing back bx that is outside of allowed range
346  if( i < m_bxFirst_ || i > m_bxLast_ ) continue;
347 
348  //Loop over Muons in this bx
349  for(std::vector<l1t::Muon>::const_iterator mu = muonData->begin(i); mu != muonData->end(i); ++mu) {
350 
351  (*m_candL1Mu).push_back(i,&(*mu));
352  LogDebug("L1TGlobal") << "Muon Pt " << mu->hwPt() << " Eta " << mu->hwEta() << " Phi " << mu->hwPhi() << " Qual " << mu->hwQual() <<" Iso " << mu->hwIso() << std::endl;
353  } //end loop over muons in bx
354  } //end loop over bx
355 
356  } //end if over valid muon data
357 
358  } //end if ReveiveMuon data
359 
360 
361 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
const int mu
Definition: Constants.h:22
bool isValid() const
Definition: HandleBase.h:75
void GlobalBoard::reset ( void  )

clear uGT

Definition at line 960 of file GlobalBoard.cc.

Referenced by L1TGlobalProducer::produce().

960  {
961 
962  resetMu();
963  resetCalo();
964  resetExternal();
965 
966  m_uGtAlgBlk.reset();
967 
968  m_gtlDecisionWord.reset();
969  m_gtlAlgorithmOR.reset();
970 
971 
972 
973 }
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlDecisionWord
Definition: GlobalBoard.h:250
void reset()
reset the content of a GlobalAlgBlk
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
std::bitset< GlobalAlgBlk::maxPhysicsTriggers > m_gtlAlgorithmOR
Definition: GlobalBoard.h:249
void GlobalBoard::resetCalo ( )

Definition at line 984 of file GlobalBoard.cc.

984  {
985 
986  m_candL1EG->clear();
987  m_candL1Tau->clear();
988  m_candL1Jet->clear();
989  m_candL1EtSum->clear();
990 
991  m_candL1EG->setBXRange( m_bxFirst_, m_bxLast_ );
992  m_candL1Tau->setBXRange( m_bxFirst_, m_bxLast_ );
993  m_candL1Jet->setBXRange( m_bxFirst_, m_bxLast_ );
994  m_candL1EtSum->setBXRange( m_bxFirst_, m_bxLast_ );
995 
996 }
BXVector< const l1t::L1Candidate * > * m_candL1EG
Definition: GlobalBoard.h:235
BXVector< const l1t::EtSum * > * m_candL1EtSum
Definition: GlobalBoard.h:238
BXVector< const l1t::L1Candidate * > * m_candL1Jet
Definition: GlobalBoard.h:237
BXVector< const l1t::L1Candidate * > * m_candL1Tau
Definition: GlobalBoard.h:236
void GlobalBoard::resetExternal ( )

Definition at line 998 of file GlobalBoard.cc.

998  {
999 
1002 
1003 }
BXVector< const GlobalExtBlk * > * m_candL1External
Definition: GlobalBoard.h:239
void clear()
void setBXRange(int bxFirst, int bxLast)
void GlobalBoard::resetMu ( )

Definition at line 976 of file GlobalBoard.cc.

976  {
977 
978  m_candL1Mu->clear();
979  m_candL1Mu->setBXRange( m_bxFirst_, m_bxLast_ );
980 
981 }
BXVector< const l1t::Muon * > * m_candL1Mu
Definition: GlobalBoard.h:234
void GlobalBoard::runFDL ( edm::Event iEvent,
const int  iBxInEvent,
const int  totalBxInEvent,
const unsigned int  numberPhysTriggers,
const std::vector< int > &  prescaleFactorsAlgoTrig,
const std::vector< unsigned int > &  triggerMaskAlgoTrig,
const std::vector< unsigned int > &  triggerMaskVetoAlgoTrig,
const bool  algorithmTriggersUnprescaled,
const bool  algorithmTriggersUnmasked 
)

run the uGT FDL (Apply Prescales and Veto)

if we are masking.

Definition at line 784 of file GlobalBoard.cc.

References LogDebug.

Referenced by L1TGlobalProducer::produce().

792  {
793 
794 
795  if (m_verbosity) {
796  LogDebug("L1TGlobal")
797  << "\n**** GlobalBoard apply Final Decision Logic "
798  << std::endl;
799 
800  }
801 
802 
803  // prescale counters are reset at the beginning of the luminosity segment
804  if( m_firstEv ){
805  // prescale counters: numberPhysTriggers counters per bunch cross
806  m_prescaleCounterAlgoTrig.reserve(numberPhysTriggers*totalBxInEvent);
807 
808  for( int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent ){
809  m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig);
810  }
811  m_firstEv = false;
812  }
813 
814  // TODO FIXME find the beginning of the luminosity segment
815  if( m_firstEvLumiSegment ){
816 
818  for( int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent ){
819  m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig);
820  }
821 
822  m_firstEvLumiSegment = false;
823  }
824 
825  // Copy Algorithm bits to Prescaled word
826  // Prescaling and Masking done below if requested.
828 
829 
830  // ----------------------------------------------------
831  // Apply absBXmasking or skip if turned off TO DO
832  // ----------------------------------------------------
833  if( !algorithmTriggersUnmasked ){
834 
835 /* TO DO get absBX masking
836  bool temp_algBxMaskOr = false;
837  for( unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit ){
838 
839  bool bitValue = m_uGtAlgBlk.getAlgoDecisionInterm( iBit );
840 
841  if( bitValue ){
842  bool isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 );
843 
844  bool passMask = ( bitValue && !isMasked );
845 
846  if( passMask ) temp_algBxMaskOr = true;
847  else m_uGtAlgBlk.setAlgoDecisionFinal(iBit,false);
848 
849  }
850  }
851 
852  m_algIntermOr = temp_algBxMaskOr; */
854 
855  }
856  else {
857 
859 
860  }
861 
862 
863  // Copy Algorithm bits fron Prescaled word to Final Word
864  // Masking done below if requested.
866 
867  // -------------------------------------------
868  // Apply Prescales or skip if turned off
869  // -------------------------------------------
870  if( !algorithmTriggersUnprescaled ){
871 
872  // iBxInEvent is ... -2 -1 0 1 2 ... while counters are 0 1 2 3 4 ...
873  int inBxInEvent = totalBxInEvent/2 + iBxInEvent;
874 
875  bool temp_algPrescaledOr = false;
876  for( unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit ){
877 
878  bool bitValue = m_uGtAlgBlk.getAlgoDecisionInitial( iBit );
879  if( bitValue ){
880  if( prescaleFactorsAlgoTrig.at(iBit) != 1 ){
881 
882  (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit))--;
883  if( m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) == 0 ){
884 
885  // bit already true in algoDecisionWord, just reset counter
886  m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) = prescaleFactorsAlgoTrig.at(iBit);
887  temp_algPrescaledOr = true;
888 
889  // Check if veto mask is true, if it is, set the event veto flag.
890  if ( triggerMaskVetoAlgoTrig.at(iBit) == 1 ) m_algFinalOrVeto = true;
891  }
892  else {
893 
894  // change bit to false in prescaled word and final decision word
895  m_uGtAlgBlk.setAlgoDecisionFinal(iBit,false);
896 
897  } //if Prescale counter reached zero
898  } //if prescale factor is not 1 (ie. no prescale)
899  else {
900 
901  temp_algPrescaledOr = true;
902 
903  // Check if veto mask is true, if it is, set the event veto flag.
904  if ( triggerMaskVetoAlgoTrig.at(iBit) == 1 ) m_algFinalOrVeto = true;
905 
906  }
907  } //if algo bit is set true
908  } //loop over alg bits
909 
910  m_algPrescaledOr = temp_algPrescaledOr; //temp
911 
912  }
913  else {
914  // Since not Prescaling just take OR of Initial Work
916 
917  }//if we are going to apply prescales.
918 
919 
920 // Set local and FinalOR for this board
921 // FIX ME: Currently in one board operation we are setting the global FINOR as well.
923 
924 
925 }
#define LogDebug(id)
std::vector< bool > const & getAlgoDecisionInitial() const
Get decision bits.
Definition: GlobalAlgBlk.h:82
void copyIntermToFinal()
Definition: GlobalAlgBlk.h:74
void copyInitialToInterm()
Copy vectors words.
Definition: GlobalAlgBlk.h:73
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
std::vector< std::vector< int > > m_prescaleCounterAlgoTrig
prescale counters: NumberPhysTriggers counters per bunch cross in event
Definition: GlobalBoard.h:258
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
bool m_firstEvLumiSegment
Definition: GlobalBoard.h:261
void setAlgoDecisionFinal(unsigned int bit, bool val)
void GlobalBoard::runGTL ( edm::Event iEvent,
const edm::EventSetup evSetup,
const TriggerMenu m_l1GtMenu,
const bool  produceL1GtObjectMapRecord,
const int  iBxInEvent,
std::auto_ptr< GlobalObjectMapRecord > &  gtObjectMapRecord,
const unsigned int  numberPhysTriggers,
const int  nrL1Mu,
const int  nrL1EG,
const int  nrL1Tau,
const int  nrL1Jet 
)

run the uGT GTL (Conditions and Algorithms)

DMP Start debugging here

Definition at line 412 of file GlobalBoard.cc.

References CorrelationTemplate::cond0Category(), CorrelationTemplate::cond0Index(), CorrelationTemplate::cond1Category(), CorrelationTemplate::cond1Index(), l1t::CondCalo, l1t::CondCorrelation, l1t::CondEnergySum, l1t::CondExternal, l1t::CondMuon, l1t::CondNull, TriggerMenu::corCaloTemplate(), TriggerMenu::corEnergySumTemplate(), TriggerMenu::corMuonTemplate(), l1t::AlgorithmEvaluation::evaluateAlgorithm(), l1t::ConditionEvaluation::evaluateConditionStoreResult(), newFWLiteAna::found, l1t::GlobalScales::getScalesName(), l1t::AlgorithmEvaluation::gtAlgoCombinationVector(), l1t::AlgorithmEvaluation::gtAlgoResult(), TriggerMenu::gtAlgorithmMap(), TriggerMenu::gtConditionMap(), TriggerMenu::gtScales(), LogDebug, LogTrace, match(), l1t::AlgorithmEvaluation::operandTokenVector(), reco::print(), l1t::ExternalCondition::print(), l1t::EnergySumCondition::print(), l1t::MuCondition::print(), l1t::CaloCondition::print(), l1t::CorrCondition::print(), l1t::AlgorithmEvaluation::print(), GlobalObjectMap::print(), GlobalObjectMap::setAlgoBitNumber(), GlobalObjectMap::setAlgoGtlResult(), GlobalObjectMap::setAlgoName(), l1t::CorrCondition::setScales(), l1t::ConditionEvaluation::setVerbosity(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalObjectMap::swapCombinationVector(), GlobalObjectMap::swapObjectTypeVector(), and GlobalObjectMap::swapOperandTokenVector().

Referenced by L1TGlobalProducer::produce().

421  {
422 
423  const std::vector<ConditionMap>& conditionMap = m_l1GtMenu->gtConditionMap();
424  const AlgorithmMap& algorithmMap = m_l1GtMenu->gtAlgorithmMap();
425  const GlobalScales& gtScales = m_l1GtMenu->gtScales();
426  const std::string scaleSetName = gtScales.getScalesName();
427  LogDebug("L1TGlobal") << " L1 Menu Scales -- Set Name: " << scaleSetName << std::endl;
428 
429  // Reset AlgBlk for this bx
430  m_uGtAlgBlk.reset();
431  m_algInitialOr=false;
432  m_algPrescaledOr=false;
433  m_algIntermOr=false;
434  m_algFinalOr=false;
435  m_algFinalOrVeto=false;
436 
437 
438  const std::vector<std::vector<MuonTemplate> >& corrMuon =
439  m_l1GtMenu->corMuonTemplate();
440 
441  // Comment out for now
442  const std::vector<std::vector<CaloTemplate> >& corrCalo =
443  m_l1GtMenu->corCaloTemplate();
444 
445  const std::vector<std::vector<EnergySumTemplate> >& corrEnergySum =
446  m_l1GtMenu->corEnergySumTemplate();
447 
448  LogDebug("L1TGlobal") << "Size corrMuon " << corrMuon.size()
449  << "\nSize corrCalo " << corrCalo.size()
450  << "\nSize corrSums " << corrEnergySum.size() << std::endl;
451 
452 
453  // loop over condition maps (one map per condition chip)
454  // then loop over conditions in the map
455  // save the results in temporary maps
456 
457  // never happens in production but at first event...
458  if (m_conditionResultMaps.size() != conditionMap.size()) {
459  m_conditionResultMaps.clear();
460  m_conditionResultMaps.resize(conditionMap.size());
461  }
462 
463  int iChip = -1;
464 
465  for (std::vector<ConditionMap>::const_iterator
466  itCondOnChip = conditionMap.begin(); itCondOnChip != conditionMap.end(); itCondOnChip++) {
467 
468  iChip++;
469 
471  m_conditionResultMaps[iChip];
472 
473 
474 
475  for (CItCond itCond = itCondOnChip->begin(); itCond != itCondOnChip->end(); itCond++) {
476 
477  // evaluate condition
478  switch ((itCond->second)->condCategory()) {
479  case CondMuon: {
480 
481  // BLW Not sure what to do with this for now
482  const int ifMuEtaNumberBits = 0;
483 
484  MuCondition* muCondition = new MuCondition(itCond->second, this,
485  nrL1Mu, ifMuEtaNumberBits);
486 
487  muCondition->setVerbosity(m_verbosity);
488 
489  muCondition->evaluateConditionStoreResult(iBxInEvent);
490 
491  // BLW COmment out for now
492  cMapResults[itCond->first] = muCondition;
493 
494  if (m_verbosity && m_isDebugEnabled) {
495  std::ostringstream myCout;
496  muCondition->print(myCout);
497 
498  LogTrace("L1TGlobal") << myCout.str() << std::endl;
499  }
500  //delete muCondition;
501 
502  }
503  break;
504  case CondCalo: {
505 
506  // BLW Not sure w hat to do with this for now
507  const int ifCaloEtaNumberBits = 0;
508 
509  CaloCondition* caloCondition = new CaloCondition(
510  itCond->second, this,
511  nrL1EG,
512  nrL1Jet,
513  nrL1Tau,
514  ifCaloEtaNumberBits);
515 
516  caloCondition->setVerbosity(m_verbosity);
517 
518  caloCondition->evaluateConditionStoreResult(iBxInEvent);
519 
520 
521  cMapResults[itCond->first] = caloCondition;
522 
523  if (m_verbosity && m_isDebugEnabled) {
524  std::ostringstream myCout;
525  caloCondition->print(myCout);
526 
527  LogTrace("L1TGlobal") << myCout.str() << std::endl;
528  }
529  // delete caloCondition;
530 
531  }
532  break;
533  case CondEnergySum: {
534 
535  EnergySumCondition* eSumCondition = new EnergySumCondition(
536  itCond->second, this);
537 
538  eSumCondition->setVerbosity(m_verbosity);
539  eSumCondition->evaluateConditionStoreResult(iBxInEvent);
540 
541  cMapResults[itCond->first] = eSumCondition;
542 
543  if (m_verbosity && m_isDebugEnabled) {
544  std::ostringstream myCout;
545  eSumCondition->print(myCout);
546 
547  LogTrace("L1TGlobal") << myCout.str() << std::endl;
548  }
549  // delete eSumCondition;
550 
551  }
552  break;
553 
554  case CondExternal: {
555 
556  ExternalCondition* extCondition = new ExternalCondition(
557  itCond->second, this);
558 
559  extCondition->setVerbosity(m_verbosity);
560  extCondition->evaluateConditionStoreResult(iBxInEvent);
561 
562  cMapResults[itCond->first] = extCondition;
563 
564  if (m_verbosity && m_isDebugEnabled) {
565  std::ostringstream myCout;
566  extCondition->print(myCout);
567 
568  LogTrace("L1TGlobal") << myCout.str() << std::endl;
569  }
570  // delete extCondition;
571 
572 
573  }
574  break;
575  case CondCorrelation: {
576 
577 
578 
579 
580  // get first the sub-conditions
581  const CorrelationTemplate* corrTemplate =
582  static_cast<const CorrelationTemplate*>(itCond->second);
583  const GtConditionCategory cond0Categ = corrTemplate->cond0Category();
584  const GtConditionCategory cond1Categ = corrTemplate->cond1Category();
585  const int cond0Ind = corrTemplate->cond0Index();
586  const int cond1Ind = corrTemplate->cond1Index();
587 
588  const GlobalCondition* cond0Condition = 0;
589  const GlobalCondition* cond1Condition = 0;
590 
591  // maximum number of objects received for evaluation of l1t::Type1s condition
592  int cond0NrL1Objects = 0;
593  int cond1NrL1Objects = 0;
594  LogDebug("L1TGlobal") << " cond0NrL1Objects" << cond0NrL1Objects << " cond1NrL1Objects " << cond1NrL1Objects << std::endl;
595 
596 
597  switch (cond0Categ) {
598  case CondMuon: {
599  cond0Condition = &((corrMuon[iChip])[cond0Ind]);
600  }
601  break;
602  case CondCalo: {
603  cond0Condition = &((corrCalo[iChip])[cond0Ind]);
604  }
605  break;
606  case CondEnergySum: {
607  cond0Condition = &((corrEnergySum[iChip])[cond0Ind]);
608  }
609  break;
610  default: {
611  // do nothing, should not arrive here
612  }
613  break;
614  }
615 
616  switch (cond1Categ) {
617  case CondMuon: {
618  cond1Condition = &((corrMuon[iChip])[cond1Ind]);
619  }
620  break;
621  case CondCalo: {
622  cond1Condition = &((corrCalo[iChip])[cond1Ind]);
623  }
624  break;
625  case CondEnergySum: {
626  cond1Condition = &((corrEnergySum[iChip])[cond1Ind]);
627  }
628  break;
629  default: {
630  // do nothing, should not arrive here
631  }
632  break;
633  }
634 
635  CorrCondition* correlationCond =
636  new CorrCondition(itCond->second, cond0Condition, cond1Condition, this);
637 
638  correlationCond->setVerbosity(m_verbosity);
639  correlationCond->setScales(&gtScales);
640  correlationCond->evaluateConditionStoreResult(iBxInEvent);
641 
642  cMapResults[itCond->first] = correlationCond;
643 
644  if (m_verbosity && m_isDebugEnabled) {
645  std::ostringstream myCout;
646  correlationCond->print(myCout);
647 
648  LogTrace("L1TGlobal") << myCout.str() << std::endl;
649  }
650 
651  // delete correlationCond;
652 
653 
654  }
655  break;
656  case CondNull: {
657 
658  // do nothing
659 
660  }
661  break;
662  default: {
663  // do nothing
664 
665  }
666  break;
667  }
668 
669  }
670 
671  }
672 
673  // loop over algorithm map
675  // empty vector for object maps - filled during loop
676  std::vector<GlobalObjectMap> objMapVec;
677  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) objMapVec.reserve(numberPhysTriggers);
678 
679  for (CItAlgo itAlgo = algorithmMap.begin(); itAlgo != algorithmMap.end(); itAlgo++) {
680  AlgorithmEvaluation gtAlg(itAlgo->second);
681  gtAlg.evaluateAlgorithm((itAlgo->second).algoChipNumber(), m_conditionResultMaps);
682 
683  int algBitNumber = (itAlgo->second).algoBitNumber();
684  bool algResult = gtAlg.gtAlgoResult();
685 
686  LogDebug("L1TGlobal") << " ===> for iBxInEvent = " << iBxInEvent << ":\t algBitName = " << itAlgo->first << ",\t algBitNumber = " << algBitNumber << ",\t algResult = " << algResult << std::endl;
687 
688  if (algResult) {
689 // m_gtlAlgorithmOR.set(algBitNumber);
690  m_uGtAlgBlk.setAlgoDecisionInitial(algBitNumber,algResult);
691  m_algInitialOr = true;
692  }
693 
694  if (m_verbosity && m_isDebugEnabled) {
695  std::ostringstream myCout;
696  ( itAlgo->second ).print(myCout);
697  gtAlg.print(myCout);
698 
699  LogTrace("L1TGlobal") << myCout.str() << std::endl;
700  }
701 
702 
703  // object maps only for BxInEvent = 0
704  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
705 
706  std::vector<ObjectTypeInCond> otypes;
707  for (auto iop = gtAlg.operandTokenVector().begin(); iop != gtAlg.operandTokenVector().end(); ++iop){
708  //cout << "INFO: operand name: " << iop->tokenName << "\n";
709  int myChip = -1;
710  int found =0;
711  ObjectTypeInCond otype;
712  for (auto imap = conditionMap.begin(); imap != conditionMap.end(); imap++) {
713  myChip++;
714  auto match = imap->find(iop->tokenName);
715 
716  if (match != imap->end()){
717  found = 1;
718  //cout << "DEBUG: found match for " << iop->tokenName << " at " << match->first << "\n";
719 
720  otype = match->second->objectType();
721 
722  for (auto itype = otype.begin(); itype != otype.end() ; itype++){
723  //cout << "type: " << *itype << "\n";
724  }
725  }
726  }
727  if (!found){
728  edm::LogWarning("L1TGlobal") << "\n Failed to find match for operand token " << iop->tokenName << "\n";
729  } else {
730  otypes.push_back(otype);
731  }
732  }
733 
734  // set object map
735  GlobalObjectMap objMap;
736 
737  objMap.setAlgoName(itAlgo->first);
738  objMap.setAlgoBitNumber(algBitNumber);
739  objMap.setAlgoGtlResult(algResult);
740  objMap.swapOperandTokenVector(gtAlg.operandTokenVector());
741  objMap.swapCombinationVector(gtAlg.gtAlgoCombinationVector());
742  // gtAlg is empty now...
743  objMap.swapObjectTypeVector(otypes);
744 
745  if (m_verbosity && m_isDebugEnabled) {
746  std::ostringstream myCout1;
747  objMap.print(myCout1);
748 
749  LogTrace("L1TGlobal") << myCout1.str() << std::endl;
750  }
751 
752  objMapVec.push_back(objMap);
753 
754  }
755 
756 
757  }
758 
759  // object maps only for BxInEvent = 0
760  if (produceL1GtObjectMapRecord && (iBxInEvent == 0)) {
761  gtObjectMapRecord->swapGtObjectMap(objMapVec);
762  }
763 
764  // loop over condition maps (one map per condition chip)
765  // then loop over conditions in the map
766  // delete the conditions created with new, zero pointer, do not clear map, keep the vector as is...
767  for (std::vector<AlgorithmEvaluation::ConditionEvaluationMap>::iterator
768  itCondOnChip = m_conditionResultMaps.begin();
769  itCondOnChip != m_conditionResultMaps.end(); itCondOnChip++) {
770 
772  itCond = itCondOnChip->begin();
773  itCond != itCondOnChip->end(); itCond++) {
774 
775  delete itCond->second;
776  itCond->second = 0;
777  }
778  }
779 
780 }
#define LogDebug(id)
void print(std::ostream &myCout) const
print condition
void setAlgoBitNumber(int algoBitNumberValue)
void evaluateConditionStoreResult(const int bxEval)
call evaluateCondition and save last result
void swapOperandTokenVector(std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
const l1t::GlobalScales & gtScales() const
get the scales
Definition: TriggerMenu.h:205
void setAlgoDecisionInitial(unsigned int bit, bool val)
Set decision bits.
Definition: GlobalAlgBlk.cc:88
std::map< std::string, L1GtAlgorithm > AlgorithmMap
map containing the algorithms
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:10
void print(std::ostream &myCout) const
print condition
ConditionMap::const_iterator CItCond
iterators through map containing the conditions
void setVerbosity(const int verbosity)
void print(std::ostream &myCout) const
print condition
Definition: MuCondition.cc:516
const l1t::GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
__gnu_cxx::hash_map< std::string, ConditionEvaluation * > ConditionEvaluationMap
copy constructor
void print(std::ostream &myCout) const
print condition
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
Definition: TriggerMenu.h:180
void swapCombinationVector(std::vector< CombinationsInCond > &combinationVectorValue)
ConditionEvaluationMap::iterator ItEvalMap
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
Definition: TriggerMenu.h:171
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
GtConditionCategory
condition categories
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266
void print(std::ostream &myCout) const
print the full object map
const l1t::GtConditionCategory cond1Category() const
void reset()
reset the content of a GlobalAlgBlk
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
void setAlgoGtlResult(bool algoGtlResultValue)
const l1t::AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: TriggerMenu.h:190
void print(std::ostream &myCout) const
print condition
const int cond1Index() const
const std::vector< l1t::ConditionMap > & gtConditionMap() const
get / set / build the condition maps
Definition: TriggerMenu.h:76
void setScales(const GlobalScales *)
#define LogTrace(id)
std::vector< L1GtObject > ObjectTypeInCond
void swapObjectTypeVector(std::vector< ObjectTypeInCond > &objectTypeVectorValue)
GlobalAlgBlk m_uGtAlgBlk
Definition: GlobalBoard.h:252
void setAlgoName(const std::string &algoNameValue)
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
Definition: TriggerMenu.h:164
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
virtual std::string getScalesName() const
Definition: GlobalScales.cc:36
std::vector< AlgorithmEvaluation::ConditionEvaluationMap > m_conditionResultMaps
Definition: GlobalBoard.h:255
void GlobalBoard::setBxFirst ( int  bx)

Definition at line 106 of file GlobalBoard.cc.

106  {
107 
108  m_bxFirst_ = bx;
109 
110 }
void GlobalBoard::setBxLast ( int  bx)

Definition at line 112 of file GlobalBoard.cc.

112  {
113 
114  m_bxLast_ = bx;
115 
116 }
void l1t::GlobalBoard::setVerbosity ( const int  verbosity)
inline

Definition at line 210 of file GlobalBoard.h.

References m_verbosity, and HLT_25ns10e33_v2_cff::verbosity.

Referenced by L1TGlobalProducer::L1TGlobalProducer().

210  {
212  }
int m_verbosity
verbosity level
Definition: GlobalBoard.h:266

Member Data Documentation

bool l1t::GlobalBoard::m_algFinalOr
private

Definition at line 273 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algFinalOrVeto
private

Definition at line 274 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algInitialOr
private

Definition at line 270 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algIntermOr
private

Definition at line 271 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_algPrescaledOr
private

Definition at line 272 of file GlobalBoard.h.

unsigned int l1t::GlobalBoard::m_boardEventCount
private

Definition at line 278 of file GlobalBoard.h.

Referenced by GlobalBoard().

int l1t::GlobalBoard::m_bxFirst_
private

Definition at line 246 of file GlobalBoard.h.

int l1t::GlobalBoard::m_bxLast_
private

Definition at line 247 of file GlobalBoard.h.

BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::m_candL1EG
private

Definition at line 235 of file GlobalBoard.h.

Referenced by getCandL1EG().

BXVector<const l1t::EtSum*>* l1t::GlobalBoard::m_candL1EtSum
private

Definition at line 238 of file GlobalBoard.h.

Referenced by getCandL1EtSum().

BXVector<const GlobalExtBlk*>* l1t::GlobalBoard::m_candL1External
private

Definition at line 239 of file GlobalBoard.h.

Referenced by getCandL1External().

BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::m_candL1Jet
private

Definition at line 237 of file GlobalBoard.h.

Referenced by getCandL1Jet().

BXVector<const l1t::Muon*>* l1t::GlobalBoard::m_candL1Mu
private

Definition at line 234 of file GlobalBoard.h.

Referenced by getCandL1Mu().

BXVector<const l1t::L1Candidate*>* l1t::GlobalBoard::m_candL1Tau
private

Definition at line 236 of file GlobalBoard.h.

Referenced by getCandL1Tau().

std::vector<AlgorithmEvaluation::ConditionEvaluationMap> l1t::GlobalBoard::m_conditionResultMaps
private

Definition at line 255 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_firstEv
private

Definition at line 260 of file GlobalBoard.h.

bool l1t::GlobalBoard::m_firstEvLumiSegment
private

Definition at line 261 of file GlobalBoard.h.

std::bitset<GlobalAlgBlk::maxPhysicsTriggers> l1t::GlobalBoard::m_gtlAlgorithmOR
private

Definition at line 249 of file GlobalBoard.h.

Referenced by getAlgorithmOR(), and GlobalBoard().

std::bitset<GlobalAlgBlk::maxPhysicsTriggers> l1t::GlobalBoard::m_gtlDecisionWord
private

Definition at line 250 of file GlobalBoard.h.

Referenced by getDecisionWord(), and GlobalBoard().

bool l1t::GlobalBoard::m_isDebugEnabled
private

Definition at line 267 of file GlobalBoard.h.

const L1CaloGeometry* l1t::GlobalBoard::m_l1CaloGeometry
private

Definition at line 223 of file GlobalBoard.h.

unsigned long long l1t::GlobalBoard::m_l1CaloGeometryCacheID
private

Definition at line 224 of file GlobalBoard.h.

Referenced by GlobalBoard().

const TriggerMenu* l1t::GlobalBoard::m_l1GtMenu
private

Definition at line 219 of file GlobalBoard.h.

unsigned long long l1t::GlobalBoard::m_l1GtMenuCacheID
private

Definition at line 220 of file GlobalBoard.h.

Referenced by GlobalBoard().

const L1MuTriggerScales* l1t::GlobalBoard::m_l1MuTriggerScales
private

Definition at line 226 of file GlobalBoard.h.

unsigned long long l1t::GlobalBoard::m_l1MuTriggerScalesCacheID
private

Definition at line 227 of file GlobalBoard.h.

Referenced by GlobalBoard().

std::vector<std::vector<int> > l1t::GlobalBoard::m_prescaleCounterAlgoTrig
private

prescale counters: NumberPhysTriggers counters per bunch cross in event

Definition at line 258 of file GlobalBoard.h.

GlobalAlgBlk l1t::GlobalBoard::m_uGtAlgBlk
private

Definition at line 252 of file GlobalBoard.h.

Referenced by GlobalBoard().

int l1t::GlobalBoard::m_uGtBoardNumber
private

Definition at line 281 of file GlobalBoard.h.

Referenced by GlobalBoard().

bool l1t::GlobalBoard::m_uGtFinalBoard
private

Definition at line 282 of file GlobalBoard.h.

Referenced by GlobalBoard().

int l1t::GlobalBoard::m_verbosity
private

verbosity level

Definition at line 266 of file GlobalBoard.h.

Referenced by setVerbosity().