CMS 3D CMS Logo

HLTriggerJSONMonitoring.cc
Go to the documentation of this file.
1 
7 #include <atomic>
8 #include <fstream>
9 #include <sstream>
10 #include <vector>
11 #include <string>
12 #include <memory>
13 #include <algorithm>
14 
15 #include <fmt/printf.h>
16 
35 
36 //note this was updated 20/10/22 to change the logic such that instead
37 //of having it passing the L1Seed, it is now number passing pre prescale
38 //this is indentical for "standard" paths and more meaningful for
39 //the special paths which are affected
40 //a standard path logic goes "trigger type -> l1 seed -> prescale -> other selection"
41 
42 using namespace jsoncollector;
43 
45  // variables accumulated event by event in each stream
46  struct stream {
47  unsigned int processed; // number of events processed
48  std::vector<unsigned int> hltWasRun; // number of events where each path was run
49  std::vector<unsigned int> hltPrePS; // number of events where each path made it to the prescale module
50  std::vector<unsigned int> hltPostPS; // number of events where each path passed the prescale
51  std::vector<unsigned int> hltAccept; // number of events accepted by each path
52  std::vector<unsigned int> hltReject; // number of events rejected by each path
53  std::vector<unsigned int> hltErrors; // number of events with errors in each path
54  std::vector<unsigned int> datasets; // number of events accepted by each dataset
55  };
56 
57  // variables initialised for each run
58  struct run {
61  std::string baseRunDir; // base directory from EvFDaqDirector
62  std::string jsdFileName; // definition file name for JSON with rates
63 
64  HLTConfigProvider hltConfig; // HLT configuration for the current run
65  std::vector<int> posPre; // position of last HLT prescale filter in each path, or -1 if not present
66  std::vector<std::vector<unsigned int>> datasets; // list of paths in each dataset
67  std::vector<unsigned int> indicesOfTriggerPaths; // indices of triggers (without DatasetPaths) in TriggerNames
68  };
69 
70  // variables accumulated over the whole lumisection
71  struct lumisection {
72  jsoncollector::HistoJ<unsigned int> processed; // number of events processed
73  jsoncollector::HistoJ<unsigned int> hltWasRun; // number of events where each path was run
74  jsoncollector::HistoJ<unsigned int> hltPrePS; // number of events where each path made it to the prescale module
75  jsoncollector::HistoJ<unsigned int> hltPostPS; // number of events where each path passed the prescale
76  jsoncollector::HistoJ<unsigned int> hltAccept; // number of events accepted by each path
77  jsoncollector::HistoJ<unsigned int> hltReject; // number of events rejected by each path
78  jsoncollector::HistoJ<unsigned int> hltErrors; // number of events with errors in each path
79  jsoncollector::HistoJ<unsigned int> datasets; // number of events accepted by each dataset
80  };
81 };
82 
84  // per-stream information
85  edm::StreamCache<HLTriggerJSONMonitoringData::stream>,
86  // per-run accounting
87  edm::RunCache<HLTriggerJSONMonitoringData::run>,
88  // accumulate per-lumisection statistics
89  edm::LuminosityBlockSummaryCache<HLTriggerJSONMonitoringData::lumisection>> {
90 public:
91  // constructor
93 
94  // destructor
95  ~HLTriggerJSONMonitoring() override = default;
96 
97  // validate the configuration and optionally fill the default values
98  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
99 
100  // called for each Event
101  void analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const override;
102 
103  // -- inherited from edm::StreamCache<HLTriggerJSONMonitoringData::stream>
104 
105  // called once for each Stream being used in the job to create the cache object that will be used for that particular Stream
106  std::unique_ptr<HLTriggerJSONMonitoringData::stream> beginStream(edm::StreamID) const override;
107 
108  // called when the Stream is switching from one LuminosityBlock to a new LuminosityBlock.
109  void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const&, edm::EventSetup const&) const override;
110 
111  // -- inherited from edm::RunCache<HLTriggerJSONMonitoringData::run>
112 
113  // called each time the Source sees a new Run, and guaranteed to finish before any Stream calls streamBeginRun for that same Run
114  std::shared_ptr<HLTriggerJSONMonitoringData::run> globalBeginRun(edm::Run const&,
115  edm::EventSetup const&) const override;
116 
117  // called after all Streams have finished processing a given Run (i.e. streamEndRun for all Streams have completed)
118  void globalEndRun(edm::Run const&, edm::EventSetup const&) const override;
119 
120  // -- inherited from edm::LuminosityBlockSummaryCache<HLTriggerJSONMonitoringData::lumisection>
121 
122  // called each time the Source sees a new LuminosityBlock
123  std::shared_ptr<HLTriggerJSONMonitoringData::lumisection> globalBeginLuminosityBlockSummary(
124  edm::LuminosityBlock const&, edm::EventSetup const&) const override;
125 
126  // called when a Stream has finished processing a LuminosityBlock, after streamEndLuminosityBlock
127  void streamEndLuminosityBlockSummary(edm::StreamID,
128  edm::LuminosityBlock const&,
129  edm::EventSetup const&,
131 
132  // called after the streamEndLuminosityBlockSummary method for all Streams have finished processing a given LuminosityBlock
133  void globalEndLuminosityBlockSummary(edm::LuminosityBlock const&,
134  edm::EventSetup const&,
136 
137 private:
138  static constexpr const char* streamName_ = "streamHLTRates";
139 
140  static constexpr const char* datasetPathNamePrefix_ = "Dataset_";
141 
142  static void writeJsdFile(HLTriggerJSONMonitoringData::run const&);
143  static void writeIniFile(HLTriggerJSONMonitoringData::run const&, unsigned int);
144 
145  // configuration
146  const edm::InputTag triggerResults_; // InputTag for TriggerResults
148 };
149 
150 // constructor
152  : triggerResults_(config.getParameter<edm::InputTag>("triggerResults")),
153  triggerResultsToken_(consumes(triggerResults_)) {
154  if (edm::Service<evf::EvFDaqDirector>().isAvailable()) {
155  //output initemp file. This lets hltd know number of streams early
156  std::string initFileName = edm::Service<evf::EvFDaqDirector>()->getInitTempFilePath("streamHLTRates");
157  std::ofstream file(initFileName);
158  if (!file)
159  throw cms::Exception("HLTriggerJsonMonitoring")
160  << "Cannot create INITEMP file: " << initFileName << " error: " << strerror(errno);
161  file.close();
162  }
163 }
164 
165 // validate the configuration and optionally fill the default values
168  desc.add<edm::InputTag>("triggerResults", edm::InputTag("TriggerResults", "", "@currentProcess"));
169  descriptions.add("HLTriggerJSONMonitoring", desc);
170 }
171 
172 // called once for each Stream being used in the job to create the cache object that will be used for that particular Stream
173 std::unique_ptr<HLTriggerJSONMonitoringData::stream> HLTriggerJSONMonitoring::beginStream(edm::StreamID) const {
174  return std::make_unique<HLTriggerJSONMonitoringData::stream>();
175 }
176 
177 // called each time the Source sees a new Run, and guaranteed to finish before any Stream calls streamBeginRun for that same Run
178 std::shared_ptr<HLTriggerJSONMonitoringData::run> HLTriggerJSONMonitoring::globalBeginRun(
179  edm::Run const& run, edm::EventSetup const& setup) const {
180  auto rundata = std::make_shared<HLTriggerJSONMonitoringData::run>();
181 
182  // set the DAQ parameters
184  rundata->streamDestination = edm::Service<evf::EvFDaqDirector>()->getStreamDestinations(streamName_);
185  rundata->streamMergeType =
187  rundata->baseRunDir = edm::Service<evf::EvFDaqDirector>()->baseRunDir();
188  } else {
189  rundata->streamDestination = "";
190  rundata->streamMergeType = "";
191  rundata->baseRunDir = ".";
192  }
193 
194  // initialize HLTConfigProvider
195  bool changed = true;
196  if (not rundata->hltConfig.init(run, setup, triggerResults_.process(), changed)) {
197  edm::LogError("HLTriggerJSONMonitoring") << "HLTConfigProvider initialization failed!";
198  } else if (changed) {
199  // triggerNames from TriggerResults (includes DatasetPaths)
200  auto const& triggerNames = rundata->hltConfig.triggerNames();
201  auto const triggerNamesSize = triggerNames.size();
202 
203  // update the list of indices of the HLT Paths (without DatasetPaths) in the TriggerNames list
204  rundata->indicesOfTriggerPaths.clear();
205  rundata->indicesOfTriggerPaths.reserve(triggerNamesSize);
206  for (auto triggerNameIdx = 0u; triggerNameIdx < triggerNamesSize; ++triggerNameIdx) {
207  // skip DatasetPaths
208  if (triggerNames[triggerNameIdx].find(datasetPathNamePrefix_) != 0) {
209  rundata->indicesOfTriggerPaths.emplace_back(triggerNameIdx);
210  }
211  }
212  auto const triggersSize = rundata->indicesOfTriggerPaths.size();
213 
214  // update the list of paths in each dataset
215  auto const& datasets = rundata->hltConfig.datasetContents();
216  auto const& datasetNames = rundata->hltConfig.datasetNames();
217  auto const datasetsSize = datasetNames.size();
218  rundata->datasets.resize(datasetsSize);
219  for (auto ds = 0u; ds < datasetsSize; ++ds) {
220  auto& dataset = rundata->datasets[ds];
221  // check if TriggerNames include the DatasetPath corresponding to this Dataset
222  // - DatasetPaths are normal cms.Path objects
223  // - in Run-3 HLT menus, DatasetPaths are used to define PrimaryDatasets
224  auto const datasetPathName = datasetPathNamePrefix_ + datasetNames[ds];
225  auto const datasetPathExists =
226  std::find(triggerNames.begin(), triggerNames.end(), datasetPathName) != triggerNames.end();
227  if (datasetPathExists) {
228  // if a DatasetPath exists, only that Path is assigned to the Dataset
229  // - this way, the counts of the Dataset properly include prescales on the DatasetPath
230  // and smart-Prescales applied by the DatasetPath to its triggers
231  dataset.reserve(1);
232  auto const index = rundata->hltConfig.triggerIndex(datasetPathName);
233  if (index < triggerNamesSize)
234  dataset.push_back(index);
235  } else {
236  auto const paths = datasets[ds].size();
237  dataset.reserve(paths);
238  for (auto p = 0u; p < paths; p++) {
239  auto const index = rundata->hltConfig.triggerIndex(datasets[ds][p]);
240  if (index < triggerNamesSize)
241  dataset.push_back(index);
242  }
243  }
244  }
245 
246  // find the positions of the prescale filters
247  rundata->posPre.resize(triggersSize);
248  for (auto i = 0u; i < triggersSize; ++i) {
249  rundata->posPre[i] = -1;
250  auto const trigNameIndx = rundata->indicesOfTriggerPaths[i];
251  auto const& moduleLabels = rundata->hltConfig.moduleLabels(trigNameIndx);
252  for (auto j = 0u; j < moduleLabels.size(); ++j) {
253  auto const& moduleType = rundata->hltConfig.moduleType(moduleLabels[j]);
254  if (moduleType == "HLTPrescaler") {
255  rundata->posPre[i] = j;
256  break;
257  }
258  }
259  }
260  }
261 
262  // write the per-run .jsd file
263  rundata->jsdFileName = fmt::sprintf("run%06d_ls0000_streamHLTRates_pid%05d.jsd", run.run(), getpid());
264  writeJsdFile(*rundata);
265 
266  // write the per-run .ini file
267  //iniFileName = fmt::sprintf("run%06d_ls0000_streamHLTRates_pid%05d.ini", run.run(), getpid());
268  writeIniFile(*rundata, run.run());
269 
270  return rundata;
271 }
272 
273 // called after all Streams have finished processing a given Run (i.e. streamEndRun for all Streams have completed)
275 
276 // called for each Event
278  auto& stream = *streamCache(sid);
279  auto const& rundata = *runCache(event.getRun().index());
280 
281  ++stream.processed;
282 
283  // check that the HLTConfigProvider for the current run has been successfully initialised
284  if (not rundata.hltConfig.inited())
285  return;
286 
287  // get hold of TriggerResults
289  if (not event.getByToken(triggerResultsToken_, handle) or not handle.isValid()) {
290  edm::LogError("HLTriggerJSONMonitoring")
291  << "TriggerResults with label [" + triggerResults_.encode() + "] not present or invalid";
292  return;
293  }
295  assert(results.size() == rundata.hltConfig.triggerNames().size());
296 
297  // check the results for each HLT path
298  for (auto idx = 0u; idx < rundata.indicesOfTriggerPaths.size(); ++idx) {
299  auto const triggerPathIdx = rundata.indicesOfTriggerPaths[idx];
300  auto const& status = results[triggerPathIdx];
301  if (status.wasrun()) {
302  ++stream.hltWasRun[idx];
303  if (status.accept()) {
304  ++stream.hltPrePS[idx];
305  ++stream.hltPostPS[idx];
306  ++stream.hltAccept[idx];
307  } else {
308  int const index = (int)status.index();
309  if (index >= rundata.posPre[idx])
310  ++stream.hltPrePS[idx];
311  if (index > rundata.posPre[idx])
312  ++stream.hltPostPS[idx];
313  if (status.error())
314  ++stream.hltErrors[idx];
315  else
316  ++stream.hltReject[idx];
317  }
318  }
319  }
320 
321  // check the decision for each dataset
322  // FIXME this ignores the prescales, "smart" prescales, and event selection applied in the OutputModule itself
323  for (auto i = 0u; i < rundata.datasets.size(); ++i)
324  if (std::any_of(rundata.datasets[i].begin(), rundata.datasets[i].end(), [&](unsigned int path) {
325  return results.accept(path);
326  }))
327  ++stream.datasets[i];
328 }
329 
330 // called each time the Source sees a new LuminosityBlock
331 std::shared_ptr<HLTriggerJSONMonitoringData::lumisection> HLTriggerJSONMonitoring::globalBeginLuminosityBlockSummary(
332  edm::LuminosityBlock const& lumi, edm::EventSetup const&) const {
333  unsigned int triggers = 0;
334  unsigned int datasets = 0;
335  auto const& rundata = *runCache(lumi.getRun().index());
336  if (rundata.hltConfig.inited()) {
337  triggers = rundata.indicesOfTriggerPaths.size();
338  datasets = rundata.hltConfig.datasetNames().size();
339  };
340 
341  // the API of jsoncollector::HistoJ does not really match our use case,
342  // but it is the only vector-like object available in JsonMonitorable.h
343  auto lumidata = std::make_shared<HLTriggerJSONMonitoringData::lumisection>(HLTriggerJSONMonitoringData::lumisection{
344  jsoncollector::HistoJ<unsigned int>(1), // processed
352  });
353  // repeated calls to `update` necessary to set the internal element counter
354  lumidata->processed.update(0);
355  for (unsigned int i = 0; i < triggers; ++i)
356  lumidata->hltWasRun.update(0);
357  for (unsigned int i = 0; i < triggers; ++i)
358  lumidata->hltPrePS.update(0);
359  for (unsigned int i = 0; i < triggers; ++i)
360  lumidata->hltPostPS.update(0);
361  for (unsigned int i = 0; i < triggers; ++i)
362  lumidata->hltAccept.update(0);
363  for (unsigned int i = 0; i < triggers; ++i)
364  lumidata->hltReject.update(0);
365  for (unsigned int i = 0; i < triggers; ++i)
366  lumidata->hltErrors.update(0);
367  for (unsigned int i = 0; i < datasets; ++i)
368  lumidata->datasets.update(0);
369 
370  return lumidata;
371 }
372 
373 // called when the Stream is switching from one LuminosityBlock to a new LuminosityBlock.
375  edm::LuminosityBlock const& lumi,
376  edm::EventSetup const&) const {
377  auto& stream = *streamCache(sid);
378 
379  unsigned int triggers = 0;
380  unsigned int datasets = 0;
381  auto const& rundata = *runCache(lumi.getRun().index());
382  if (rundata.hltConfig.inited()) {
383  triggers = rundata.indicesOfTriggerPaths.size();
384  datasets = rundata.hltConfig.datasetNames().size();
385  };
386 
387  // reset the stream counters
388  stream.processed = 0;
389  stream.hltWasRun.assign(triggers, 0);
390  stream.hltPrePS.assign(triggers, 0);
391  stream.hltPostPS.assign(triggers, 0);
392  stream.hltAccept.assign(triggers, 0);
393  stream.hltReject.assign(triggers, 0);
394  stream.hltErrors.assign(triggers, 0);
395  stream.datasets.assign(datasets, 0);
396 }
397 
398 // called when a Stream has finished processing a LuminosityBlock, after streamEndLuminosityBlock
400  edm::LuminosityBlock const& lumi,
401  edm::EventSetup const&,
403  auto const& stream = *streamCache(sid);
404  auto const& rundata = *runCache(lumi.getRun().index());
405  lumidata->processed.value()[0] += stream.processed;
406 
407  // check that the HLTConfigProvider for the current run has been successfully initialised
408  if (not rundata.hltConfig.inited())
409  return;
410 
411  auto const triggers = rundata.indicesOfTriggerPaths.size();
412  for (auto i = 0u; i < triggers; ++i) {
413  lumidata->hltWasRun.value()[i] += stream.hltWasRun[i];
414  lumidata->hltPrePS.value()[i] += stream.hltPrePS[i];
415  lumidata->hltPostPS.value()[i] += stream.hltPostPS[i];
416  lumidata->hltAccept.value()[i] += stream.hltAccept[i];
417  lumidata->hltReject.value()[i] += stream.hltReject[i];
418  lumidata->hltErrors.value()[i] += stream.hltErrors[i];
419  }
420  auto const datasets = rundata.hltConfig.datasetNames().size();
421  for (auto i = 0u; i < datasets; ++i)
422  lumidata->datasets.value()[i] += stream.datasets[i];
423 }
424 
425 // called after the streamEndLuminosityBlockSummary method for all Streams have finished processing a given LuminosityBlock
427  edm::EventSetup const&,
429  unsigned int ls = lumi.luminosityBlock();
430  unsigned int run = lumi.run();
431 
432  bool writeFiles = true;
433  if (edm::Service<evf::FastMonitoringService*>().isAvailable()) {
436  if (fms)
437  writeFiles = fms->shouldWriteFiles(ls);
438  }
439  if (not writeFiles)
440  return;
441 
442  unsigned int processed = lumidata->processed.value().at(0);
443  auto const& rundata = *runCache(lumi.getRun().index());
445 
446  // [SIC]
447  char hostname[33];
448  gethostname(hostname, 32);
449  std::string sourceHost(hostname);
450 
451  // [SIC]
452  std::stringstream sOutDef;
453  sOutDef << rundata.baseRunDir << "/"
454  << "output_" << getpid() << ".jsd";
455 
456  std::string jsndataFileList = "";
457  unsigned int jsndataSize = 0;
458  unsigned int jsndataAdler32 = 1; // adler32 checksum for an empty file
459 
460  if (processed) {
461  // write the .jsndata files which contain the actual rates
462  Json::Value jsndata;
463  jsndata[jsoncollector::DataPoint::SOURCE] = sourceHost;
464  jsndata[jsoncollector::DataPoint::DEFINITION] = rundata.jsdFileName;
473 
474  auto jsndataFileName = fmt::sprintf("run%06d_ls%04d_streamHLTRates_pid%05d.jsndata", run, ls, getpid());
475 
476  std::string result = writer.write(jsndata);
477  std::ofstream jsndataFile(rundata.baseRunDir + "/" + jsndataFileName);
478  jsndataFile << result;
479  jsndataFile.close();
480 
481  jsndataFileList = jsndataFileName;
482  jsndataSize = result.size();
483  jsndataAdler32 = cms::Adler32(result.c_str(), result.size());
484  }
485 
486  // create a metadata json file for the "HLT rates" pseudo-stream
487  unsigned int jsnProcessed = processed;
488  unsigned int jsnAccepted = processed;
489  unsigned int jsnErrorEvents = 0;
490  unsigned int jsnRetCodeMask = 0;
491  std::string jsnInputFiles = "";
492  unsigned int jsnHLTErrorEvents = 0;
493 
494  Json::Value jsn;
495  jsn[jsoncollector::DataPoint::SOURCE] = sourceHost;
496  jsn[jsoncollector::DataPoint::DEFINITION] = sOutDef.str();
497  jsn[jsoncollector::DataPoint::DATA].append(jsnProcessed);
498  jsn[jsoncollector::DataPoint::DATA].append(jsnAccepted);
499  jsn[jsoncollector::DataPoint::DATA].append(jsnErrorEvents);
500  jsn[jsoncollector::DataPoint::DATA].append(jsnRetCodeMask);
501  jsn[jsoncollector::DataPoint::DATA].append(jsndataFileList);
502  jsn[jsoncollector::DataPoint::DATA].append(jsndataSize);
503  jsn[jsoncollector::DataPoint::DATA].append(jsnInputFiles);
504  jsn[jsoncollector::DataPoint::DATA].append(jsndataAdler32);
505  jsn[jsoncollector::DataPoint::DATA].append(rundata.streamDestination);
506  jsn[jsoncollector::DataPoint::DATA].append(rundata.streamMergeType);
507  jsn[jsoncollector::DataPoint::DATA].append(jsnHLTErrorEvents);
508 
509  auto jsnFileName = fmt::sprintf("run%06d_ls%04d_streamHLTRates_pid%05d.jsn", run, ls, getpid());
510  std::ofstream jsnFile(rundata.baseRunDir + "/" + jsnFileName);
511  jsnFile << writer.write(jsn);
512  jsnFile.close();
513 }
514 
516  std::ofstream file(rundata.baseRunDir + "/" + rundata.jsdFileName);
517  file << R"""({
518  "data" : [
519  { "name" : "Processed", "type" : "integer", "operation" : "histo"},
520  { "name" : "Path-WasRun", "type" : "integer", "operation" : "histo"},
521  { "name" : "Path-AfterL1Seed", "type" : "integer", "operation" : "histo"},
522  { "name" : "Path-AfterPrescale", "type" : "integer", "operation" : "histo"},
523  { "name" : "Path-Accepted", "type" : "integer", "operation" : "histo"},
524  { "name" : "Path-Rejected", "type" : "integer", "operation" : "histo"},
525  { "name" : "Path-Errors", "type" : "integer", "operation" : "histo"},
526  { "name" : "Dataset-Accepted", "type" : "integer", "operation" : "histo"}
527  ]
528 }
529 )""";
530  file.close();
531 }
532 
535 
537  for (auto idx : rundata.indicesOfTriggerPaths)
538  triggerNames.append(rundata.hltConfig.triggerNames()[idx]);
539  content["Path-Names"] = triggerNames;
540 
542  for (auto const& name : rundata.hltConfig.datasetNames())
543  datasetNames.append(name);
544  content["Dataset-Names"] = datasetNames;
545 
546  std::string iniFileName = fmt::sprintf("run%06d_ls0000_streamHLTRates_pid%05d.ini", run, getpid());
547  std::ofstream file(rundata.baseRunDir + "/" + iniFileName);
549  file << writer.write(content);
550  file.close();
551 }
552 
553 // declare as a framework plugin
static constexpr const char * streamName_
void globalEndRun(edm::Run const &, edm::EventSetup const &) const override
static constexpr const char * datasetPathNamePrefix_
static const std::string SOURCE
Definition: DataPoint.h:116
std::string encode() const
Definition: InputTag.cc:159
std::vector< std::vector< unsigned int > > datasets
HLTriggerJSONMonitoring(const edm::ParameterSet &)
void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const override
static void writeIniFile(HLTriggerJSONMonitoringData::run const &, unsigned int)
Definition: config.py:1
jsoncollector::HistoJ< unsigned int > hltReject
Log< level::Error, false > LogError
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
assert(be >=bs)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
jsoncollector::HistoJ< unsigned int > hltErrors
std::vector< T > & value()
static const std::string DATA
Definition: DataPoint.h:118
void analyze(edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
Writes a Value in JSON format in a human friendly way.
Definition: writer.h:64
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::unique_ptr< HLTriggerJSONMonitoringData::stream > beginStream(edm::StreamID) const override
std::shared_ptr< HLTriggerJSONMonitoringData::lumisection > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &) const override
array value (ordered list)
Definition: value.h:32
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
virtual Json::Value toJsonValue() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void writeJsdFile(HLTriggerJSONMonitoringData::run const &)
Value & append(const Value &value)
Append value to array at the end.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
jsoncollector::HistoJ< unsigned int > hltWasRun
const std::vector< std::string > & triggerNames() const
names of trigger paths
void streamEndLuminosityBlockSummary(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &, HLTriggerJSONMonitoringData::lumisection *) const override
HLT enums.
const edm::InputTag triggerResults_
void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, HLTriggerJSONMonitoringData::lumisection *) const override
results
Definition: mysort.py:8
bool isAvailable() const
Definition: Service.h:40
jsoncollector::HistoJ< unsigned int > hltPrePS
jsoncollector::HistoJ< unsigned int > processed
std::string const & process() const
Definition: InputTag.h:40
const std::vector< std::string > & datasetNames() const
Represents a JSON value.
Definition: value.h:101
bool shouldWriteFiles(unsigned int lumi, unsigned int *proc=nullptr)
JSON (JavaScript Object Notation).
Definition: DataPoint.h:26
static const std::string DEFINITION
Definition: DataPoint.h:117
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
jsoncollector::HistoJ< unsigned int > datasets
std::vector< unsigned int > indicesOfTriggerPaths
std::shared_ptr< HLTriggerJSONMonitoringData::run > globalBeginRun(edm::Run const &, edm::EventSetup const &) const override
Definition: event.py:1
Definition: Run.h:45
jsoncollector::HistoJ< unsigned int > hltAccept
jsoncollector::HistoJ< unsigned int > hltPostPS