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