CMS 3D CMS Logo

L1TriggerJSONMonitoring.cc
Go to the documentation of this file.
1 
7 #include <atomic>
8 #include <fstream>
9 
10 #include <fmt/printf.h>
11 
33 
35  // special values for prescale index checks
36  static constexpr const int kPrescaleUndefined = -2;
37  static constexpr const int kPrescaleConflict = -1;
38  // variables accumulated event by event in each stream
39  struct stream {
40  unsigned int processed = 0; // number of events processed
41  std::vector<unsigned int> l1tAccept; // number of events accepted by each L1 trigger
42  std::vector<unsigned int> l1tAcceptPhysics; // number of "physics" events accepted by each L1 trigger
43  std::vector<unsigned int> l1tAcceptCalibration; // number of "calibration" events accepted by each L1 trigger
44  std::vector<unsigned int> l1tAcceptRandom; // number of "random" events accepted by each L1 trigger
45  std::vector<unsigned int> tcdsAccept; // number of "physics", "calibration", "random" and other event types
46  int prescaleIndex = kPrescaleUndefined; // prescale column index
47  };
48 
49  // variables initialised for each run
50  struct run {
53  std::string baseRunDir; // base directory from EvFDaqDirector
54  std::string jsdFileName; // definition file name for JSON with rates
55  };
56 
57  // variables accumulated over the whole lumisection
58  struct lumisection {
59  jsoncollector::HistoJ<unsigned int> processed; // number of events processed
60  jsoncollector::HistoJ<unsigned int> l1tAccept; // number of events accepted by each L1 trigger
61  jsoncollector::HistoJ<unsigned int> l1tAcceptPhysics; // number of "physics" events accepted by each L1 trigger
63  l1tAcceptCalibration; // number of "calibration" events accepted by each L1 trigger
64  jsoncollector::HistoJ<unsigned int> l1tAcceptRandom; // number of "random" events accepted by each L1 trigger
65  jsoncollector::HistoJ<unsigned int> tcdsAccept; // number of "physics", "calibration", "random" and other event types
66  int prescaleIndex = kPrescaleUndefined; // prescale column index
67  };
68 };
69 
71  // per-stream information
72  edm::StreamCache<L1TriggerJSONMonitoringData::stream>,
73  // per-run accounting
74  edm::RunCache<L1TriggerJSONMonitoringData::run>,
75  // accumulate per-lumisection statistics
76  edm::LuminosityBlockSummaryCache<L1TriggerJSONMonitoringData::lumisection> > {
77 public:
78  // constructor
80 
81  // destructor
82  ~L1TriggerJSONMonitoring() override = default;
83 
84  // validate the configuration and optionally fill the default values
85  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
86 
87  // called for each Event
88  void analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const override;
89 
90  // -- inherited from edm::StreamCache<L1TriggerJSONMonitoringData::stream>
91 
92  // called once for each Stream being used in the job to create the cache object that will be used for that particular Stream
93  std::unique_ptr<L1TriggerJSONMonitoringData::stream> beginStream(edm::StreamID) const override;
94 
95  // called when the Stream is switching from one LuminosityBlock to a new LuminosityBlock.
97 
98  // -- inherited from edm::RunCache<L1TriggerJSONMonitoringData::run>
99 
100  // called each time the Source sees a new Run, and guaranteed to finish before any Stream calls streamBeginRun for that same Run
101  std::shared_ptr<L1TriggerJSONMonitoringData::run> globalBeginRun(edm::Run const&,
102  edm::EventSetup const&) const override;
103 
104  // called after all Streams have finished processing a given Run (i.e. streamEndRun for all Streams have completed)
105  void globalEndRun(edm::Run const&, edm::EventSetup const&) const override;
106 
107  // -- inherited from edm::LuminosityBlockSummaryCache<L1TriggerJSONMonitoringData::lumisection>
108 
109  // called each time the Source sees a new LuminosityBlock
110  std::shared_ptr<L1TriggerJSONMonitoringData::lumisection> globalBeginLuminosityBlockSummary(
111  edm::LuminosityBlock const&, edm::EventSetup const&) const override;
112 
113  // called when a Stream has finished processing a LuminosityBlock, after streamEndLuminosityBlock
115  edm::LuminosityBlock const&,
116  edm::EventSetup const&,
118 
119  // called after the streamEndLuminosityBlockSummary method for all Streams have finished processing a given LuminosityBlock
121  edm::EventSetup const&,
123 
124 private:
125  // TCDS trigger types
126  // see https://twiki.cern.ch/twiki/bin/viewauth/CMS/TcdsEventRecord
127  static constexpr const std::array<const char*, 16> tcdsTriggerTypes_ = {{
128  "Error", // 0 - No trigger (DAQ error stream events may have this value)
129  "Physics", // 1 - GT trigger
130  "Calibration", // 2 - Sequence trigger (calibration)
131  "Random", // 3 - Random trigger
132  "Auxiliary", // 4 - Auxiliary (CPM front panel NIM input) trigger
133  "", // 5 - reserved
134  "", // 6 - reserved
135  "", // 7 - reserved
136  "Cyclic", // 8 - Cyclic trigger
137  "Bunch-pattern", // 9 - Bunch-pattern trigger
138  "Software", // 10 - Software trigger
139  "TTS", // 11 - TTS-sourced trigger
140  "", // 12 - reserved
141  "", // 13 - reserved
142  "", // 14 - reserved
143  "" // 15 - reserved
144  }};
145 
146  static constexpr const char* streamName_ = "streamL1Rates";
147 
149  static void writeIniFile(L1TriggerJSONMonitoringData::run const&, unsigned int, std::vector<std::string> const&);
150 
151  // configuration
152  const edm::InputTag level1Results_; // InputTag for L1 trigger results
155 };
156 
157 // instantiate static data members
158 constexpr const std::array<const char*, 16> L1TriggerJSONMonitoring::tcdsTriggerTypes_;
159 
160 // constructor
162  : level1Results_(config.getParameter<edm::InputTag>("L1Results")),
163  level1ResultsToken_(consumes<GlobalAlgBlkBxCollection>(level1Results_)),
164  l1tUtmTriggerMenuRcdToken_(esConsumes<edm::Transition::BeginRun>()) {}
165 
166 // validate the configuration and optionally fill the default values
169  desc.add<edm::InputTag>("L1Results", edm::InputTag("hltGtStage2Digis"));
170  descriptions.add("L1TriggerJSONMonitoring", desc);
171 }
172 
173 // called once for each Stream being used in the job to create the cache object that will be used for that particular Stream
174 std::unique_ptr<L1TriggerJSONMonitoringData::stream> L1TriggerJSONMonitoring::beginStream(edm::StreamID) const {
175  return std::make_unique<L1TriggerJSONMonitoringData::stream>();
176 }
177 
178 // called each time the Source sees a new Run, and guaranteed to finish before any Stream calls streamBeginRun for that same Run
179 std::shared_ptr<L1TriggerJSONMonitoringData::run> L1TriggerJSONMonitoring::globalBeginRun(
180  edm::Run const& run, edm::EventSetup const& setup) const {
181  auto rundata = std::make_shared<L1TriggerJSONMonitoringData::run>();
182 
183  // set the DAQ parameters
184  if (edm::Service<evf::EvFDaqDirector>().isAvailable()) {
185  rundata->streamDestination = edm::Service<evf::EvFDaqDirector>()->getStreamDestinations(streamName_);
186  rundata->streamMergeType =
188  rundata->baseRunDir = edm::Service<evf::EvFDaqDirector>()->baseRunDir();
189  } else {
190  rundata->streamDestination = "";
191  rundata->streamMergeType = "";
192  rundata->baseRunDir = ".";
193  }
194 
195  // read the L1 trigger names from the EventSetup
196  std::vector<std::string> triggerNames(GlobalAlgBlk::maxPhysicsTriggers, ""s);
197  auto const& menuHandle = setup.getHandle(l1tUtmTriggerMenuRcdToken_);
198  if (menuHandle.isValid()) {
199  for (auto const& algo : menuHandle->getAlgorithmMap())
200  triggerNames[algo.second.getIndex()] = algo.first;
201  } else {
202  edm::LogWarning("L1TriggerJSONMonitoring") << "L1TUtmTriggerMenu not found in the EventSetup.\nThe Level 1 Trigger "
203  "rate monitoring will not include the trigger names.";
204  }
205 
206  // write the per-run .jsd file
207  rundata->jsdFileName = fmt::sprintf("run%06d_ls0000_streamL1Rates_pid%05d.jsd", run.run(), getpid());
208  writeJsdFile(*rundata);
209 
210  // write the per-run .ini file
211  //iniFileName = fmt::sprintf("run%06d_ls0000_streamL1Rates_pid%05d.ini", run.run(), getpid());
212  writeIniFile(*rundata, run.run(), triggerNames);
213 
214  return rundata;
215 }
216 
217 // called after all Streams have finished processing a given Run (i.e. streamEndRun for all Streams have completed)
219 
220 // called for each Event
222  auto& stream = *streamCache(sid);
223 
224  ++stream.processed;
225  unsigned int eventType = event.experimentType();
226  if (eventType < tcdsTriggerTypes_.size())
227  ++stream.tcdsAccept[eventType];
228  else
229  edm::LogWarning("L1TriggerJSONMonitoring") << "Unexpected event type " << eventType;
230 
231  // get hold of TriggerResults
233  if (not event.getByToken(level1ResultsToken_, handle) or not handle.isValid() or handle->isEmpty(0)) {
234  edm::LogError("L1TriggerJSONMonitoring")
235  << "L1 trigger results with label [" + level1Results_.encode() + "] not present or invalid";
236  return;
237  }
238 
239  // The GlobalAlgBlkBxCollection is a vector of vectors, but the second layer can only ever
240  // have one entry since there can't be more than one collection per bunch crossing.
241  // The first "0" here means BX = 0, while the second "0" is used to access the first and only element.
242  auto const& results = handle->at(0, 0);
243  auto const& decision = results.getAlgoDecisionFinal();
244  assert(decision.size() == GlobalAlgBlk::maxPhysicsTriggers);
245 
246  // check the results for each HLT path
247  for (unsigned int i = 0; i < decision.size(); ++i) {
248  if (decision[i]) {
249  ++stream.l1tAccept[i];
250  switch (eventType) {
252  ++stream.l1tAcceptPhysics[i];
253  break;
255  ++stream.l1tAcceptCalibration[i];
256  break;
258  ++stream.l1tAcceptRandom[i];
259  break;
260  default:
261  break;
262  }
263  }
264  }
265 
266  // check for conflicting values in the prescale column index, and store it
267  int prescaleIndex = results.getPreScColumn();
269  stream.prescaleIndex = prescaleIndex;
270  } else if (stream.prescaleIndex == L1TriggerJSONMonitoringData::kPrescaleConflict) {
271  // do nothing
272  } else if (stream.prescaleIndex != prescaleIndex) {
273  edm::LogWarning("L1TriggerJSONMonitoring") << "Prescale index changed from " << stream.prescaleIndex << " to "
274  << prescaleIndex << " inside lumisection " << event.luminosityBlock();
276  }
277 }
278 
279 // called each time the Source sees a new LuminosityBlock
280 std::shared_ptr<L1TriggerJSONMonitoringData::lumisection> L1TriggerJSONMonitoring::globalBeginLuminosityBlockSummary(
281  edm::LuminosityBlock const& lumi, edm::EventSetup const&) const {
282  // the API of jsoncollector::HistoJ does not really match our use case,
283  // but it is the only vector-like object available in JsonMonitorable.h
284  auto lumidata = std::make_shared<L1TriggerJSONMonitoringData::lumisection>(L1TriggerJSONMonitoringData::lumisection{
285  jsoncollector::HistoJ<unsigned int>(1), // processed
291  });
292  // repeated calls to `update` necessary to set the internal element counter
293  lumidata->processed.update(0);
294  for (unsigned int i = 0; i < GlobalAlgBlk::maxPhysicsTriggers; ++i)
295  lumidata->l1tAccept.update(0);
296  for (unsigned int i = 0; i < GlobalAlgBlk::maxPhysicsTriggers; ++i)
297  lumidata->l1tAcceptPhysics.update(0);
298  for (unsigned int i = 0; i < GlobalAlgBlk::maxPhysicsTriggers; ++i)
299  lumidata->l1tAcceptCalibration.update(0);
300  for (unsigned int i = 0; i < GlobalAlgBlk::maxPhysicsTriggers; ++i)
301  lumidata->l1tAcceptRandom.update(0);
302  for (unsigned int i = 0; i < tcdsTriggerTypes_.size(); ++i)
303  lumidata->tcdsAccept.update(0);
304  lumidata->prescaleIndex = L1TriggerJSONMonitoringData::kPrescaleUndefined;
305 
306  return lumidata;
307 }
308 
309 // called when the Stream is switching from one LuminosityBlock to a new LuminosityBlock.
311  edm::LuminosityBlock const& lumi,
312  edm::EventSetup const&) const {
313  auto& stream = *streamCache(sid);
314 
315  // reset the stream counters
316  stream.processed = 0;
317  stream.l1tAccept.assign(GlobalAlgBlk::maxPhysicsTriggers, 0);
318  stream.l1tAcceptPhysics.assign(GlobalAlgBlk::maxPhysicsTriggers, 0);
319  stream.l1tAcceptCalibration.assign(GlobalAlgBlk::maxPhysicsTriggers, 0);
320  stream.l1tAcceptRandom.assign(GlobalAlgBlk::maxPhysicsTriggers, 0);
321  stream.tcdsAccept.assign(tcdsTriggerTypes_.size(), 0);
323 }
324 
325 // called when a Stream has finished processing a LuminosityBlock, after streamEndLuminosityBlock
327  edm::LuminosityBlock const& lumi,
328  edm::EventSetup const&,
330  auto const& stream = *streamCache(sid);
331  lumidata->processed.value()[0] += stream.processed;
332 
333  for (unsigned int i = 0; i < GlobalAlgBlk::maxPhysicsTriggers; ++i) {
334  lumidata->l1tAccept.value()[i] += stream.l1tAccept[i];
335  lumidata->l1tAcceptPhysics.value()[i] += stream.l1tAcceptPhysics[i];
336  lumidata->l1tAcceptCalibration.value()[i] += stream.l1tAcceptCalibration[i];
337  lumidata->l1tAcceptRandom.value()[i] += stream.l1tAcceptRandom[i];
338  }
339  for (unsigned int i = 0; i < tcdsTriggerTypes_.size(); ++i)
340  lumidata->tcdsAccept.value()[i] += stream.tcdsAccept[i];
341 
342  // check for conflicting values in the prescale column index
344  lumidata->prescaleIndex = stream.prescaleIndex;
345  else if (lumidata->prescaleIndex != stream.prescaleIndex)
347 }
348 
349 // called after the streamEndLuminosityBlockSummary method for all Streams have finished processing a given LuminosityBlock
351  edm::EventSetup const&,
353  unsigned int ls = lumi.luminosityBlock();
354  unsigned int run = lumi.run();
355 
356  bool writeFiles = true;
357  if (edm::Service<evf::MicroStateService>().isAvailable()) {
360  if (fms)
361  writeFiles = fms->shouldWriteFiles(ls);
362  }
363  if (not writeFiles)
364  return;
365 
366  unsigned int processed = lumidata->processed.value().at(0);
367  auto const& rundata = *runCache(lumi.getRun().index());
369 
370  // [SIC]
371  char hostname[33];
372  gethostname(hostname, 32);
373  std::string sourceHost(hostname);
374 
375  // [SIC]
376  std::stringstream sOutDef;
377  sOutDef << rundata.baseRunDir << "/"
378  << "output_" << getpid() << ".jsd";
379 
380  std::string jsndataFileList = "";
381  unsigned int jsndataSize = 0;
382  unsigned int jsndataAdler32 = 1; // adler32 checksum for an empty file
383 
384  if (processed) {
385  // write the .jsndata files which contain the actual rates
386  Json::Value jsndata;
387  jsndata[jsoncollector::DataPoint::SOURCE] = sourceHost;
388  jsndata[jsoncollector::DataPoint::DEFINITION] = rundata.jsdFileName;
394 
395  // write only the number of "physics", "calibration" and "random" events
400  jsndata[jsoncollector::DataPoint::DATA].append(tcdsAccept.toJsonValue());
401  /* FIXME send information for all event types instead of only these three
402  jsndata[jsoncollector::DataPoint::DATA].append(lumidata->tcdsAccept.toJsonValue());
403  */
405 
406  auto jsndataFileName = fmt::sprintf("run%06d_ls%04d_streamL1Rates_pid%05d.jsndata", run, ls, getpid());
407 
408  std::string result = writer.write(jsndata);
409  std::ofstream jsndataFile(rundata.baseRunDir + "/" + jsndataFileName);
410  jsndataFile << result;
411  jsndataFile.close();
412 
413  jsndataFileList = jsndataFileName;
414  jsndataSize = result.size();
415  jsndataAdler32 = cms::Adler32(result.c_str(), result.size());
416  }
417 
418  // create a metadata json file for the "HLT rates" pseudo-stream
419  unsigned int jsnProcessed = processed;
420  unsigned int jsnAccepted = processed;
421  unsigned int jsnErrorEvents = 0;
422  unsigned int jsnRetCodeMask = 0;
423  std::string jsnInputFiles = "";
424  unsigned int jsnHLTErrorEvents = 0;
425 
426  Json::Value jsn;
427  jsn[jsoncollector::DataPoint::SOURCE] = sourceHost;
428  jsn[jsoncollector::DataPoint::DEFINITION] = sOutDef.str();
429  jsn[jsoncollector::DataPoint::DATA].append(jsnProcessed);
430  jsn[jsoncollector::DataPoint::DATA].append(jsnAccepted);
431  jsn[jsoncollector::DataPoint::DATA].append(jsnErrorEvents);
432  jsn[jsoncollector::DataPoint::DATA].append(jsnRetCodeMask);
433  jsn[jsoncollector::DataPoint::DATA].append(jsndataFileList);
434  jsn[jsoncollector::DataPoint::DATA].append(jsndataSize);
435  jsn[jsoncollector::DataPoint::DATA].append(jsnInputFiles);
436  jsn[jsoncollector::DataPoint::DATA].append(jsndataAdler32);
437  jsn[jsoncollector::DataPoint::DATA].append(rundata.streamDestination);
438  jsn[jsoncollector::DataPoint::DATA].append(rundata.streamMergeType);
439  jsn[jsoncollector::DataPoint::DATA].append(jsnHLTErrorEvents);
440 
441  auto jsnFileName = fmt::sprintf("run%06d_ls%04d_streamL1Rates_pid%05d.jsn", run, ls, getpid());
442  std::ofstream jsnFile(rundata.baseRunDir + "/" + jsnFileName);
443  jsnFile << writer.write(jsn);
444  jsnFile.close();
445 }
446 
448  std::ofstream file(rundata.baseRunDir + "/" + rundata.jsdFileName);
449  file << R"""({
450  "data" : [
451  { "name" : "Processed", "type" : "integer", "operation" : "histo"},
452  { "name" : "L1-AlgoAccepted", "type" : "integer", "operation" : "histo"},
453  { "name" : "L1-AlgoAccepted-Physics", "type" : "integer", "operation" : "histo"},
454  { "name" : "L1-AlgoAccepted-Calibration", "type" : "integer", "operation" : "histo"},
455  { "name" : "L1-AlgoAccepted-Random", "type" : "integer", "operation" : "histo"},
456  { "name" : "L1-Global", "type" : "integer", "operation" : "histo"},
457  { "name" : "Prescale-Index", "type" : "integer", "operation" : "sample"}
458  ]
459 })""";
460  file.close();
461 }
462 
464  unsigned int run,
465  std::vector<std::string> const& l1TriggerNames) {
467 
469  for (auto const& name : l1TriggerNames)
470  triggerNames.append(name);
471  content["L1-Algo-Names"] = triggerNames;
472 
477  /* FIXME send information for all event types instead of only these three
478  for (auto const& name : tcdsTriggerTypes_)
479  eventTypes.append(name);
480  */
481  content["Event-Type"] = eventTypes;
482 
483  std::string iniFileName = fmt::sprintf("run%06d_ls0000_streamL1Rates_pid%05d.ini", run, getpid());
484  std::ofstream file(rundata.baseRunDir + "/" + iniFileName);
486  file << writer.write(content);
487  file.close();
488 }
489 
490 // declare as a framework plugin
ConfigurationDescriptions.h
edm::StreamID
Definition: StreamID.h:30
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
Handle.h
L1TriggerJSONMonitoringData::lumisection::processed
jsoncollector::HistoJ< unsigned int > processed
Definition: L1TriggerJSONMonitoring.cc:59
L1TriggerJSONMonitoringData::stream::tcdsAccept
std::vector< unsigned int > tcdsAccept
Definition: L1TriggerJSONMonitoring.cc:45
mps_fire.i
i
Definition: mps_fire.py:428
L1TriggerJSONMonitoringData::stream::prescaleIndex
int prescaleIndex
Definition: L1TriggerJSONMonitoring.cc:46
L1TriggerJSONMonitoringData::run
Definition: L1TriggerJSONMonitoring.cc:50
L1TriggerJSONMonitoringData::kPrescaleConflict
static constexpr const int kPrescaleConflict
Definition: L1TriggerJSONMonitoring.cc:37
L1TUtmTriggerMenuRcd.h
MessageLogger.h
L1TriggerJSONMonitoring::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: L1TriggerJSONMonitoring.cc:167
L1TriggerJSONMonitoring::beginStream
std::unique_ptr< L1TriggerJSONMonitoringData::stream > beginStream(edm::StreamID) const override
Definition: L1TriggerJSONMonitoring.cc:174
evf::FastMonitoringService::shouldWriteFiles
bool shouldWriteFiles(unsigned int lumi, unsigned int *proc=nullptr)
Definition: FastMonitoringService.h:210
jsoncollector::HistoJ::value
std::vector< T > & value()
Definition: JsonMonitorable.h:224
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::Run
Definition: Run.h:45
L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary
void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, L1TriggerJSONMonitoringData::lumisection *) const override
Definition: L1TriggerJSONMonitoring.cc:350
edm::EDGetTokenT
Definition: EDGetToken.h:33
Json::arrayValue
array value (ordered list)
Definition: value.h:30
LuminosityBlock.h
L1TriggerJSONMonitoringData::run::baseRunDir
std::string baseRunDir
Definition: L1TriggerJSONMonitoring.cc:53
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TriggerJSONMonitoringData::kPrescaleUndefined
static constexpr const int kPrescaleUndefined
Definition: L1TriggerJSONMonitoring.cc:36
GlobalExtBlk.h
L1TriggerJSONMonitoringData::lumisection
Definition: L1TriggerJSONMonitoring.cc:58
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
edm::EventAuxiliary::CalibrationTrigger
Definition: EventAuxiliary.h:21
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
jsoncollector::HistoJ< unsigned int >
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
L1TriggerJSONMonitoring::writeIniFile
static void writeIniFile(L1TriggerJSONMonitoringData::run const &, unsigned int, std::vector< std::string > const &)
Definition: L1TriggerJSONMonitoring.cc:463
cms::cuda::assert
assert(be >=bs)
JsonMonitorable.h
bookConverter.results
results
Definition: bookConverter.py:144
cscNeutronWriter_cfi.writer
writer
Definition: cscNeutronWriter_cfi.py:6
L1TUtmAlgorithm.h
L1TriggerJSONMonitoringData::stream::l1tAccept
std::vector< unsigned int > l1tAccept
Definition: L1TriggerJSONMonitoring.cc:41
L1TriggerJSONMonitoringData::lumisection::l1tAcceptRandom
jsoncollector::HistoJ< unsigned int > l1tAcceptRandom
Definition: L1TriggerJSONMonitoring.cc:64
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1TriggerJSONMonitoringData::run::streamMergeType
std::string streamMergeType
Definition: L1TriggerJSONMonitoring.cc:52
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
L1TriggerJSONMonitoring::globalEndRun
void globalEndRun(edm::Run const &, edm::EventSetup const &) const override
Definition: L1TriggerJSONMonitoring.cc:218
L1TriggerJSONMonitoringData::stream::l1tAcceptRandom
std::vector< unsigned int > l1tAcceptRandom
Definition: L1TriggerJSONMonitoring.cc:44
L1TriggerJSONMonitoring::L1TriggerJSONMonitoring
L1TriggerJSONMonitoring(const edm::ParameterSet &)
Definition: L1TriggerJSONMonitoring.cc:161
L1TriggerJSONMonitoringData::stream::processed
unsigned int processed
Definition: L1TriggerJSONMonitoring.cc:40
L1TriggerJSONMonitoring::globalBeginRun
std::shared_ptr< L1TriggerJSONMonitoringData::run > globalBeginRun(edm::Run const &, edm::EventSetup const &) const override
Definition: L1TriggerJSONMonitoring.cc:179
BXVector
Definition: BXVector.h:15
config
Definition: config.py:1
evf::FastMonitoringService
Definition: FastMonitoringService.h:153
cmsdt::algo
algo
Definition: constants.h:165
MakerMacros.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1TriggerJSONMonitoring::level1Results_
const edm::InputTag level1Results_
Definition: L1TriggerJSONMonitoring.cc:152
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
jsoncollector::DataPoint::DATA
static const std::string DATA
Definition: DataPoint.h:116
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
L1TriggerJSONMonitoringData::stream
Definition: L1TriggerJSONMonitoring.cc:39
Service.h
L1TriggerJSONMonitoring::writeJsdFile
static void writeJsdFile(L1TriggerJSONMonitoringData::run const &)
Definition: L1TriggerJSONMonitoring.cc:447
Run.h
Json::StyledWriter
Writes a Value in JSON format in a human friendly way.
Definition: writer.h:63
ServiceMaker.h
jsoncollector::DataPoint::DEFINITION
static const std::string DEFINITION
Definition: DataPoint.h:115
L1TriggerJSONMonitoringData::lumisection::l1tAccept
jsoncollector::HistoJ< unsigned int > l1tAccept
Definition: L1TriggerJSONMonitoring.cc:60
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
jsoncollector::HistoJ::update
void update(T val)
Definition: JsonMonitorable.h:245
L1TriggerJSONMonitoring::streamName_
static constexpr const char * streamName_
Definition: L1TriggerJSONMonitoring.cc:146
L1TUtmTriggerMenu.h
Skims_PA_cff.content
content
Definition: Skims_PA_cff.py:19
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
Json::Value::append
Value & append(const Value &value)
Append value to array at the end.
Event.h
L1TriggerJSONMonitoring::streamBeginLuminosityBlock
void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const override
Definition: L1TriggerJSONMonitoring.cc:310
L1TriggerJSONMonitoringData
Definition: L1TriggerJSONMonitoring.cc:34
edm::Service
Definition: Service.h:30
EvFDaqDirector.h
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
FastMonitoringService.h
L1TriggerJSONMonitoringData::lumisection::l1tAcceptCalibration
jsoncollector::HistoJ< unsigned int > l1tAcceptCalibration
Definition: L1TriggerJSONMonitoring.cc:63
GlobalAlgBlk.h
JSONSerializer.h
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
L1TriggerJSONMonitoring::level1ResultsToken_
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > level1ResultsToken_
Definition: L1TriggerJSONMonitoring.cc:153
L1TriggerJSONMonitoring::analyze
void analyze(edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
Definition: L1TriggerJSONMonitoring.cc:221
edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd >
hcalcalib_dqm_sourceclient-live_cfg.eventType
eventType
Definition: hcalcalib_dqm_sourceclient-live_cfg.py:205
jsoncollector::DataPoint::SOURCE
static const std::string SOURCE
Definition: DataPoint.h:114
L1TriggerJSONMonitoring
Definition: L1TriggerJSONMonitoring.cc:70
L1TriggerJSONMonitoringData::stream::l1tAcceptPhysics
std::vector< unsigned int > l1tAcceptPhysics
Definition: L1TriggerJSONMonitoring.cc:42
edm::EventAuxiliary::PhysicsTrigger
Definition: EventAuxiliary.h:20
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
L1TriggerJSONMonitoringData::run::streamDestination
std::string streamDestination
Definition: L1TriggerJSONMonitoring.cc:51
writedatasetfile.run
run
Definition: writedatasetfile.py:27
L1TriggerJSONMonitoringData::lumisection::prescaleIndex
int prescaleIndex
Definition: L1TriggerJSONMonitoring.cc:66
L1TriggerJSONMonitoringData::lumisection::l1tAcceptPhysics
jsoncollector::HistoJ< unsigned int > l1tAcceptPhysics
Definition: L1TriggerJSONMonitoring.cc:61
L1TriggerJSONMonitoring::streamEndLuminosityBlockSummary
void streamEndLuminosityBlockSummary(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &, L1TriggerJSONMonitoringData::lumisection *) const override
Definition: L1TriggerJSONMonitoring.cc:326
L1TriggerJSONMonitoringData::lumisection::tcdsAccept
jsoncollector::HistoJ< unsigned int > tcdsAccept
Definition: L1TriggerJSONMonitoring.cc:65
L1TriggerJSONMonitoring::globalBeginLuminosityBlockSummary
std::shared_ptr< L1TriggerJSONMonitoringData::lumisection > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &) const override
Definition: L1TriggerJSONMonitoring.cc:280
L1TriggerJSONMonitoring::tcdsTriggerTypes_
static constexpr const std::array< const char *, 16 > tcdsTriggerTypes_
Definition: L1TriggerJSONMonitoring.cc:127
Adler32Calculator.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
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
L1TriggerJSONMonitoringData::run::jsdFileName
std::string jsdFileName
Definition: L1TriggerJSONMonitoring.cc:54
RawDataTask_cfi.eventTypes
eventTypes
Definition: RawDataTask_cfi.py:3
mps_fire.result
result
Definition: mps_fire.py:311
ParameterSet.h
L1TriggerJSONMonitoring::l1tUtmTriggerMenuRcdToken_
const edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd > l1tUtmTriggerMenuRcdToken_
Definition: L1TriggerJSONMonitoring.cc:154
GlobalAlgBlk::maxPhysicsTriggers
static constexpr unsigned int maxPhysicsTriggers
Definition: GlobalAlgBlk.h:52
event
Definition: event.py:1
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
lumi
Definition: LumiSectionData.h:20
edm::Log
Definition: MessageLogger.h:70
EDAnalyzer.h
edm::EventAuxiliary::RandomTrigger
Definition: EventAuxiliary.h:22
edm::InputTag
Definition: InputTag.h:15
FastMonitor.h
edm::global::EDAnalyzer
Definition: EDAnalyzer.h:32
L1TriggerJSONMonitoring::~L1TriggerJSONMonitoring
~L1TriggerJSONMonitoring() override=default
Json::Value
Represents a JSON value.
Definition: value.h:99
L1TriggerJSONMonitoringData::stream::l1tAcceptCalibration
std::vector< unsigned int > l1tAcceptCalibration
Definition: L1TriggerJSONMonitoring.cc:43