ATLAS Offline Software
TrigSignatureMoni.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #include <algorithm>
5 #include <regex>
6 
7 #include "GaudiKernel/IIncidentSvc.h"
8 #include "Gaudi/Property.h"
11 #include "TrigSignatureMoni.h"
12 
13 TrigSignatureMoni::TrigSignatureMoni(const std::string& name, ISvcLocator* pSvcLocator)
14  : base_class(name, pSvcLocator)
15 {}
16 
18  ATH_CHECK(m_l1DecisionsKey.initialize());
19  ATH_CHECK(m_finalDecisionKey.initialize());
24  ATH_CHECK(m_histSvc.retrieve());
25 
26  ATH_CHECK(m_incidentSvc.retrieve());
28 
29  return StatusCode::SUCCESS;
30 }
31 
35  ATH_CHECK(hltMenuHandle.isValid());
36 
37  // Retrieve chain information from menus
38  m_groupToChainMap.clear();
39  m_streamToChainMap.clear();
40  m_expressChainMap.clear();
41  m_chainIDToBunchMap.clear();
42 
43  std::unordered_map<std::string,std::string> mapStrNameToTypeName; // e.g. {Main -> physics_Main}
44  try {
45  for (const TrigConf::DataStructure& stream : hltMenuHandle->streams()) {
46  mapStrNameToTypeName.insert({stream.getAttribute("name"), stream.getAttribute("type")+"_"+stream.getAttribute("name")});
47  }
48  } catch (const std::exception& ex) {
49  ATH_MSG_ERROR("Exception reading stream tag configuration from the HLT menu: " << ex.what());
50  return StatusCode::FAILURE;
51  }
52 
53  for (const TrigConf::Chain& chain : *hltMenuHandle) {
54  for (const std::string& group : chain.groups()) {
55  // Save chains per RATE group
56  if (group.starts_with( "RATE")){
58  }
59  }
60 
61  // Save chain to stream map
62  for (const std::string& streamName : chain.streams()){
63  const auto it = mapStrNameToTypeName.find(streamName);
64  if (it==mapStrNameToTypeName.cend()) {
65  ATH_MSG_ERROR("Stream name " << streamName << " assigned to chain " << chain.name()
66  << " is missing from menu streams definition");
67  return StatusCode::FAILURE;
68  }
69  if (it->second == "express_express") {
70  m_expressChainMap[it->second].insert(HLT::Identifier(chain.name()));
71  } else {
72  m_streamToChainMap[it->second].insert(HLT::Identifier(chain.name()));
73  }
74  }
75  }
76 
77  // Prepare the histograms
78 
79  // Initialize SignatureAcceptance and DecisionCount histograms that will monitor
80  // chains, groups and sequences per each step
81  const int x {nBinsX(hltMenuHandle)};
82  const int y {nSteps()};
83  ATH_MSG_DEBUG( "Histogram " << x << " x " << y << " bins");
84  std::unique_ptr<TH2> hSA = std::make_unique<TH2I>("SignatureAcceptance", "Raw acceptance of signatures in;chain;step", x, 1, x + 1, y, 1, y + 1);
85  std::unique_ptr<TH2> hDC = std::make_unique<TH2I>("DecisionCount", "Positive decisions count per step;chain;step", x, 1, x + 1, y, 1, y + 1);
86 
87  ATH_CHECK(m_histSvc->regShared(m_bookingPath + "/" + name() + "/SignatureAcceptance", std::move(hSA), m_passHistogram));
88  ATH_CHECK(m_histSvc->regShared(m_bookingPath + "/" + name() + "/DecisionCount", std::move(hDC), m_countHistogram));
89 
90  ATH_CHECK(initHist(m_passHistogram, hltMenuHandle));
91  ATH_CHECK(initHist(m_countHistogram, hltMenuHandle));
92 
93  // Initialize Rate histogram to save the rates of positive decisions in given interval
94  // per chain/group/sequence per in, after ps, out steps
95  const int yr {nBaseSteps()};
96  if ( x > 0 ){
97  std::string outputRateName ("Rate" + std::to_string(m_duration) + "s");
98  m_rateHistogram.init(outputRateName, "Rate of positive decisions;chain;step",
99  x, yr, m_bookingPath + "/" + name() + '/' + outputRateName, m_histSvc).ignore();
100  ATH_CHECK(initHist(m_rateHistogram.getHistogram(), hltMenuHandle, false));
101  ATH_CHECK(initHist(m_rateHistogram.getBuffer(), hltMenuHandle, false));
102  }
103 
104  // Initialize SequencesExecutionRate histogram to save the rates of sequences execution
105  // Save sequences names to be monitored
106  std::set<std::string> sequencesSet;
107  for (auto& ctool: m_decisionCollectorTools){
108  ctool->getSequencesNames(sequencesSet);
109  }
110  const int xc = sequencesSet.size();
111  const int yc {1}; // Only rate, this histogram is really 1 D
112  if (xc > 0){
113  std::string outputSequenceName ("SequencesExecutionRate" + std::to_string(m_duration) + "s");
114  m_sequenceHistogram.init(outputSequenceName, "Rate of sequences execution;sequence;rate",
115  xc, yc, m_bookingPath + "/" + name() + '/' + outputSequenceName, m_histSvc).ignore();
116  ATH_CHECK(initSeqHist(m_sequenceHistogram.getHistogram(), sequencesSet));
117  ATH_CHECK(initSeqHist(m_sequenceHistogram.getBuffer(), sequencesSet));
118  }
119 
120  return StatusCode::SUCCESS;
121 }
122 
126 
127  if (m_chainIDToBinMap.empty()) {
128  ATH_MSG_INFO( "No chains configured, no counts to print" );
129  return StatusCode::SUCCESS;
130  }
131 
132  auto fixedWidth = [](const std::string& s, size_t sz) {
133  std::ostringstream ss;
134  ss << std::setw(sz) << std::left << s;
135  return ss.str();
136  };
137 
139  ATH_CHECK(hltMenuHandle.isValid());
140 
141  // Retrieve information whether chain was active in Step
142  std::map<std::string, std::set<int>> chainToStepsId;
143  for (const TrigConf::Chain& chain : *hltMenuHandle){
144  int nstep {1}; // Start from step=1
145  for (const std::string& seqName : chain.sequencers()){
146  // Example sequencer name is "Step1_FastCalo_electron", we need only information about Step + number
147  std::smatch stepNameMatch;
148  std::regex_search(seqName.begin(), seqName.end(), stepNameMatch, std::regex("[Ss]tep[0-9]+"));
149 
150  std::string stepName = stepNameMatch[0];
151  stepName[0] = std::toupper(stepName[0]); // Fix "stepX" -> "StepX"
152  // Check that the step name is set with the same position in the execution (empty steps support)
153  if ("Step" + std::to_string(nstep) == stepName) {
154  chainToStepsId[chain.name()].insert(nstep);
155  } else {
156  ATH_MSG_DEBUG("Missing counts for step" << nstep << " in chain " << chain.name());
157  }
158  nstep++;
159  }
160  }
161 
162  auto collToString = [&](int xbin, const LockedHandle<TH2>& hist, int startOfset=0, int endOffset=0){
163  std::string v;
164  const int stepsSize = hist->GetYaxis()->GetNbins() - nBaseSteps();
165  for (int ybin = 1; ybin <= hist->GetYaxis()->GetNbins()-endOffset; ++ybin) {
166  if (ybin > startOfset) {
167  // Skip steps where chain wasn't active
168  // ybins are for all axis labes, steps are in bins from 3 to stepsSize + 2
169  const std::string chainName = m_passHistogram->GetXaxis()->GetBinLabel(xbin);
170 
171  if (ybin < 3 || ybin > stepsSize + 2 || chainToStepsId[chainName].count(ybin - 2) != 0) {
172  v += fixedWidth(std::to_string( int(hist->GetBinContent( xbin, ybin ))) , 11);
173  } else {
174  v += fixedWidth("-", 11);
175  }
176  } else {
177  v += fixedWidth(" ", 11);
178  }
179  }
180  return v;
181  };
182 
183  std::string v;
184  v += fixedWidth("L1", 11);
185  v += fixedWidth("AfterPS", 11);
186  for (int bin = 1; bin <= m_passHistogram->GetYaxis()->GetNbins()-nBaseSteps(); ++bin) {
187  v += fixedWidth("Step" + std::to_string(bin), 11);
188  }
189  v += fixedWidth("Output", 11);
190  v += fixedWidth("Express", 11);
191 
192  ATH_MSG_INFO("Chains passing step (1st row events & 2nd row decision counts):");
193  ATH_MSG_INFO(fixedWidth("ChainName", 30) << v);
194 
195  /*
196  comment for future dev:
197  for combined chains we find x2 the number of decisions, because we count both the HypoAlg and the combo Alg decisions
198  */
199 
200  for (int bin = 1; bin <= (*m_passHistogram)->GetXaxis()->GetNbins(); ++bin) {
201  const std::string chainName = m_passHistogram->GetXaxis()->GetBinLabel(bin);
202  const std::string chainID = std::to_string( HLT::Identifier(chainName) );
203  if (chainName.starts_with( "HLT")) { // print only for chains
204  ATH_MSG_INFO( chainName + " #" + chainID);
205  ATH_MSG_INFO( fixedWidth("-- #" + chainID + " Events", 30) << collToString( bin, m_passHistogram) );
206  ATH_MSG_INFO( fixedWidth("-- #" + chainID + " Features", 30) << collToString( bin, m_countHistogram , 2, 1 ) );
207  }
208  if (chainName.starts_with( "All")){
209  ATH_MSG_INFO( fixedWidth(chainName, 30) << collToString( bin, m_passHistogram) );
210  }
211  }
212 
213  return StatusCode::SUCCESS;
214 }
215 
217  for (TrigCompositeUtils::DecisionID id : dc) {
218  auto id2bin = m_chainIDToBinMap.find( id );
219  if ( id2bin == m_chainIDToBinMap.end() && HLT::Identifier(id).name().find("leg") != 0 ) {
220  ATH_MSG_WARNING( "HLT chain " << HLT::Identifier(id) << " not configured to be monitored" );
221  } else {
222  histogram->Fill( id2bin->second, double(row) );
223  }
224  }
225  return StatusCode::SUCCESS;
226 }
227 
229  return fillHistogram(dc, row, m_rateHistogram.getBuffer());
230 }
231 
233  return fillHistogram(dc, row, m_passHistogram);
234 }
235 
236 StatusCode TrigSignatureMoni::fillDecisionCount(const std::vector<TrigCompositeUtils::DecisionID>& dc, int row) const {
237  for (TrigCompositeUtils::DecisionID id : dc) {
240  auto id2bin = m_chainIDToBinMap.find( chain );
241  if ( id2bin == m_chainIDToBinMap.end()) {
242  ATH_MSG_WARNING("HLT chain " << HLT::Identifier(chain) << " not configured to be monitored");
243  } else {
244  m_countHistogram->Fill(id2bin->second, double(row));
245  }
246  }
247 
248  return StatusCode::SUCCESS;
249 
250 }
251 
252 StatusCode TrigSignatureMoni::fillSequences(const std::set<std::string>& sequences) const {
253  for (const std::string& seq : sequences) {
255  }
256 
257  return StatusCode::SUCCESS;
258 }
259 
260 StatusCode TrigSignatureMoni::fillStreamsAndGroups(const std::map<std::string, TrigCompositeUtils::DecisionIDContainer>& nameToChainsMap, const TrigCompositeUtils::DecisionIDContainer& dc) const {
261  const int countOutputRow {nSteps()-1};
262  const int rateOutputRow {nBaseSteps()-1};
263  for (const auto& name : nameToChainsMap) {
264  for (TrigCompositeUtils::DecisionID id : dc) {
265  if (name.second.find(id) != name.second.end()){
266  double bin = m_nameToBinMap.at(name.first);
267  m_countHistogram->Fill(bin, countOutputRow);
268  m_rateHistogram.fill(bin, rateOutputRow);
269  m_passHistogram->Fill(bin, countOutputRow);
270  break;
271  }
272  }
273  }
274  return StatusCode::SUCCESS;
275 }
276 
277 void TrigSignatureMoni::handle( const Incident& incident ) {
278  // Create and start timer after fork
279  if (incident.type() == AthenaInterprocess::UpdateAfterFork::type()) {
281  ATH_MSG_WARNING("Timer is already running. UpdateAfterFork incident called more than once?");
282  return;
283  }
284 
285  // Prevent from publishing empty histograms
286  if (nBinsX() > 0) {
288  }
289 
290  if (nSequenceBins() > 0) {
292  }
293 
294  ATH_MSG_DEBUG("Started rate timer");
295  }
296 }
297 
298 StatusCode TrigSignatureMoni::execute( const EventContext& context ) const {
299 
301 
302  const TrigCompositeUtils::Decision* l1SeededChains = nullptr; // Activated by L1
303  const TrigCompositeUtils::Decision* unprescaledChains = nullptr; // Activated and passed prescale check
304  for (const TrigCompositeUtils::Decision* d : *l1Decisions) {
305  if (d->name() == "l1seeded") {
306  l1SeededChains = d;
307  } else if (d->name() == "unprescaled") {
308  unprescaledChains = d;
309  }
310  }
311 
312  if (l1SeededChains == nullptr || unprescaledChains == nullptr) {
313  ATH_MSG_ERROR("Unable to read in the summary from the HLTSeeding.");
314  return StatusCode::FAILURE;
315  }
316 
317  auto fillL1 = [&](int index) -> StatusCode {
319  TrigCompositeUtils::decisionIDs(l1Decisions->at(index), ids);
320  ATH_MSG_DEBUG( "L1 " << index << " N positive decisions " << ids.size() );
322  ATH_CHECK(fillRate(ids, index + 1));
323  if (!ids.empty()){
324  m_passHistogram->Fill(1, double(index + 1));
325  m_rateHistogram.fill(1, double(index + 1));
326  }
327  return StatusCode::SUCCESS;
328  };
329 
330  // Fill histograms with L1 decisions in and after prescale
331  ATH_CHECK(fillL1(0));
332  ATH_CHECK(fillL1(1));
333 
334  // Fill HLT steps
335  int step = 0;
336  for ( auto& ctool: m_decisionCollectorTools ) {
337  std::vector<TrigCompositeUtils::DecisionID> stepSum;
338  std::set<std::string> stepSequences;
339  ctool->getDecisions( stepSum, context );
340  ctool->getSequencesPerEvent( stepSequences, context );
341  ATH_MSG_DEBUG( " Step " << step << " decisions (for decisions): " << stepSum.size() );
342  TrigCompositeUtils::DecisionIDContainer stepUniqueSum( stepSum.begin(), stepSum.end() );
343  ATH_CHECK( fillPassEvents( stepUniqueSum, 3+step ) );
344  ATH_CHECK( fillSequences( stepSequences ) );
345  ++step;
346  }
347 
348  step = 0;
349  for ( auto& ctool: m_featureCollectorTools ) {
350  std::vector<TrigCompositeUtils::DecisionID> stepSum;
351  std::set<std::string> stepSequences;
352  ctool->getDecisions( stepSum, context );
353  ATH_MSG_DEBUG( " Step " << step << " decisions (for features): " << stepSum.size() );
354  TrigCompositeUtils::DecisionIDContainer stepUniqueSum( stepSum.begin(), stepSum.end() );
355  ATH_CHECK( fillDecisionCount( stepSum, 3+step ) );
356  ++step;
357  }
358 
359  // Collect the final decisions
361  ATH_CHECK( finalDecisionsHandle.isValid() );
363  const TrigCompositeUtils::Decision* decisionObject = TrigCompositeUtils::getTerminusNode(*finalDecisionsHandle);
364  if (!decisionObject) {
365  ATH_MSG_WARNING("Unable to locate trigger navigation terminus node. Cannot tell which chains passed the event.");
366  } else {
367  TrigCompositeUtils::decisionIDs(decisionObject, finalIDs);
368  }
369 
370  // Collect the express stream decisions
372  const TrigCompositeUtils::Decision* expressDecisionObject = TrigCompositeUtils::getExpressTerminusNode(*finalDecisionsHandle);
373  if (!expressDecisionObject) {
374  ATH_MSG_WARNING("Unable to locate trigger navigation express terminus node. Cannot tell which chains passed the express stream in this event.");
375  } else {
376  TrigCompositeUtils::decisionIDs(expressDecisionObject, expressFinalIDs);
377  }
378 
379  // Fill the histograms with output counts/rate
380  const int countOutputRow {nSteps()-1};
381  const int rateOutputRow {nBaseSteps()-1};
384  ATH_CHECK( fillPassEvents(finalIDs, countOutputRow));
385  ATH_CHECK( fillRate(finalIDs, rateOutputRow));
386 
387  // Fill the histograms with express counts/rate
388  const int countExpressRow {nSteps()};
389  const int rateExpressRow {nBaseSteps()};
391  ATH_CHECK( fillPassEvents(expressFinalIDs, countExpressRow));
392  ATH_CHECK( fillRate(expressFinalIDs, rateExpressRow));
393 
394  // Fill the "All" column in counts/rate histograms
395  if (!finalIDs.empty()) {
396  m_passHistogram->Fill(1, double(countOutputRow));
397  m_rateHistogram.fill(1, double(rateOutputRow));
398  }
399  if (!expressFinalIDs.empty()) {
400  m_passHistogram->Fill(1, double(countExpressRow));
401  m_rateHistogram.fill(1, double(rateExpressRow));
402  }
403 
404  return StatusCode::SUCCESS;
405 }
406 
408  return nChains(hltMenuHandle) + m_groupToChainMap.size() + m_streamToChainMap.size() + m_expressChainMap.size();
409 }
410 
412  return m_chainIDToBinMap.size() + m_groupToChainMap.size() + m_streamToChainMap.size() + m_expressChainMap.size() + 1;
413 }
414 
416  return hltMenuHandle->size() + 1; // Chains + "All"
417 }
418 
420  return m_sequenceToBinMap.size();
421 }
422 
424  return m_decisionCollectorTools.size() + nBaseSteps();
425 }
426 
428  return 4; // in, after ps, out, express
429 }
430 
432  TAxis* x = hist->GetXaxis();
433  x->SetBinLabel(1, "All");
434  int bin = 2; // 1 is for total count, (remember bins numbering in ROOT start from 1)
435 
436  std::set<std::string> sortedChainsList;
437  for ( const TrigConf::Chain& chain: *hltMenuHandle ) {
438  sortedChainsList.insert( chain.name() );
439  }
440 
441  for ( const std::string& chainName: sortedChainsList ) {
442 
443  x->SetBinLabel( bin, chainName.c_str() );
445  bin++;
446  }
447 
448 
449  for ( const auto& stream : m_streamToChainMap){
450  x->SetBinLabel( bin, ("str_"+stream.first).c_str());
451  m_nameToBinMap[ stream.first ] = bin;
452  bin++;
453  }
454 
455  for ( const auto& stream : m_expressChainMap){
456  x->SetBinLabel( bin, ("str_"+stream.first).c_str());
457  m_nameToBinMap[ stream.first ] = bin;
458  bin++;
459  }
460 
461  for ( const auto& group : m_groupToChainMap){
462  x->SetBinLabel( bin, ("grp_"+group.first.substr(group.first.find(':')+1)).c_str() );
463  m_nameToBinMap[ group.first ] = bin;
464  bin++;
465  }
466 
467 
468  TAxis* y = hist->GetYaxis();
469  y->SetBinLabel(1, steps ? "L1" : "Input");
470  y->SetBinLabel(2, "AfterPS");
471  for ( size_t i = 0; steps && i < m_decisionCollectorTools.size(); ++i) {
472  y->SetBinLabel(3 + i, ("Step "+std::to_string(i)).c_str());
473  }
474  y->SetBinLabel(y->GetNbins()-1, "Output"); // Second to last bin
475  y->SetBinLabel(y->GetNbins(), "Express"); // Last bin
476 
477  return StatusCode::SUCCESS;
478 }
479 
480 StatusCode TrigSignatureMoni::initSeqHist(LockedHandle<TH2>& hist, std::set<std::string>& sequenceSet) {
481  TAxis* x = hist->GetXaxis();
482  int bin = 1;
483 
484  // Set bin labels
485  for (const std::string& seqName : sequenceSet) {
486  x->SetBinLabel(bin, seqName.c_str());
487  m_sequenceToBinMap[seqName] = bin;
488  ++bin;
489  }
490 
491  TAxis* y = hist->GetYaxis();
492  y->SetBinLabel(1, "Rate");
493 
494  return StatusCode::SUCCESS;
495 }
496 
497 
499  delete m_bufferHistogram.get();
500 }
501 
502 StatusCode TrigSignatureMoni::RateHistogram::init( const std::string& histoName, const std::string& histoTitle,
503  const int x, const int y, const std::string& registerPath, const ServiceHandle<ITHistSvc>& histSvc ){
504  std::unique_ptr<TH2> h = std::make_unique<TH2F>(histoName.c_str(), histoTitle.c_str(), x, 1, x + 1, y, 1, y + 1);
505  ATH_CHECK( histSvc->regShared( registerPath.c_str(), std::move(h), m_histogram));
506 
507  TH2I * hB = new TH2I( (histoName + "Buffer").c_str(), histoTitle.c_str(), x, 1, x + 1, y, 1, y + 1);
508  m_bufferHistogram.set(hB, &m_mutex);
509  m_bufferHistogram->SetDirectory(0);
510 
511  return StatusCode::SUCCESS;
512 }
513 
514 LockedHandle<TH2> & TrigSignatureMoni::RateHistogram::getHistogram ATLAS_NOT_CONST_THREAD_SAFE () const {
515  return m_histogram;
516 }
517 
518 LockedHandle<TH2> & TrigSignatureMoni::RateHistogram::getBuffer ATLAS_NOT_CONST_THREAD_SAFE () const {
519  return m_bufferHistogram;
520 }
521 
522 std::unique_ptr<Athena::AlgorithmTimer> & TrigSignatureMoni::RateHistogram::getTimer() {
523  return m_timer;
524 }
525 
526 void TrigSignatureMoni::RateHistogram::fill(const double x, const double y) const {
527  m_bufferHistogram->Fill(x, y);
528 }
529 
530 void TrigSignatureMoni::RateHistogram::startTimer(unsigned int duration, unsigned int intervals) {
532  m_timeDivider = std::make_unique<TimeDivider>(intervals, duration, TimeDivider::seconds);
533  m_timer = std::make_unique<Athena::AlgorithmTimer>(duration*50, std::bind(&RateHistogram::callback, this));
534 }
535 
537  if (m_timer) {
538  m_timer->stop();
539  time_t t = time(0);
540  unsigned int interval;
541  unsigned int duration = m_timeDivider->forcePassed(t, interval);
542  updatePublished(duration); // Divide by time that really passed not by interval duration
543  }
544 
545 }
546 
548  m_histogram->Reset("ICES");
549  m_histogram->Add(m_bufferHistogram.get(), 1./duration);
550  m_bufferHistogram->Reset("ICES");
551 }
552 
553 
555  // Ask time divider if we need to switch to new interval
556  time_t t = time(0);
557  unsigned int newinterval;
558  unsigned int oldinterval;
559 
560  if (m_timeDivider->isPassed(t, newinterval, oldinterval)) {
561  updatePublished(m_duration);
562  }
563 
564  // Schedule itself in another 1/20 of the integration period in milliseconds
565  if (m_timer) m_timer->start(m_duration*50);
566 }
test_athena_ntuple_filter.seq
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...
Definition: test_athena_ntuple_filter.py:18
query_example.row
row
Definition: query_example.py:24
TrigSignatureMoni::TrigSignatureMoni
TrigSignatureMoni(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigSignatureMoni.cxx:13
TrigSignatureMoni::m_groupToChainMap
std::map< std::string, TrigCompositeUtils::DecisionIDContainer > m_groupToChainMap
Group name to chain objects map.
Definition: TrigSignatureMoni.h:118
TrigSignatureMoni::RateHistogram::getTimer
std::unique_ptr< Athena::AlgorithmTimer > & getTimer()
Definition: TrigSignatureMoni.cxx:522
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
fitman.sz
sz
Definition: fitman.py:527
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition: TrigComposite_v1.h:27
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
hist_file_dump.d
d
Definition: hist_file_dump.py:137
plotmaker.hist
hist
Definition: plotmaker.py:148
TrigSignatureMoni::m_streamToChainMap
std::map< std::string, TrigCompositeUtils::DecisionIDContainer > m_streamToChainMap
Stream name to chain objects map, excluding express.
Definition: TrigSignatureMoni.h:119
TrigSignatureMoni::m_HLTMenuKey
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
Definition: TrigSignatureMoni.h:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
bin
Definition: BinsDiffFromStripMedian.h:43
TrigSignatureMoni::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: TrigSignatureMoni.h:95
TrigSignatureMoni::start
virtual StatusCode start() override
Definition: TrigSignatureMoni.cxx:32
TrigSignatureMoni::fillRate
StatusCode fillRate(const TrigCompositeUtils::DecisionIDContainer &, int) const
Definition: TrigSignatureMoni.cxx:228
TrigSignatureMoni::m_histSvc
ServiceHandle< ITHistSvc > m_histSvc
Definition: TrigSignatureMoni.h:98
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TrigSignatureMoni::initialize
virtual StatusCode initialize() override
Definition: TrigSignatureMoni.cxx:17
TrigSignatureMoni::initSeqHist
StatusCode initSeqHist(LockedHandle< TH2 > &, std::set< std::string > &)
Definition: TrigSignatureMoni.cxx:480
TrigSignatureMoni::fillSequences
StatusCode fillSequences(const std::set< std::string > &) const
Definition: TrigSignatureMoni.cxx:252
ATLAS_NOT_CONST_THREAD_SAFE
LockedHandle< TH2 > &TrigSignatureMoni::RateHistogram::getHistogram ATLAS_NOT_CONST_THREAD_SAFE() const
Definition: TrigSignatureMoni.cxx:514
x
#define x
TrigSignatureMoni::m_sequenceToBinMap
std::map< std::string, int > m_sequenceToBinMap
Sequence to bin map for sequence histogram.
Definition: TrigSignatureMoni.h:116
TrigSignatureMoni::initHist
StatusCode initHist(LockedHandle< TH2 > &, SG::ReadHandle< TrigConf::HLTMenu > &, bool=true)
Definition: TrigSignatureMoni.cxx:431
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
TrigSignatureMoni::m_expressChainMap
std::map< std::string, TrigCompositeUtils::DecisionIDContainer > m_expressChainMap
Stream name to chain objects map, including only express.
Definition: TrigSignatureMoni.h:120
TrigSignatureMoni::fillStreamsAndGroups
StatusCode fillStreamsAndGroups(const std::map< std::string, TrigCompositeUtils::DecisionIDContainer > &, const TrigCompositeUtils::DecisionIDContainer &) const
Definition: TrigSignatureMoni.cxx:260
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
TrigCompositeUtils::getTerminusNode
const Decision * getTerminusNode(SG::ReadHandle< DecisionContainer > &container)
Definition: TrigCompositeUtilsRoot.cxx:243
TrigSignatureMoni::nChains
int nChains(SG::ReadHandle< TrigConf::HLTMenu > &) const
Definition: TrigSignatureMoni.cxx:415
TrigSignatureMoni::RateHistogram::startTimer
void startTimer(unsigned int duration, unsigned int intervals)
Definition: TrigSignatureMoni.cxx:530
TrigSignatureMoni::nSequenceBins
int nSequenceBins() const
Definition: TrigSignatureMoni.cxx:419
beamspotman.steps
int steps
Definition: beamspotman.py:505
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TrigSignatureMoni::fillHistogram
StatusCode fillHistogram(const TrigCompositeUtils::DecisionIDContainer &, int, LockedHandle< TH2 > &) const
Definition: TrigSignatureMoni.cxx:216
TrigConf::HLTMenu::streams
std::vector< DataStructure > streams() const
Accessor to the connected output streams.
Definition: HLTMenu.cxx:65
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigCompositeUtils::getExpressTerminusNode
const Decision * getExpressTerminusNode(const DecisionContainer &container)
Returns the express-accept navigation node from a collection or nullptr if missing.
Definition: TrigCompositeUtilsRoot.cxx:251
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Incidents.h
getLatestRuns.interval
interval
Definition: getLatestRuns.py:24
calibdata.exception
exception
Definition: calibdata.py:496
TrigSignatureMoni::RateHistogram::~RateHistogram
~RateHistogram()
Definition: TrigSignatureMoni.cxx:498
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:96
TrigSignatureMoni::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Definition: TrigSignatureMoni.h:97
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TrigSignatureMoni::m_chainIDToBunchMap
std::map< unsigned int, std::set< std::string > > m_chainIDToBunchMap
Chain ID to bunchgroup name map.
Definition: TrigSignatureMoni.h:117
TrigSignatureMoni::fillDecisionCount
StatusCode fillDecisionCount(const std::vector< TrigCompositeUtils::DecisionID > &, int) const
Definition: TrigSignatureMoni.cxx:236
TrigSignatureMoni::RateHistogram::init
StatusCode init(const std::string &histoName, const std::string &histoTitle, const int x, const int y, const std::string &registerPath, const ServiceHandle< ITHistSvc > &histSvc)
Definition: TrigSignatureMoni.cxx:502
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
TrigSignatureMoni::m_sequenceHistogram
RateHistogram m_sequenceHistogram
Definition: TrigSignatureMoni.h:112
TrigSignatureMoni::nSteps
int nSteps() const
Definition: TrigSignatureMoni.cxx:423
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
PixelAthHitMonAlgCfg.duration
duration
Definition: PixelAthHitMonAlgCfg.py:152
TrigSignatureMoni::m_decisionCollectorTools
ToolHandleArray< DecisionCollectorTool > m_decisionCollectorTools
Definition: TrigSignatureMoni.h:105
TrigSignatureMoni::RateHistogram::callback
void callback()
Definition: TrigSignatureMoni.cxx:554
TrigConf::HLTMenu::size
std::size_t size() const
Accessor to the number of HLT chains.
Definition: HLTMenu.cxx:35
TrigSignatureMoni::m_chainIDToBinMap
std::map< unsigned int, int > m_chainIDToBinMap
Chain id to histogram bin map.
Definition: TrigSignatureMoni.h:114
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
TrigSignatureMoni::m_featureCollectorTools
ToolHandleArray< DecisionCollectorTool > m_featureCollectorTools
Definition: TrigSignatureMoni.h:106
TrigConf::DataStructure
Base class for Trigger configuration data and wrapper around underlying representation.
Definition: DataStructure.h:37
TrigSignatureMoni::m_intervals
Gaudi::Property< unsigned int > m_intervals
Definition: TrigSignatureMoni.h:103
TrigSignatureMoni::nBinsX
int nBinsX() const
Definition: TrigSignatureMoni.cxx:411
TimeDivider::seconds
@ seconds
Definition: TimeDivider.h:22
AthenaInterprocess::UpdateAfterFork::type
static const std::string & type()
Incident type.
Definition: Incidents.h:49
TrigSignatureMoni::handle
virtual void handle(const Incident &incident) override
Definition: TrigSignatureMoni.cxx:277
TrigSignatureMoni::m_nameToBinMap
std::map< std::string, int > m_nameToBinMap
Sequence/group/bunchgroup name to bin map.
Definition: TrigSignatureMoni.h:115
python.PyAthena.v
v
Definition: PyAthena.py:154
TrigCompositeUtils::isLegId
bool isLegId(const HLT::Identifier &legIdentifier)
Recognise whether the chain ID is a leg ID.
Definition: TrigCompositeUtilsRoot.cxx:204
DeMoScan.index
string index
Definition: DeMoScan.py:364
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
y
#define y
h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TrigSignatureMoni::stop
virtual StatusCode stop() override
Definition: TrigSignatureMoni.cxx:123
TrigSignatureMoni::m_finalDecisionKey
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_finalDecisionKey
Definition: TrigSignatureMoni.h:93
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
HLTIdentifier.h
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:67
HLT::Identifier::name
std::string name() const
reports human redable name if it is enabled or, empty string
Definition: HLTIdentifier.cxx:14
TrigSignatureMoni::RateHistogram::fill
void fill(const double x, const double y) const
Definition: TrigSignatureMoni.cxx:526
TrigSignatureMoni::execute
virtual StatusCode execute(const EventContext &context) const override
Definition: TrigSignatureMoni.cxx:298
TrigSignatureMoni::nBaseSteps
int nBaseSteps() const
Definition: TrigSignatureMoni.cxx:427
LArCellBinning.step
step
Definition: LArCellBinning.py:158
TrigSignatureMoni::RateHistogram::updatePublished
void updatePublished(unsigned int duration) const
Definition: TrigSignatureMoni.cxx:547
TrigSignatureMoni::fillPassEvents
StatusCode fillPassEvents(const TrigCompositeUtils::DecisionIDContainer &, int) const
Definition: TrigSignatureMoni.cxx:232
TrigCompositeUtils::getIDFromLeg
HLT::Identifier getIDFromLeg(const HLT::Identifier &legIdentifier)
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
Definition: TrigCompositeUtilsRoot.cxx:180
TrigConf::Chain
HLT chain configuration.
Definition: TrigConfData/TrigConfData/HLTChain.h:18
TrigSignatureMoni::m_duration
Gaudi::Property< unsigned int > m_duration
Definition: TrigSignatureMoni.h:102
TrigSignatureMoni::RateHistogram::stopTimer
void stopTimer()
Definition: TrigSignatureMoni.cxx:536
TrigSignatureMoni::m_bookingPath
Gaudi::Property< std::string > m_bookingPath
Definition: TrigSignatureMoni.h:99
TrigSignatureMoni::m_l1DecisionsKey
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_l1DecisionsKey
Definition: TrigSignatureMoni.h:92
histogram
std::string histogram
Definition: chains.cxx:52
TrigSignatureMoni::m_rateHistogram
RateHistogram m_rateHistogram
Definition: TrigSignatureMoni.h:111
ServiceHandle< ITHistSvc >
TrigSignatureMoni.h