CMS 3D CMS Logo

HLTriggerJSONMonitoring.cc
Go to the documentation of this file.
1 
8 #include <atomic>
9 #include <fstream>
10 
11 #include <boost/format.hpp>
12 
31 
33  // variables accumulated event by event in each stream
34  struct stream {
35  unsigned int processed; // number of events processed
36  std::vector<unsigned int> hltWasRun; // number of events where each path was run
37  std::vector<unsigned int> hltL1s; // number of events where each path passed the L1 seed
38  std::vector<unsigned int> hltPre; // number of events where each path passed the prescale
39  std::vector<unsigned int> hltAccept; // number of events accepted by each path
40  std::vector<unsigned int> hltReject; // number of events rejected by each path
41  std::vector<unsigned int> hltErrors; // number of events with errors in each path
42  std::vector<unsigned int> datasets; // number of events accepted by each dataset
43  };
44 
45  // variables initialised for each run
46  struct run {
49  std::string baseRunDir; // base directory from EvFDaqDirector
50  std::string jsdFileName; // definition file name for JSON with rates
51 
52  HLTConfigProvider hltConfig; // HLT configuration for the current run
53  std::vector<int> posL1s; // position of last L1T HLT seed filter in each path, or -1 if not present
54  std::vector<int> posPre; // position of last HLT prescale filter in each path, or -1 if not present
55  std::vector<std::vector<unsigned int>> datasets; // list of paths in each dataset
56  };
57 
58  // variables accumulated over the whole lumisection
59  struct lumisection {
60  jsoncollector::HistoJ<unsigned int> processed; // number of events processed
61  jsoncollector::HistoJ<unsigned int> hltWasRun; // number of events where each path was run
62  jsoncollector::HistoJ<unsigned int> hltL1s; // number of events where each path passed the L1 seed
63  jsoncollector::HistoJ<unsigned int> hltPre; // number of events where each path passed the prescale
64  jsoncollector::HistoJ<unsigned int> hltAccept; // number of events accepted by each path
65  jsoncollector::HistoJ<unsigned int> hltReject; // number of events rejected by each path
66  jsoncollector::HistoJ<unsigned int> hltErrors; // number of events with errors in each path
67  jsoncollector::HistoJ<unsigned int> datasets; // number of events accepted by each dataset
68  };
69 };
70 
72  // per-stream information
73  edm::StreamCache<HLTriggerJSONMonitoringData::stream>,
74  // per-run accounting
75  edm::RunCache<HLTriggerJSONMonitoringData::run>,
76  // accumulate per-lumisection statistics
77  edm::LuminosityBlockSummaryCache<HLTriggerJSONMonitoringData::lumisection>> {
78 public:
79  // constructor
81 
82  // destructor
83  ~HLTriggerJSONMonitoring() override = default;
84 
85  // validate the configuration and optionally fill the default values
86  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
87 
88  // called for each Event
89  void analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const override;
90 
91  // -- inherited from edm::StreamCache<HLTriggerJSONMonitoringData::stream>
92 
93  // called once for each Stream being used in the job to create the cache object that will be used for that particular Stream
94  std::unique_ptr<HLTriggerJSONMonitoringData::stream> beginStream(edm::StreamID) const override;
95 
96  // called when the Stream is switching from one LuminosityBlock to a new LuminosityBlock.
98 
99  // -- inherited from edm::RunCache<HLTriggerJSONMonitoringData::run>
100 
101  // called each time the Source sees a new Run, and guaranteed to finish before any Stream calls streamBeginRun for that same Run
102  std::shared_ptr<HLTriggerJSONMonitoringData::run> globalBeginRun(edm::Run const&,
103  edm::EventSetup const&) const override;
104 
105  // called after all Streams have finished processing a given Run (i.e. streamEndRun for all Streams have completed)
106  void globalEndRun(edm::Run const&, edm::EventSetup const&) const override;
107 
108  // -- inherited from edm::LuminosityBlockSummaryCache<HLTriggerJSONMonitoringData::lumisection>
109 
110  // called each time the Source sees a new LuminosityBlock
111  std::shared_ptr<HLTriggerJSONMonitoringData::lumisection> globalBeginLuminosityBlockSummary(
112  edm::LuminosityBlock const&, edm::EventSetup const&) const override;
113 
114  // called when a Stream has finished processing a LuminosityBlock, after streamEndLuminosityBlock
116  edm::LuminosityBlock const&,
117  edm::EventSetup const&,
119 
120  // called after the streamEndLuminosityBlockSummary method for all Streams have finished processing a given LuminosityBlock
122  edm::EventSetup const&,
124 
125 private:
126  static constexpr const char* streamName_ = "streamHLTRates";
127 
129  static void writeIniFile(HLTriggerJSONMonitoringData::run const&, unsigned int);
130 
131  // configuration
132  const edm::InputTag triggerResults_; // InputTag for TriggerResults
134 };
135 
136 // constructor
138  : triggerResults_(config.getParameter<edm::InputTag>("triggerResults")),
139  triggerResultsToken_(consumes<edm::TriggerResults>(triggerResults_)) {}
140 
141 // validate the configuration and optionally fill the default values
144  desc.add<edm::InputTag>("triggerResults", edm::InputTag("TriggerResults", "", "HLT"));
145  descriptions.add("HLTriggerJSONMonitoring", desc);
146 }
147 
148 // called once for each Stream being used in the job to create the cache object that will be used for that particular Stream
149 std::unique_ptr<HLTriggerJSONMonitoringData::stream> HLTriggerJSONMonitoring::beginStream(edm::StreamID) const {
150  return std::make_unique<HLTriggerJSONMonitoringData::stream>();
151 }
152 
153 // called each time the Source sees a new Run, and guaranteed to finish before any Stream calls streamBeginRun for that same Run
154 std::shared_ptr<HLTriggerJSONMonitoringData::run> HLTriggerJSONMonitoring::globalBeginRun(
155  edm::Run const& run, edm::EventSetup const& setup) const {
156  auto rundata = std::make_shared<HLTriggerJSONMonitoringData::run>();
157 
158  // set the DAQ parameters
159  if (edm::Service<evf::EvFDaqDirector>().isAvailable()) {
160  rundata->streamDestination = edm::Service<evf::EvFDaqDirector>()->getStreamDestinations(streamName_);
161  rundata->streamMergeType =
163  rundata->baseRunDir = edm::Service<evf::EvFDaqDirector>()->baseRunDir();
164  } else {
165  rundata->streamDestination = "";
166  rundata->streamMergeType = "";
167  rundata->baseRunDir = ".";
168  }
169 
170  // initialize HLTConfigProvider
171  bool changed = true;
172  if (not rundata->hltConfig.init(run, setup, triggerResults_.process(), changed)) {
173  edm::LogError("HLTriggerJSONMonitoring") << "HLTConfigProvider initialization failed!" << std::endl;
174  } else if (changed) {
175  // update the trigger and dataset names
176  auto const& triggerNames = rundata->hltConfig.triggerNames();
177  auto const& datasetNames = rundata->hltConfig.datasetNames();
178  auto const& datasets = rundata->hltConfig.datasetContents();
179 
180  const unsigned int triggersSize = triggerNames.size();
181  const unsigned int datasetsSize = datasetNames.size();
182 
183  // extract the definition of the datasets
184  rundata->datasets.resize(datasetsSize);
185  for (unsigned int ds = 0; ds < datasetsSize; ++ds) {
186  auto& dataset = rundata->datasets[ds];
187  unsigned int paths = datasets[ds].size();
188  dataset.reserve(paths);
189  for (unsigned int p = 0; p < paths; p++) {
190  unsigned int index = rundata->hltConfig.triggerIndex(datasets[ds][p]);
191  if (index < triggersSize)
192  dataset.push_back(index);
193  }
194  }
195 
196  // find the positions of the L1 seed and prescale filters
197  rundata->posL1s.resize(triggersSize);
198  rundata->posPre.resize(triggersSize);
199  for (unsigned int i = 0; i < triggersSize; ++i) {
200  rundata->posL1s[i] = -1;
201  rundata->posPre[i] = -1;
202  std::vector<std::string> const& moduleLabels = rundata->hltConfig.moduleLabels(i);
203  for (unsigned int j = 0; j < moduleLabels.size(); ++j) {
204  std::string const& label = rundata->hltConfig.moduleType(moduleLabels[j]);
205  if (label == "HLTL1TSeed")
206  rundata->posL1s[i] = j;
207  else if (label == "HLTPrescaler")
208  rundata->posPre[i] = j;
209  }
210  }
211  }
212 
213  // write the per-run .jsd file
214  rundata->jsdFileName = (boost::format("run%06d_ls0000_streamHLTRates_pid%05d.jsd") % run.run() % getpid()).str();
215  writeJsdFile(*rundata);
216 
217  // write the per-run .ini file
218  // iniFileName = (boost::format("run%06d_ls0000_streamHLTRates_pid%05d.ini") % run.run() % getpid()).str();
219  writeIniFile(*rundata, run.run());
220 
221  return rundata;
222 }
223 
224 // called after all Streams have finished processing a given Run (i.e. streamEndRun for all Streams have completed)
226 
227 // called for each Event
229  auto& stream = *streamCache(sid);
230  auto const& rundata = *runCache(event.getRun().index());
231 
232  ++stream.processed;
233 
234  // check that the HLTConfigProvider for the current run has been successfully initialised
235  if (not rundata.hltConfig.inited())
236  return;
237 
238  // get hold of TriggerResults
240  if (not event.getByToken(triggerResultsToken_, handle) or not handle.isValid()) {
241  edm::LogError("HLTriggerJSONMonitoring")
242  << "TriggerResults with label [" + triggerResults_.encode() + "] not present or invalid";
243  return;
244  }
246  assert(results.size() == stream.hltWasRun.size());
247 
248  // check the results for each HLT path
249  for (unsigned int i = 0; i < results.size(); ++i) {
250  auto const& status = results.at(i);
251  if (status.wasrun()) {
252  ++stream.hltWasRun[i];
253  if (status.accept()) {
254  ++stream.hltL1s[i];
255  ++stream.hltPre[i];
256  ++stream.hltAccept[i];
257  } else {
258  int index = (int)status.index();
259  if (index > rundata.posL1s[i])
260  ++stream.hltL1s[i];
261  if (index > rundata.posPre[i])
262  ++stream.hltPre[i];
263  if (status.error())
264  ++stream.hltErrors[i];
265  else
266  ++stream.hltReject[i];
267  }
268  }
269  }
270 
271  // check the decision for each dataset
272  // FIXME this ignores the prescales, "smart" prescales, and event selection applied in the OutputModule itself
273  for (unsigned int i = 0; i < rundata.datasets.size(); ++i)
274  if (std::any_of(rundata.datasets[i].begin(), rundata.datasets[i].end(), [&](unsigned int path) {
275  return results.accept(path);
276  }))
277  ++stream.datasets[i];
278 }
279 
280 // called each time the Source sees a new LuminosityBlock
281 std::shared_ptr<HLTriggerJSONMonitoringData::lumisection> HLTriggerJSONMonitoring::globalBeginLuminosityBlockSummary(
282  edm::LuminosityBlock const& lumi, edm::EventSetup const&) const {
283  unsigned int triggers = 0;
284  unsigned int datasets = 0;
285  auto const& rundata = *runCache(lumi.getRun().index());
286  if (rundata.hltConfig.inited()) {
287  triggers = rundata.hltConfig.triggerNames().size();
288  datasets = rundata.hltConfig.datasetNames().size();
289  };
290 
291  // the API of jsoncollector::HistoJ does not really match our use case,
292  // but it is the only vector-like object available in JsonMonitorable.h
293  auto lumidata = std::make_shared<HLTriggerJSONMonitoringData::lumisection>(HLTriggerJSONMonitoringData::lumisection{
294  jsoncollector::HistoJ<unsigned int>(1), // processed
295  jsoncollector::HistoJ<unsigned int>(triggers), // hltWasRun
296  jsoncollector::HistoJ<unsigned int>(triggers), // hltL1s
297  jsoncollector::HistoJ<unsigned int>(triggers), // hltPre
298  jsoncollector::HistoJ<unsigned int>(triggers), // hltAccept
299  jsoncollector::HistoJ<unsigned int>(triggers), // hltReject
300  jsoncollector::HistoJ<unsigned int>(triggers), // hltErrors
302  });
303  // repeated calls to `update` necessary to set the internal element counter
304  lumidata->processed.update(0);
305  for (unsigned int i = 0; i < triggers; ++i)
306  lumidata->hltWasRun.update(0);
307  for (unsigned int i = 0; i < triggers; ++i)
308  lumidata->hltL1s.update(0);
309  for (unsigned int i = 0; i < triggers; ++i)
310  lumidata->hltPre.update(0);
311  for (unsigned int i = 0; i < triggers; ++i)
312  lumidata->hltAccept.update(0);
313  for (unsigned int i = 0; i < triggers; ++i)
314  lumidata->hltReject.update(0);
315  for (unsigned int i = 0; i < triggers; ++i)
316  lumidata->hltErrors.update(0);
317  for (unsigned int i = 0; i < datasets; ++i)
318  lumidata->datasets.update(0);
319 
320  return lumidata;
321 }
322 
323 // called when the Stream is switching from one LuminosityBlock to a new LuminosityBlock.
325  edm::LuminosityBlock const& lumi,
326  edm::EventSetup const&) const {
327  auto& stream = *streamCache(sid);
328 
329  unsigned int triggers = 0;
330  unsigned int datasets = 0;
331  auto const& rundata = *runCache(lumi.getRun().index());
332  if (rundata.hltConfig.inited()) {
333  triggers = rundata.hltConfig.triggerNames().size();
334  datasets = rundata.hltConfig.datasetNames().size();
335  };
336 
337  // reset the stream counters
338  stream.processed = 0;
339  stream.hltWasRun.assign(triggers, 0);
340  stream.hltL1s.assign(triggers, 0);
341  stream.hltPre.assign(triggers, 0);
342  stream.hltAccept.assign(triggers, 0);
343  stream.hltReject.assign(triggers, 0);
344  stream.hltErrors.assign(triggers, 0);
345  stream.datasets.assign(datasets, 0);
346 }
347 
348 // called when a Stream has finished processing a LuminosityBlock, after streamEndLuminosityBlock
350  edm::LuminosityBlock const& lumi,
351  edm::EventSetup const&,
353  auto const& stream = *streamCache(sid);
354  auto const& rundata = *runCache(lumi.getRun().index());
355  lumidata->processed.value()[0] += stream.processed;
356 
357  // check that the HLTConfigProvider for the current run has been successfully initialised
358  if (not rundata.hltConfig.inited())
359  return;
360 
361  unsigned int triggers = rundata.hltConfig.triggerNames().size();
362  for (unsigned int i = 0; i < triggers; ++i) {
363  lumidata->hltWasRun.value()[i] += stream.hltWasRun[i];
364  lumidata->hltL1s.value()[i] += stream.hltL1s[i];
365  lumidata->hltPre.value()[i] += stream.hltPre[i];
366  lumidata->hltAccept.value()[i] += stream.hltAccept[i];
367  lumidata->hltReject.value()[i] += stream.hltReject[i];
368  lumidata->hltErrors.value()[i] += stream.hltErrors[i];
369  }
370  unsigned int datasets = rundata.hltConfig.datasetNames().size();
371  for (unsigned int i = 0; i < datasets; ++i)
372  lumidata->datasets.value()[i] += stream.datasets[i];
373 }
374 
375 // called after the streamEndLuminosityBlockSummary method for all Streams have finished processing a given LuminosityBlock
377  edm::EventSetup const&,
379  unsigned int ls = lumi.luminosityBlock();
380  unsigned int run = lumi.run();
381 
382  bool writeFiles = true;
383  if (edm::Service<evf::MicroStateService>().isAvailable()) {
386  if (fms)
387  writeFiles = fms->shouldWriteFiles(ls);
388  }
389  if (not writeFiles)
390  return;
391 
392  unsigned int processed = lumidata->processed.value().at(0);
393  auto const& rundata = *runCache(lumi.getRun().index());
395 
396  // [SIC]
397  char hostname[33];
398  gethostname(hostname, 32);
399  std::string sourceHost(hostname);
400 
401  // [SIC]
402  std::stringstream sOutDef;
403  sOutDef << rundata.baseRunDir << "/"
404  << "output_" << getpid() << ".jsd";
405 
406  std::string jsndataFileList = "";
407  unsigned int jsndataSize = 0;
408  unsigned int jsndataAdler32 = 1; // adler32 checksum for an empty file
409 
410  if (processed) {
411  // write the .jsndata files which contain the actual rates
412  Json::Value jsndata;
413  jsndata[jsoncollector::DataPoint::SOURCE] = sourceHost;
414  jsndata[jsoncollector::DataPoint::DEFINITION] = rundata.jsdFileName;
423 
424  auto jsndataFileName = boost::format("run%06d_ls%04d_streamHLTRates_pid%05d.jsndata") % run % ls % getpid();
425 
426  std::string result = writer.write(jsndata);
427  std::ofstream jsndataFile(rundata.baseRunDir + "/" + jsndataFileName.str());
428  jsndataFile << result;
429  jsndataFile.close();
430 
431  jsndataFileList = jsndataFileName.str();
432  jsndataSize = result.size();
433  jsndataAdler32 = cms::Adler32(result.c_str(), result.size());
434  }
435 
436  // create a metadata json file for the "HLT rates" pseudo-stream
437  unsigned int jsnProcessed = processed;
438  unsigned int jsnAccepted = processed;
439  unsigned int jsnErrorEvents = 0;
440  unsigned int jsnRetCodeMask = 0;
441  std::string jsnInputFiles = "";
442  unsigned int jsnHLTErrorEvents = 0;
443 
444  Json::Value jsn;
445  jsn[jsoncollector::DataPoint::SOURCE] = sourceHost;
446  jsn[jsoncollector::DataPoint::DEFINITION] = sOutDef.str();
447  jsn[jsoncollector::DataPoint::DATA].append(jsnProcessed);
448  jsn[jsoncollector::DataPoint::DATA].append(jsnAccepted);
449  jsn[jsoncollector::DataPoint::DATA].append(jsnErrorEvents);
450  jsn[jsoncollector::DataPoint::DATA].append(jsnRetCodeMask);
451  jsn[jsoncollector::DataPoint::DATA].append(jsndataFileList);
452  jsn[jsoncollector::DataPoint::DATA].append(jsndataSize);
453  jsn[jsoncollector::DataPoint::DATA].append(jsnInputFiles);
454  jsn[jsoncollector::DataPoint::DATA].append(jsndataAdler32);
455  jsn[jsoncollector::DataPoint::DATA].append(rundata.streamDestination);
456  jsn[jsoncollector::DataPoint::DATA].append(rundata.streamMergeType);
457  jsn[jsoncollector::DataPoint::DATA].append(jsnHLTErrorEvents);
458 
459  auto jsnFileName = boost::format("run%06d_ls%04d_streamHLTRates_pid%05d.jsn") % run % ls % getpid();
460  std::ofstream jsnFile(rundata.baseRunDir + "/" + jsnFileName.str());
461  jsnFile << writer.write(jsn);
462  jsnFile.close();
463 }
464 
466  std::ofstream file(rundata.baseRunDir + "/" + rundata.jsdFileName);
467  file << R"""({
468  "data" : [
469  { "name" : "Processed", "type" : "integer", "operation" : "histo"},
470  { "name" : "Path-WasRun", "type" : "integer", "operation" : "histo"},
471  { "name" : "Path-AfterL1Seed", "type" : "integer", "operation" : "histo"},
472  { "name" : "Path-AfterPrescale", "type" : "integer", "operation" : "histo"},
473  { "name" : "Path-Accepted", "type" : "integer", "operation" : "histo"},
474  { "name" : "Path-Rejected", "type" : "integer", "operation" : "histo"},
475  { "name" : "Path-Errors", "type" : "integer", "operation" : "histo"},
476  { "name" : "Dataset-Accepted", "type" : "integer", "operation" : "histo"}
477  ]
478 }
479 )""";
480  file.close();
481 }
482 
485 
487  for (auto const& name : rundata.hltConfig.triggerNames())
488  triggerNames.append(name);
489  content["Path-Names"] = triggerNames;
490 
492  for (auto const& name : rundata.hltConfig.datasetNames())
493  datasetNames.append(name);
494  content["Dataset-Names"] = datasetNames;
495 
496  std::string iniFileName = (boost::format("run%06d_ls0000_streamHLTRates_pid%05d.ini") % run % getpid()).str();
497  std::ofstream file(rundata.baseRunDir + "/" + iniFileName);
499  file << writer.write(content);
500  file.close();
501 }
502 
503 // declare as a framework plugin
ConfigurationDescriptions.h
HLTriggerJSONMonitoringData::run
Definition: HLTriggerJSONMonitoring.cc:46
edm::StreamID
Definition: StreamID.h:30
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
Handle.h
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HLTriggerJSONMonitoringData::lumisection::hltPre
jsoncollector::HistoJ< unsigned int > hltPre
Definition: HLTriggerJSONMonitoring.cc:63
MessageLogger.h
HLTriggerJSONMonitoring::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HLTriggerJSONMonitoring.cc:142
HLTriggerJSONMonitoring::globalBeginRun
std::shared_ptr< HLTriggerJSONMonitoringData::run > globalBeginRun(edm::Run const &, edm::EventSetup const &) const override
Definition: HLTriggerJSONMonitoring.cc:154
evf::FastMonitoringService::shouldWriteFiles
bool shouldWriteFiles(unsigned int lumi, unsigned int *proc=nullptr)
Definition: FastMonitoringService.h:171
ESHandle.h
TriggerResults.h
jsoncollector::HistoJ::value
std::vector< T > & value()
Definition: JsonMonitorable.h:224
HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary
void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, HLTriggerJSONMonitoringData::lumisection *) const override
Definition: HLTriggerJSONMonitoring.cc:376
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
mps_update.status
status
Definition: mps_update.py:69
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< edm::TriggerResults >
Json::arrayValue
array value (ordered list)
Definition: value.h:30
LuminosityBlock.h
edm
HLT enums.
Definition: AlignableModifier.h:19
HLTriggerJSONMonitoringData::run::datasets
std::vector< std::vector< unsigned int > > datasets
Definition: HLTriggerJSONMonitoring.cc:55
HLTriggerJSONMonitoringData::stream::hltReject
std::vector< unsigned int > hltReject
Definition: HLTriggerJSONMonitoring.cc:40
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HLTriggerJSONMonitoringData::run::jsdFileName
std::string jsdFileName
Definition: HLTriggerJSONMonitoring.cc:50
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
HLTriggerJSONMonitoringData::run::posPre
std::vector< int > posPre
Definition: HLTriggerJSONMonitoring.cc:54
jsoncollector::HistoJ< unsigned int >
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HLTriggerJSONMonitoringData::stream
Definition: HLTriggerJSONMonitoring.cc:34
HLTriggerJSONMonitoringData::stream::hltPre
std::vector< unsigned int > hltPre
Definition: HLTriggerJSONMonitoring.cc:38
cms::cuda::assert
assert(be >=bs)
HLTriggerJSONMonitoringData::lumisection
Definition: HLTriggerJSONMonitoring.cc:59
JsonMonitorable.h
bookConverter.results
results
Definition: bookConverter.py:144
edm::InputTag::process
std::string const & process() const
Definition: InputTag.h:40
HLTriggerJSONMonitoringData::lumisection::hltAccept
jsoncollector::HistoJ< unsigned int > hltAccept
Definition: HLTriggerJSONMonitoring.cc:64
cscNeutronWriter_cfi.writer
writer
Definition: cscNeutronWriter_cfi.py:6
HLTriggerJSONMonitoringData::stream::hltWasRun
std::vector< unsigned int > hltWasRun
Definition: HLTriggerJSONMonitoring.cc:36
HLTriggerJSONMonitoring::globalBeginLuminosityBlockSummary
std::shared_ptr< HLTriggerJSONMonitoringData::lumisection > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &) const override
Definition: HLTriggerJSONMonitoring.cc:281
HLTriggerJSONMonitoringData::run::hltConfig
HLTConfigProvider hltConfig
Definition: HLTriggerJSONMonitoring.cc:52
HLTriggerJSONMonitoringData
Definition: HLTriggerJSONMonitoring.cc:32
HLTriggerJSONMonitoring::analyze
void analyze(edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
Definition: HLTriggerJSONMonitoring.cc:228
HLTriggerJSONMonitoring::streamBeginLuminosityBlock
void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const override
Definition: HLTriggerJSONMonitoring.cc:324
edm::Handle< edm::TriggerResults >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
HLTriggerJSONMonitoringData::run::streamMergeType
std::string streamMergeType
Definition: HLTriggerJSONMonitoring.cc:48
HLTriggerJSONMonitoringData::lumisection::hltWasRun
jsoncollector::HistoJ< unsigned int > hltWasRun
Definition: HLTriggerJSONMonitoring.cc:61
config
Definition: config.py:1
evf::FastMonitoringService
Definition: FastMonitoringService.h:69
MakerMacros.h
HLTriggerJSONMonitoring::HLTriggerJSONMonitoring
HLTriggerJSONMonitoring(const edm::ParameterSet &)
Definition: HLTriggerJSONMonitoring.cc:137
jsoncollector::HistoJ::toJsonValue
virtual Json::Value toJsonValue() const
Definition: JsonMonitorable.h:210
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
evf::MergeTypeJSNDATA
Definition: EvFDaqDirector.h:58
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HLTriggerJSONMonitoringData::stream::datasets
std::vector< unsigned int > datasets
Definition: HLTriggerJSONMonitoring.cc:42
jsoncollector::DataPoint::DATA
static const std::string DATA
Definition: DataPoint.h:116
contentValuesFiles.datasets
datasets
Definition: contentValuesFiles.py:49
cms::Adler32
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
Definition: Adler32Calculator.cc:10
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
Service.h
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
HLTriggerJSONMonitoringData::lumisection::hltL1s
jsoncollector::HistoJ< unsigned int > hltL1s
Definition: HLTriggerJSONMonitoring.cc:62
Run.h
str
#define str(s)
Definition: TestProcessor.cc:48
Json::StyledWriter
Writes a Value in JSON format in a human friendly way.
Definition: writer.h:63
commonCuts_cff.triggerResults_
triggerResults_
Definition: commonCuts_cff.py:17
ServiceMaker.h
jsoncollector::DataPoint::DEFINITION
static const std::string DEFINITION
Definition: DataPoint.h:115
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTriggerJSONMonitoringData::run::baseRunDir
std::string baseRunDir
Definition: HLTriggerJSONMonitoring.cc:49
Skims_PA_cff.content
content
Definition: Skims_PA_cff.py:19
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Json::Value::append
Value & append(const Value &value)
Append value to array at the end.
edm::LogError
Definition: MessageLogger.h:183
HLTriggerJSONMonitoringData::stream::processed
unsigned int processed
Definition: HLTriggerJSONMonitoring.cc:35
Event.h
HLTriggerJSONMonitoring::triggerResults_
const edm::InputTag triggerResults_
Definition: HLTriggerJSONMonitoring.cc:132
HLTriggerJSONMonitoring::streamEndLuminosityBlockSummary
void streamEndLuminosityBlockSummary(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &, HLTriggerJSONMonitoringData::lumisection *) const override
Definition: HLTriggerJSONMonitoring.cc:349
HLTriggerJSONMonitoringData::stream::hltErrors
std::vector< unsigned int > hltErrors
Definition: HLTriggerJSONMonitoring.cc:41
HLTriggerJSONMonitoringData::stream::hltL1s
std::vector< unsigned int > hltL1s
Definition: HLTriggerJSONMonitoring.cc:37
edm::Service
Definition: Service.h:30
createfilelist.int
int
Definition: createfilelist.py:10
EvFDaqDirector.h
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
FastMonitoringService.h
JSONSerializer.h
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
edm::EventSetup
Definition: EventSetup.h:57
HLTriggerJSONMonitoring
Definition: HLTriggerJSONMonitoring.cc:71
HLTConfigProvider.h
jsoncollector::DataPoint::SOURCE
static const std::string SOURCE
Definition: DataPoint.h:114
HLTriggerJSONMonitoringData::lumisection::datasets
jsoncollector::HistoJ< unsigned int > datasets
Definition: HLTriggerJSONMonitoring.cc:67
HLTConfigProvider
Definition: HLTConfigProvider.h:28
writedatasetfile.run
run
Definition: writedatasetfile.py:27
HLTriggerJSONMonitoringData::run::streamDestination
std::string streamDestination
Definition: HLTriggerJSONMonitoring.cc:47
HLTriggerJSONMonitoring::writeIniFile
static void writeIniFile(HLTriggerJSONMonitoringData::run const &, unsigned int)
Definition: HLTriggerJSONMonitoring.cc:483
Adler32Calculator.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
or
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
Skims_PA_cff.paths
paths
Definition: Skims_PA_cff.py:18
HLTriggerJSONMonitoringData::lumisection::hltReject
jsoncollector::HistoJ< unsigned int > hltReject
Definition: HLTriggerJSONMonitoring.cc:65
HLTriggerJSONMonitoringData::lumisection::processed
jsoncollector::HistoJ< unsigned int > processed
Definition: HLTriggerJSONMonitoring.cc:60
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HLTriggerJSONMonitoring::streamName_
static constexpr const char * streamName_
Definition: HLTriggerJSONMonitoring.cc:126
HLTriggerJSONMonitoring::triggerResultsToken_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: HLTriggerJSONMonitoring.cc:133
dataset
Definition: dataset.py:1
HLTriggerJSONMonitoring::beginStream
std::unique_ptr< HLTriggerJSONMonitoringData::stream > beginStream(edm::StreamID) const override
Definition: HLTriggerJSONMonitoring.cc:149
mps_fire.result
result
Definition: mps_fire.py:303
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
ParameterSet.h
HLTriggerJSONMonitoring::globalEndRun
void globalEndRun(edm::Run const &, edm::EventSetup const &) const override
Definition: HLTriggerJSONMonitoring.cc:225
makeLayoutFileForGui.datasetNames
datasetNames
Definition: makeLayoutFileForGui.py:30
HLTriggerJSONMonitoringData::run::posL1s
std::vector< int > posL1s
Definition: HLTriggerJSONMonitoring.cc:53
HLTConfigProvider::triggerNames
const std::vector< std::string > & triggerNames() const
names of trigger paths
Definition: HLTConfigProvider.h:68
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HLTriggerJSONMonitoringData::lumisection::hltErrors
jsoncollector::HistoJ< unsigned int > hltErrors
Definition: HLTriggerJSONMonitoring.cc:66
event
Definition: event.py:1
HLTObjectsMonitor_cfi.TriggerResults
TriggerResults
Definition: HLTObjectsMonitor_cfi.py:9
edm::Event
Definition: Event.h:73
lumi
Definition: LumiSectionData.h:20
HLTriggerJSONMonitoring::writeJsdFile
static void writeJsdFile(HLTriggerJSONMonitoringData::run const &)
Definition: HLTriggerJSONMonitoring.cc:465
EDAnalyzer.h
edm::InputTag
Definition: InputTag.h:15
HLTConfigProvider::datasetNames
const std::vector< std::string > & datasetNames() const
Definition: HLTConfigProvider.h:166
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::TriggerResults
Definition: TriggerResults.h:35
FastMonitor.h
edm::global::EDAnalyzer
Definition: EDAnalyzer.h:32
Json::Value
Represents a JSON value.
Definition: value.h:99
HLTriggerJSONMonitoring::~HLTriggerJSONMonitoring
~HLTriggerJSONMonitoring() override=default
HLTriggerJSONMonitoringData::stream::hltAccept
std::vector< unsigned int > hltAccept
Definition: HLTriggerJSONMonitoring.cc:39