CMS 3D CMS Logo

GlobalEvFOutputModule.cc
Go to the documentation of this file.
2 
6 
10 
15 
17 
20 
23 
27 
30 
32 
33 #include <sys/stat.h>
34 #include <filesystem>
35 #include <boost/algorithm/string.hpp>
36 
38 
39 namespace evf {
40 
42 
44  public:
47 
49 
50  void close() { stream_writer_events_->close(); }
51 
53  EventMsgView eview(msg.startAddress());
54  stream_writer_events_->write(eview);
55  incAccepted();
56  }
57 
58  void doOutputEventAsync(std::unique_ptr<EventMsgBuilder> msg, edm::WaitingTaskHolder iHolder) {
59  auto group = iHolder.group();
60  writeQueue_.push(*group, [holder = std::move(iHolder), msg = msg.release(), this]() {
61  try {
62  std::unique_ptr<EventMsgBuilder> own(msg);
63  doOutputEvent(*msg); //msg is written and discarded at this point
64  } catch (...) {
65  auto tmp = holder;
66  tmp.doneWaiting(std::current_exception());
67  }
68  });
69  }
70 
71  uint32 get_adler32() const { return stream_writer_events_->adler32(); }
72 
73  std::string const& getFilePath() const { return filePath_; }
74 
75  unsigned long getAccepted() const { return accepted_; }
76  void incAccepted() { accepted_++; }
77 
79 
80  private:
82  std::atomic<unsigned long> accepted_;
85  };
86 
88  public:
90 
93  };
94 
96  public:
99  std::string const& outJsonDefName);
100 
112  std::shared_ptr<jsoncollector::FastMonitor> jsonMonitor_;
113  };
114 
120 
122  public:
123  explicit GlobalEvFOutputModule(edm::ParameterSet const& ps);
124  ~GlobalEvFOutputModule() override;
125  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
126 
127  private:
128  std::unique_ptr<edm::StreamerOutputModuleCommon> beginStream(edm::StreamID) const final;
129 
130  std::shared_ptr<GlobalEvFOutputJSONDef> globalBeginRun(edm::RunForOutput const& run) const final;
131 
133  void write(edm::EventForOutput const& e) final;
134 
135  //pure in parent class but unused here
137  void writeRun(edm::RunForOutput const&) final {}
138  void globalEndRun(edm::RunForOutput const&) const final {}
139 
140  std::shared_ptr<GlobalEvFOutputEventWriter> globalBeginLuminosityBlock(
141  edm::LuminosityBlockForOutput const& iLB) const final;
142  void globalEndLuminosityBlock(edm::LuminosityBlockForOutput const& iLB) const final;
143 
145 
150 
152 
153  }; //end-of-class-def
154 
156  std::string baseRunDir = edm::Service<evf::EvFDaqDirector>()->baseRunDir();
157  LogDebug("GlobalEvFOutputModule") << "writing .dat files to -: " << baseRunDir;
158 
159  edm::Service<evf::EvFDaqDirector>()->createRunOpendirMaybe();
160 
170  outJsonDef_.addLegendItem("TransferDestination", "string", jsoncollector::DataPointDefinition::SAME);
173 
174  std::stringstream tmpss, ss;
175  tmpss << baseRunDir << "/open/"
176  << "output_" << getpid() << ".jsd";
177  ss << baseRunDir << "/"
178  << "output_" << getpid() << ".jsd";
179  std::string outTmpJsonDefName = tmpss.str();
180  outJsonDefName_ = ss.str();
181 
182  edm::Service<evf::EvFDaqDirector>()->lockInitLock();
183  struct stat fstat;
184  if (stat(outJsonDefName_.c_str(), &fstat) != 0) { //file does not exist
185  LogDebug("GlobalEvFOutputModule") << "writing output definition file -: " << outJsonDefName_;
189  std::filesystem::rename(outTmpJsonDefName, outJsonDefName_);
190  }
191  edm::Service<evf::EvFDaqDirector>()->unlockInitLock();
192  }
194  jsoncollector::DataPointDefinition const& outJsonDef,
195  std::string const& outJsonDefName)
196  : processed_(0),
197  accepted_(0),
198  errorEvents_(0),
199  retCodeMask_(0),
200  filelist_(),
201  filesize_(0),
202  inputFiles_(),
203  fileAdler32_(1),
204  hltErrorEvents_(0) {
207 
208  processed_.setName("Processed");
209  accepted_.setName("Accepted");
210  errorEvents_.setName("ErrorEvents");
211  retCodeMask_.setName("ReturnCodeMask");
212  filelist_.setName("Filelist");
213  filesize_.setName("Filesize");
214  inputFiles_.setName("InputFiles");
215  fileAdler32_.setName("FileAdler32");
216  transferDestination_.setName("TransferDestination");
217  mergeType_.setName("MergeType");
218  hltErrorEvents_.setName("HLTErrorEvents");
219 
220  jsonMonitor_.reset(new jsoncollector::FastMonitor(&outJsonDef, true));
221  jsonMonitor_->setDefPath(outJsonDefName);
222  jsonMonitor_->registerGlobalMonitorable(&processed_, false);
223  jsonMonitor_->registerGlobalMonitorable(&accepted_, false);
224  jsonMonitor_->registerGlobalMonitorable(&errorEvents_, false);
225  jsonMonitor_->registerGlobalMonitorable(&retCodeMask_, false);
226  jsonMonitor_->registerGlobalMonitorable(&filelist_, false);
227  jsonMonitor_->registerGlobalMonitorable(&filesize_, false);
228  jsonMonitor_->registerGlobalMonitorable(&inputFiles_, false);
229  jsonMonitor_->registerGlobalMonitorable(&fileAdler32_, false);
230  jsonMonitor_->registerGlobalMonitorable(&transferDestination_, false);
231  jsonMonitor_->registerGlobalMonitorable(&mergeType_, false);
232  jsonMonitor_->registerGlobalMonitorable(&hltErrorEvents_, false);
233  jsonMonitor_->commit(nullptr);
234  }
235 
237  : edm::global::OutputModuleBase(ps),
239  ps_(ps),
240  streamLabel_(ps.getParameter<std::string>("@module_label")),
241  trToken_(consumes<edm::TriggerResults>(edm::InputTag("TriggerResults"))),
242  psetToken_(consumes<edm::SendJobHeader::ParameterSetMap, edm::InRun>(
243  ps.getUntrackedParameter<edm::InputTag>("psetMap"))) {
244  //replace hltOutoputA with stream if the HLT menu uses this convention
245  std::string testPrefix = "hltOutput";
246  if (streamLabel_.find(testPrefix) == 0)
247  streamLabel_ = std::string("stream") + streamLabel_.substr(testPrefix.size());
248 
249  if (streamLabel_.find('_') != std::string::npos) {
250  throw cms::Exception("GlobalEvFOutputModule")
251  << "Underscore character is reserved can not be used for stream names in "
252  "FFF, but was detected in stream name -: "
253  << streamLabel_;
254  }
255 
256  std::string streamLabelLow = streamLabel_;
257  boost::algorithm::to_lower(streamLabelLow);
258  auto streampos = streamLabelLow.rfind("stream");
259  if (streampos != 0 && streampos != std::string::npos)
260  throw cms::Exception("GlobalEvFOutputModule")
261  << "stream (case-insensitive) sequence was found in stream suffix. This is reserved and can not be used for "
262  "names in FFF based HLT, but was detected in stream name";
263 
265  }
266 
268 
273  desc.addUntracked<edm::InputTag>("psetMap", {"hltPSetMap"})
274  ->setComment("Optionally allow the map of ParameterSets to be calculated externally.");
275  descriptions.add("globalEvfOutputModule", desc);
276  }
277 
278  std::unique_ptr<edm::StreamerOutputModuleCommon> GlobalEvFOutputModule::beginStream(edm::StreamID) const {
279  return std::make_unique<edm::StreamerOutputModuleCommon>(ps_, &keptProducts()[edm::InEvent]);
280  }
281 
282  std::shared_ptr<GlobalEvFOutputJSONDef> GlobalEvFOutputModule::globalBeginRun(edm::RunForOutput const& run) const {
283  //create run Cache holding JSON file writer and variables
284  auto jsonDef = std::make_unique<GlobalEvFOutputJSONDef>();
285 
287 
288  //output INI file (non-const). This doesn't require globalBeginRun to be finished
289  const std::string openIniFileName = edm::Service<evf::EvFDaqDirector>()->getOpenInitFilePath(streamLabel_);
290  edm::LogInfo("GlobalEvFOutputModule") << "beginRun init stream -: " << openIniFileName;
291 
292  StreamerOutputFile stream_writer_preamble(openIniFileName);
293  uint32 preamble_adler32 = 1;
294  edm::BranchIDLists const* bidlPtr = branchIDLists();
295 
296  auto psetMapHandle = run.getHandle(psetToken_);
297 
298  std::unique_ptr<InitMsgBuilder> init_message =
299  streamerCommon.serializeRegistry(*streamerCommon.getSerializerBuffer(),
300  *bidlPtr,
305  psetMapHandle.isValid() ? psetMapHandle.product() : nullptr);
306 
307  //Let us turn it into a View
308  InitMsgView view(init_message->startAddress());
309 
310  //output header
311  stream_writer_preamble.write(view);
312  preamble_adler32 = stream_writer_preamble.adler32();
313  stream_writer_preamble.close();
314 
315  struct stat istat;
316  stat(openIniFileName.c_str(), &istat);
317  //read back file to check integrity of what was written
318  off_t readInput = 0;
319  uint32_t adlera = 1, adlerb = 0;
320  FILE* src = fopen(openIniFileName.c_str(), "r");
321 
322  //allocate buffer to write INI file
323  std::unique_ptr<unsigned char[]> outBuf = std::make_unique<unsigned char[]>(1024 * 1024);
324  while (readInput < istat.st_size) {
325  size_t toRead = readInput + 1024 * 1024 < istat.st_size ? 1024 * 1024 : istat.st_size - readInput;
326  fread(outBuf.get(), toRead, 1, src);
327  cms::Adler32(const_cast<const char*>(reinterpret_cast<char*>(outBuf.get())), toRead, adlera, adlerb);
328  readInput += toRead;
329  }
330  fclose(src);
331 
332  //clear serialization buffers
333  streamerCommon.getSerializerBuffer()->clearHeaderBuffer();
334 
335  //free output buffer needed only for the file write
336  outBuf.reset();
337 
338  uint32_t adler32c = (adlerb << 16) | adlera;
339  if (adler32c != preamble_adler32) {
340  throw cms::Exception("GlobalEvFOutputModule") << "Checksum mismatch of ini file -: " << openIniFileName
341  << " expected:" << preamble_adler32 << " obtained:" << adler32c;
342  } else {
343  LogDebug("GlobalEvFOutputModule") << "Ini file checksum -: " << streamLabel_ << " " << adler32c;
344  std::filesystem::rename(openIniFileName, edm::Service<evf::EvFDaqDirector>()->getInitFilePath(streamLabel_));
345  }
346 
347  return jsonDef;
348  }
349 
351  edm::EventForOutput const& e) const {
352  Trig result;
353  e.getByToken<edm::TriggerResults>(token, result);
354  return result;
355  }
356 
357  std::shared_ptr<GlobalEvFOutputEventWriter> GlobalEvFOutputModule::globalBeginLuminosityBlock(
358  edm::LuminosityBlockForOutput const& iLB) const {
359  auto openDatFilePath = edm::Service<evf::EvFDaqDirector>()->getOpenDatFilePath(iLB.luminosityBlock(), streamLabel_);
360 
361  return std::make_shared<GlobalEvFOutputEventWriter>(openDatFilePath);
362  }
363 
365  edm::EventForOutput const& e,
366  edm::WaitingTaskWithArenaHolder iHolder) const {
368 
369  auto streamerCommon = streamCache(id);
370  std::unique_ptr<EventMsgBuilder> msg =
371  streamerCommon->serializeEvent(*streamerCommon->getSerializerBuffer(), e, triggerResults, selectorConfig());
372 
373  auto lumiWriter = luminosityBlockCache(e.getLuminosityBlock().index());
374  const_cast<evf::GlobalEvFOutputEventWriter*>(lumiWriter)
375  ->doOutputEventAsync(std::move(msg), iHolder.makeWaitingTaskHolderAndRelease());
376  }
378 
380  auto lumiWriter = luminosityBlockCache(iLB.index());
381  //close dat file
382  const_cast<evf::GlobalEvFOutputEventWriter*>(lumiWriter)->close();
383 
384  //auto jsonWriter = const_cast<GlobalEvFOutputJSONWriter*>(runCache(iLB.getRun().index()));
385  auto jsonDef = runCache(iLB.getRun().index());
386  GlobalEvFOutputJSONWriter jsonWriter(streamLabel_, jsonDef->outJsonDef_, jsonDef->outJsonDefName_);
387 
388  jsonWriter.fileAdler32_.value() = lumiWriter->get_adler32();
389  jsonWriter.accepted_.value() = lumiWriter->getAccepted();
390 
391  bool abortFlag = false;
392  jsonWriter.processed_.value() = fms_->getEventsProcessedForLumi(iLB.luminosityBlock(), &abortFlag);
393  if (abortFlag) {
394  edm::LogInfo("GlobalEvFOutputModule") << "Abort flag has been set. Output is suppressed";
395  return;
396  }
397 
398  if (jsonWriter.processed_.value() != 0) {
399  struct stat istat;
400  std::filesystem::path openDatFilePath = lumiWriter->getFilePath();
401  stat(openDatFilePath.string().c_str(), &istat);
402  jsonWriter.filesize_ = istat.st_size;
403  std::filesystem::rename(openDatFilePath.string().c_str(),
405  jsonWriter.filelist_ = openDatFilePath.filename().string();
406  } else {
407  //remove empty file when no event processing has occurred
408  remove(lumiWriter->getFilePath().c_str());
409  jsonWriter.filesize_ = 0;
410  jsonWriter.filelist_ = "";
411  jsonWriter.fileAdler32_.value() = -1; //no files in signed long
412  }
413 
414  //produce JSON file
415  jsonWriter.jsonMonitor_->snap(iLB.luminosityBlock());
416  const std::string outputJsonNameStream =
417  edm::Service<evf::EvFDaqDirector>()->getOutputJsonFilePath(iLB.luminosityBlock(), streamLabel_);
418  jsonWriter.jsonMonitor_->outputFullJSON(outputJsonNameStream, iLB.luminosityBlock());
419  }
420 
421 } // namespace evf
422 
423 using namespace evf;
ConfigurationDescriptions.h
evf::GlobalEvFOutputJSONDef::outJsonDef_
jsoncollector::DataPointDefinition outJsonDef_
Definition: GlobalEvFOutputModule.cc:91
edm::StreamerOutputModuleCommon::serializeRegistry
std::unique_ptr< InitMsgBuilder > serializeRegistry(SerializeDataBuffer &sbuf, BranchIDLists const &branchLists, ThinnedAssociationsHelper const &helper, std::string const &processName, std::string const &moduleLabel, ParameterSetID const &toplevel, SendJobHeader::ParameterSetMap const *psetMap)
Definition: StreamerOutputModuleCommon.cc:91
evf::GlobalEvFOutputEventWriter::getFilePath
std::string const & getFilePath() const
Definition: GlobalEvFOutputModule.cc:73
edm::StreamID
Definition: StreamID.h:30
evf::GlobalEvFOutputEventWriter::stream_writer_events_
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_events_
Definition: GlobalEvFOutputModule.cc:83
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
edm::global::OutputModuleBase::branchIDLists
BranchIDLists const * branchIDLists() const
Definition: OutputModuleBase.cc:356
jsoncollector::DataPointDefinition::addLegendItem
void addLegendItem(std::string const &name, std::string const &type, std::string const &operation)
Definition: DataPointDefinition.cc:93
evf::GlobalEvFOutputJSONWriter::filelist_
jsoncollector::StringJ filelist_
Definition: GlobalEvFOutputModule.cc:105
Trig
edm::detail::TriggerResultsBasedEventSelector::handle_t Trig
Definition: GlobalEvFOutputModule.cc:37
evf::GlobalEvFOutputEventWriter::incAccepted
void incAccepted()
Definition: GlobalEvFOutputModule.cc:76
jsoncollector::DataPointDefinition::setDefaultGroup
void setDefaultGroup(std::string const &group)
Definition: DataPointDefinition.h:54
edm::LuminosityBlockForOutput::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockForOutput.h:54
evf::GlobalEvFOutputModule::ps_
edm::ParameterSet const & ps_
Definition: GlobalEvFOutputModule.cc:146
evf::FastMonitoringService::getEventsProcessedForLumi
unsigned int getEventsProcessedForLumi(unsigned int lumi, bool *abortFlag=nullptr)
Definition: FastMonitoringService.cc:726
edm::global::OutputModule
Definition: OutputModule.h:28
StreamerOutputFile::close
void close()
Definition: StreamerOutputFile.h:57
edm::global::OutputModuleBase::description
ModuleDescription const & description() const
Definition: OutputModuleBase.cc:367
edm::LuminosityBlockForOutput::index
LuminosityBlockIndex index() const
Definition: LuminosityBlockForOutput.cc:33
StreamedProducts.h
evf::GlobalEvFOutputEventWriter::close
void close()
Definition: GlobalEvFOutputModule.cc:50
edm::EDGetTokenT< edm::TriggerResults >
LuminosityBlock.h
edm
HLT enums.
Definition: AlignableModifier.h:19
evf::GlobalEvFOutputModule::fms_
evf::FastMonitoringService * fms_
Definition: GlobalEvFOutputModule.cc:151
evf::GlobalEvFOutputModule::acquire
void acquire(edm::StreamID, edm::EventForOutput const &, edm::WaitingTaskWithArenaHolder) const final
Definition: GlobalEvFOutputModule.cc:364
edm::global::OutputModuleBase::selectorConfig
ParameterSetID selectorConfig() const
Definition: OutputModuleBase.h:124
evf::GlobalEvFOutputEventWriter::~GlobalEvFOutputEventWriter
~GlobalEvFOutputEventWriter()
Definition: GlobalEvFOutputModule.cc:48
evf::GlobalEvFOutputModule::write
void write(edm::EventForOutput const &e) final
Definition: GlobalEvFOutputModule.cc:377
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
evf::GlobalEvFOutputJSONDef::outJsonDefName_
std::string outJsonDefName_
Definition: GlobalEvFOutputModule.cc:92
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
triggerResults
static const std::string triggerResults
Definition: EdmProvDump.cc:45
RunForOutput.h
JsonMonitorable.h
evf::GlobalEvFOutputEventWriter::accepted_
std::atomic< unsigned long > accepted_
Definition: GlobalEvFOutputModule.cc:82
edm::LuminosityBlockForOutput::getRun
RunForOutput const & getRun() const
Definition: LuminosityBlockForOutput.h:63
edm::SerialTaskQueue
Definition: SerialTaskQueue.h:67
evf::GlobalEvFOutputModule::GlobalEvFOutputModule
GlobalEvFOutputModule(edm::ParameterSet const &ps)
Definition: GlobalEvFOutputModule.cc:236
mps_check.msg
tuple msg
Definition: mps_check.py:285
evf::GlobalEvFOutputEventWriter::doOutputEventAsync
void doOutputEventAsync(std::unique_ptr< EventMsgBuilder > msg, edm::WaitingTaskHolder iHolder)
Definition: GlobalEvFOutputModule.cc:58
evf::GlobalEvFOutputModule::globalEndLuminosityBlock
void globalEndLuminosityBlock(edm::LuminosityBlockForOutput const &iLB) const final
Definition: GlobalEvFOutputModule.cc:379
edm::SerialTaskQueue::push
void push(tbb::task_group &, const T &iAction)
asynchronously pushes functor iAction into queue
Definition: SerialTaskQueue.h:167
EventForOutput.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
evf::GlobalEvFOutputJSONWriter::errorEvents_
jsoncollector::IntJ errorEvents_
Definition: GlobalEvFOutputModule.cc:103
evf::GlobalEvFOutputJSONWriter::transferDestination_
jsoncollector::StringJ transferDestination_
Definition: GlobalEvFOutputModule.cc:109
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::Handle< edm::TriggerResults >
edm::RunForOutput::index
RunIndex index() const
Definition: RunForOutput.cc:32
evf::GlobalEvFOutputModule::~GlobalEvFOutputModule
~GlobalEvFOutputModule() override
Definition: GlobalEvFOutputModule.cc:267
edm::InRun
Definition: BranchType.h:11
StreamerOutputFile.h
jsoncollector::DataPointDefinition::MERGE
static const std::string MERGE
Definition: DataPointDefinition.h:70
evf::GlobalEvFOutputModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: GlobalEvFOutputModule.cc:269
FileIO.h
EventMsgView
Definition: EventMessage.h:72
evf::GlobalEvFOutputEventWriter::writeQueue_
edm::SerialTaskQueue writeQueue_
Definition: GlobalEvFOutputModule.cc:84
uint32
unsigned int uint32
Definition: MsgTools.h:13
EventMsgBuilder
Definition: EventMsgBuilder.h:8
jsoncollector::DataPointDefinition::SUM
static const std::string SUM
Definition: DataPointDefinition.h:65
edm::LuminosityBlockForOutput
Definition: LuminosityBlockForOutput.h:40
evf::GlobalEvFOutputJSONWriter::jsonMonitor_
std::shared_ptr< jsoncollector::FastMonitor > jsonMonitor_
Definition: GlobalEvFOutputModule.cc:112
edm::ParameterSetMap
std::map< ParameterSetID, ParameterSetBlob > ParameterSetMap
Definition: ParameterSetConverter.h:39
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
evf::FastMonitoringService
Definition: FastMonitoringService.h:155
edm::RunForOutput
Definition: RunForOutput.h:40
jsoncollector::JsonMonitorable::setName
virtual void setName(std::string name)
Definition: JsonMonitorable.h:38
edm::WaitingTaskWithArenaHolder
Definition: WaitingTaskWithArenaHolder.h:34
MakerMacros.h
edm::propagate_const
Definition: propagate_const.h:32
edm::Hash::isValid
bool isValid() const
Definition: Hash.h:141
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
SerialTaskQueue.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
InitMsgBuilder.h
evf::GlobalEvFOutputJSONWriter::retCodeMask_
jsoncollector::IntJ retCodeMask_
Definition: GlobalEvFOutputModule.cc:104
EventMsgBuilder.h
edm::LuminosityBlockCache
Definition: moduleAbilities.h:59
cms::Adler32
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
Definition: Adler32Calculator.cc:10
Service.h
StreamerOutputFile::write
void write(const InitMsgBuilder &)
Definition: StreamerOutputFile.cc:52
evf::GlobalEvFOutputJSONDef::GlobalEvFOutputJSONDef
GlobalEvFOutputJSONDef()
Definition: GlobalEvFOutputModule.cc:155
edm::global::OutputModuleBase::moduleDescription
const ModuleDescription & moduleDescription() const
Definition: OutputModuleBase.h:110
StreamerOutputFile
Definition: StreamerOutputFile.h:23
jsoncollector::DataPointDefinition::CAT
static const std::string CAT
Definition: DataPointDefinition.h:69
dt4ml_dqm_sourceclient-live_cfg.filePath
filePath
CUSTOMIZE FOR ML.
Definition: dt4ml_dqm_sourceclient-live_cfg.py:45
edm::InEvent
Definition: BranchType.h:11
evf::GlobalEvFOutputEventWriter::get_adler32
uint32 get_adler32() const
Definition: GlobalEvFOutputModule.cc:71
SerializeDataBuffer::clearHeaderBuffer
void clearHeaderBuffer()
Definition: StreamSerializer.h:47
evf::GlobalEvFOutputJSONWriter::GlobalEvFOutputJSONWriter
GlobalEvFOutputJSONWriter(std::string const &streamLabel, jsoncollector::DataPointDefinition const &, std::string const &outJsonDefName)
Definition: GlobalEvFOutputModule.cc:193
EDGetToken.h
evf::MergeTypeDAT
Definition: EvFDaqDirector.h:58
edm::BranchIDLists
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
evf::GlobalEvFOutputModule::writeLuminosityBlock
void writeLuminosityBlock(edm::LuminosityBlockForOutput const &) final
Definition: GlobalEvFOutputModule.cc:136
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
evf::GlobalEvFOutputJSONWriter::filesize_
jsoncollector::IntJ filesize_
Definition: GlobalEvFOutputModule.cc:106
evf::GlobalEvFOutputModule
Definition: GlobalEvFOutputModule.cc:121
OutputModuleBase
evf::GlobalEvFOutputEventWriter::getAccepted
unsigned long getAccepted() const
Definition: GlobalEvFOutputModule.cc:75
jsoncollector::DataPointDefinition::BINARYOR
static const std::string BINARYOR
Definition: DataPointDefinition.h:71
Skims_PA_cff.content
content
Definition: Skims_PA_cff.py:19
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
evf::GlobalEvFOutputModule::streamLabel_
std::string streamLabel_
Definition: GlobalEvFOutputModule.cc:147
evf::GlobalEvFOutputJSONWriter::accepted_
jsoncollector::IntJ accepted_
Definition: GlobalEvFOutputModule.cc:102
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:32
to_lower
std::string to_lower(const std::string &s)
Definition: CredentialStore.h:23
edm::ExternalWork
Definition: moduleAbilities.h:116
OutputModule.h
edm::Service
Definition: Service.h:30
jsoncollector::DataPointDefinition::SAME
static const std::string SAME
Definition: DataPointDefinition.h:67
EvFDaqDirector.h
FastMonitoringService.h
jsoncollector::FileIO::writeStringToFile
static void writeStringToFile(std::string const &filename, std::string &content)
Definition: FileIO.cc:21
StreamerOutputModuleCommon.h
JSONSerializer.h
evf::GlobalEvFOutputJSONWriter::hltErrorEvents_
jsoncollector::IntJ hltErrorEvents_
Definition: GlobalEvFOutputModule.cc:111
evf::GlobalEvFOutputJSONWriter::mergeType_
jsoncollector::StringJ mergeType_
Definition: GlobalEvFOutputModule.cc:110
jsoncollector::FastMonitor
Definition: FastMonitor.h:19
edm::StreamerOutputModuleCommon::getSerializerBuffer
SerializeDataBuffer * getSerializerBuffer()
Definition: StreamerOutputModuleCommon.cc:283
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
evf::GlobalEvFOutputJSONWriter::fileAdler32_
jsoncollector::IntJ fileAdler32_
Definition: GlobalEvFOutputModule.cc:108
evf::GlobalEvFOutputEventWriter::filePath_
std::string filePath_
Definition: GlobalEvFOutputModule.cc:81
edm::StreamCache
Definition: moduleAbilities.h:42
jsoncollector::DataPointDefinition
Definition: DataPointDefinition.h:20
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
edm::EventForOutput
Definition: EventForOutput.h:50
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
evf::GlobalEvFOutputModule::beginStream
std::unique_ptr< edm::StreamerOutputModuleCommon > beginStream(edm::StreamID) const final
Definition: GlobalEvFOutputModule.cc:278
evf::GlobalEvFOutputJSONWriter::inputFiles_
jsoncollector::StringJ inputFiles_
Definition: GlobalEvFOutputModule.cc:107
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
evf::GlobalEvFOutputModuleType
edm::global::OutputModule< edm::RunCache< GlobalEvFOutputJSONDef >, edm::LuminosityBlockCache< evf::GlobalEvFOutputEventWriter >, edm::StreamCache< edm::StreamerOutputModuleCommon >, edm::ExternalWork > GlobalEvFOutputModuleType
Definition: GlobalEvFOutputModule.cc:119
evf::GlobalEvFOutputModule::writeRun
void writeRun(edm::RunForOutput const &) final
Definition: GlobalEvFOutputModule.cc:137
edm::ModuleDescription::mainParameterSetID
ParameterSetID const & mainParameterSetID() const
Definition: ModuleDescription.cc:53
jsoncollector::DataPointDefinition::ADLER32
static const std::string ADLER32
Definition: DataPointDefinition.h:72
evf::GlobalEvFOutputModule::globalEndRun
void globalEndRun(edm::RunForOutput const &) const final
Definition: GlobalEvFOutputModule.cc:138
Exception
Definition: hltDiff.cc:245
MatrixUtil.remove
def remove(d, key, TELL=False)
Definition: MatrixUtil.py:219
evf
Definition: fillJson.h:27
edm::global::OutputModuleBase::fillDescription
static void fillDescription(ParameterSetDescription &desc)
Definition: OutputModuleBase.cc:377
Adler32Calculator.h
edm::WaitingTaskWithArenaHolder::makeWaitingTaskHolderAndRelease
WaitingTaskHolder makeWaitingTaskHolderAndRelease()
Definition: WaitingTaskWithArenaHolder.cc:103
evf::GlobalEvFOutputJSONWriter
Definition: GlobalEvFOutputModule.cc:95
evf::GlobalEvFOutputModule::globalBeginRun
std::shared_ptr< GlobalEvFOutputJSONDef > globalBeginRun(edm::RunForOutput const &run) const final
Definition: GlobalEvFOutputModule.cc:282
evf::GlobalEvFOutputJSONWriter::processed_
jsoncollector::IntJ processed_
Definition: GlobalEvFOutputModule.cc:101
jsoncollector::IntJ
Definition: JsonMonitorable.h:66
jsoncollector::JSONSerializer::serialize
static bool serialize(JsonSerializable *pObj, std::string &output)
Definition: JSONSerializer.cc:14
StreamerOutputFile::adler32
uint32 adler32() const
Definition: StreamerOutputFile.h:55
mps_fire.result
result
Definition: mps_fire.py:311
evf::GlobalEvFOutputModule::trToken_
edm::EDGetTokenT< edm::TriggerResults > trToken_
Definition: GlobalEvFOutputModule.cc:148
evf::GlobalEvFOutputModule::getTriggerResults
Trig getTriggerResults(edm::EDGetTokenT< edm::TriggerResults > const &token, edm::EventForOutput const &e) const
Definition: GlobalEvFOutputModule.cc:350
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
edm::StreamerOutputModuleCommon::fillDescription
static void fillDescription(ParameterSetDescription &desc)
Definition: StreamerOutputModuleCommon.cc:270
LuminosityBlockForOutput.h
edm::global::OutputModuleBase::keptProducts
SelectedProductsForBranchType const & keptProducts() const
Definition: OutputModuleBase.h:94
evf::GlobalEvFOutputJSONDef
Definition: GlobalEvFOutputModule.cc:87
evf::GlobalEvFOutputEventWriter::GlobalEvFOutputEventWriter
GlobalEvFOutputEventWriter(std::string const &filePath)
Definition: GlobalEvFOutputModule.cc:45
edm_modernize_messagelogger.stat
stat
Definition: edm_modernize_messagelogger.py:27
evf::GlobalEvFOutputEventWriter::doOutputEvent
void doOutputEvent(EventMsgBuilder const &msg)
Definition: GlobalEvFOutputModule.cc:52
edm::StreamerOutputModuleCommon
Definition: StreamerOutputModuleCommon.h:21
evf::GlobalEvFOutputEventWriter
Definition: GlobalEvFOutputModule.cc:43
HLTObjectsMonitor_cfi.TriggerResults
TriggerResults
Definition: HLTObjectsMonitor_cfi.py:9
evf::GlobalEvFOutputModule::globalBeginLuminosityBlock
std::shared_ptr< GlobalEvFOutputEventWriter > globalBeginLuminosityBlock(edm::LuminosityBlockForOutput const &iLB) const final
Definition: GlobalEvFOutputModule.cc:357
edm::global::OutputModuleBase::thinnedAssociationsHelper
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
Definition: OutputModuleBase.cc:363
jsoncollector::StringJ
Definition: JsonMonitorable.h:142
edm::InputTag
Definition: InputTag.h:15
evf::GlobalEvFOutputModule::psetToken_
edm::EDGetTokenT< edm::SendJobHeader::ParameterSetMap > psetToken_
Definition: GlobalEvFOutputModule.cc:149
edm::TriggerResults
Definition: TriggerResults.h:35
beamhlt_dqm_sourceclient-live_cfg.streamLabel
streamLabel
Definition: beamhlt_dqm_sourceclient-live_cfg.py:58
edm::WaitingTaskHolder::group
tbb::task_group * group() const noexcept
Definition: WaitingTaskHolder.h:77
FastMonitor.h
InitMsgView
Definition: InitMessage.h:61
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
watchdog.group
group
Definition: watchdog.py:82
evf::GlobalEvFOutputEventWriter::queue
edm::SerialTaskQueue & queue()
Definition: GlobalEvFOutputModule.cc:78
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316