CMS 3D CMS Logo

EvFOutputModule.h
Go to the documentation of this file.
1 #ifndef EventFilter_Utilities_EvFOutputModule_h
2 #define EventFilter_Utilities_EvFOutputModule_h
3 
9 
12 #
14 
15 namespace evf {
16 
18  // class EvFOutputEventWriter;
19 
21  public:
24 
26 
27  void close() { stream_writer_events_->close(); }
28 
30  EventMsgView eview(msg.startAddress());
31  stream_writer_events_->write(eview);
32  }
33 
34  uint32 get_adler32() const { return stream_writer_events_->adler32(); }
35 
36  std::string const& getFilePath() const { return filePath_; }
37 
38  unsigned long getAccepted() const { return accepted_; }
39  void incAccepted() { accepted_++; }
40 
41  private:
43  unsigned long accepted_;
45  };
46 
48  public:
51  std::string const& streamLabel);
52 
54 
66  std::shared_ptr<jsoncollector::FastMonitor> jsonMonitor_;
68  };
69 
72 
74  public:
75  explicit EvFOutputModule(edm::ParameterSet const& ps);
76  ~EvFOutputModule() override;
77  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
78 
79  private:
80  void beginRun(edm::RunForOutput const& run) override;
81  void write(edm::EventForOutput const& e) override;
82 
83  //pure in parent class but unused here
85  void writeRun(edm::RunForOutput const&) override {}
86  void endRun(edm::RunForOutput const&) override {}
87 
88  std::shared_ptr<EvFOutputEventWriter> globalBeginLuminosityBlock(
89  edm::LuminosityBlockForOutput const& iLB) const override;
91 
93 
98 
100 
101  std::unique_ptr<evf::EvFOutputJSONWriter> jsonWriter_;
102 
103  }; //end-of-class-def
104 
105 } // namespace evf
106 
107 #endif
edm::one::OutputModule
Definition: OutputModule.h:30
evf::EvFOutputModule::~EvFOutputModule
~EvFOutputModule() override
Definition: EvFOutputModule.cc:137
evf::EvFOutputEventWriter
Definition: EvFOutputModule.h:20
evf::EvFOutputModule::globalEndLuminosityBlock
void globalEndLuminosityBlock(edm::LuminosityBlockForOutput const &iLB) override
Definition: EvFOutputModule.cc:238
evf::EvFOutputModule::trToken_
edm::EDGetTokenT< edm::TriggerResults > trToken_
Definition: EvFOutputModule.h:96
evf::EvFOutputJSONWriter::filesize_
jsoncollector::IntJ filesize_
Definition: EvFOutputModule.h:60
OutputModule.h
evf::EvFOutputModule::writeRun
void writeRun(edm::RunForOutput const &) override
Definition: EvFOutputModule.h:85
evf::EvFOutputEventWriter::getFilePath
std::string const & getFilePath() const
Definition: EvFOutputModule.h:36
StreamedProducts.h
edm::EDGetTokenT< edm::TriggerResults >
evf::EvFOutputEventWriter::get_adler32
uint32 get_adler32() const
Definition: EvFOutputModule.h:34
evf::EvFOutputEventWriter::accepted_
unsigned long accepted_
Definition: EvFOutputModule.h:43
evf::EvFOutputEventWriter::filePath_
std::string filePath_
Definition: EvFOutputModule.h:42
evf::EvFOutputEventWriter::EvFOutputEventWriter
EvFOutputEventWriter(std::string const &filePath)
Definition: EvFOutputModule.h:22
JsonMonitorable.h
evf::EvFOutputJSONWriter::streamerCommon_
edm::StreamerOutputModuleCommon streamerCommon_
Definition: EvFOutputModule.h:53
mps_check.msg
tuple msg
Definition: mps_check.py:285
Trig
edm::detail::TriggerResultsBasedEventSelector::handle_t Trig
Definition: EvFOutputModule.h:13
edm::Handle< edm::TriggerResults >
StreamerOutputFile.h
evf::EvFOutputModule::endRun
void endRun(edm::RunForOutput const &) override
Definition: EvFOutputModule.h:86
EventMsgView
Definition: EventMessage.h:72
evf::EvFOutputJSONWriter::errorEvents_
jsoncollector::IntJ errorEvents_
Definition: EvFOutputModule.h:57
uint32
unsigned int uint32
Definition: MsgTools.h:13
EventMsgBuilder
Definition: EventMsgBuilder.h:8
edm::SelectedProducts
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
Definition: SelectedProducts.h:11
edm::LuminosityBlockForOutput
Definition: LuminosityBlockForOutput.h:40
evf::EvFOutputJSONWriter::mergeType_
jsoncollector::StringJ mergeType_
Definition: EvFOutputModule.h:64
evf::EvFOutputJSONWriter::transferDestination_
jsoncollector::StringJ transferDestination_
Definition: EvFOutputModule.h:63
evf::EvFOutputEventWriter::doOutputEvent
void doOutputEvent(EventMsgBuilder const &msg)
Definition: EvFOutputModule.h:29
evf::FastMonitoringService
Definition: FastMonitoringService.h:155
edm::RunForOutput
Definition: RunForOutput.h:40
edm::propagate_const
Definition: propagate_const.h:32
evf::EvFOutputEventWriter::getAccepted
unsigned long getAccepted() const
Definition: EvFOutputModule.h:38
evf::EvFOutputModule::writeLuminosityBlock
void writeLuminosityBlock(edm::LuminosityBlockForOutput const &) override
Definition: EvFOutputModule.h:84
evf::EvFOutputJSONWriter::jsonMonitor_
std::shared_ptr< jsoncollector::FastMonitor > jsonMonitor_
Definition: EvFOutputModule.h:66
StreamerOutputFile
Definition: StreamerOutputFile.h:23
evf::EvFOutputJSONWriter
Definition: EvFOutputModule.h:47
dt4ml_dqm_sourceclient-live_cfg.filePath
filePath
CUSTOMIZE FOR ML.
Definition: dt4ml_dqm_sourceclient-live_cfg.py:45
evf::EvFOutputEventWriter::incAccepted
void incAccepted()
Definition: EvFOutputModule.h:39
evf::EvFOutputModule::psetToken_
edm::EDGetTokenT< edm::SendJobHeader::ParameterSetMap > psetToken_
Definition: EvFOutputModule.h:97
EDGetToken.h
evf::EvFOutputEventWriter::close
void close()
Definition: EvFOutputModule.h:27
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
evf::EvFOutputModule::globalBeginLuminosityBlock
std::shared_ptr< EvFOutputEventWriter > globalBeginLuminosityBlock(edm::LuminosityBlockForOutput const &iLB) const override
Definition: EvFOutputModule.cc:220
evf::EvFOutputModule::jsonWriter_
std::unique_ptr< evf::EvFOutputJSONWriter > jsonWriter_
Definition: EvFOutputModule.h:101
evf::EvFOutputJSONWriter::fileAdler32_
jsoncollector::IntJ fileAdler32_
Definition: EvFOutputModule.h:62
edm::ParameterSet
Definition: ParameterSet.h:47
evf::EvFOutputJSONWriter::inputFiles_
jsoncollector::StringJ inputFiles_
Definition: EvFOutputModule.h:61
evf::EvFOutputJSONWriter::outJsonDef_
jsoncollector::DataPointDefinition outJsonDef_
Definition: EvFOutputModule.h:67
evf::EvFOutputJSONWriter::accepted_
jsoncollector::IntJ accepted_
Definition: EvFOutputModule.h:56
evf::EvFOutputModule::EvFOutputModule
EvFOutputModule(edm::ParameterSet const &ps)
Definition: EvFOutputModule.cc:107
StreamerOutputModuleCommon.h
evf::EvFOutputJSONWriter::hltErrorEvents_
jsoncollector::IntJ hltErrorEvents_
Definition: EvFOutputModule.h:65
evf::EvFOutputModule::fms_
evf::FastMonitoringService * fms_
Definition: EvFOutputModule.h:99
evf::EvFOutputModule::ps_
edm::ParameterSet const & ps_
Definition: EvFOutputModule.h:94
evf::EvFOutputEventWriter::stream_writer_events_
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_events_
Definition: EvFOutputModule.h:44
evf::EvFOutputJSONWriter::EvFOutputJSONWriter
EvFOutputJSONWriter(edm::ParameterSet const &ps, edm::SelectedProducts const *selections, std::string const &streamLabel)
Definition: EvFOutputModule.cc:26
evf::EvFOutputModule
Definition: EvFOutputModule.h:73
evf::EvFOutputJSONWriter::processed_
jsoncollector::IntJ processed_
Definition: EvFOutputModule.h:55
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
jsoncollector::DataPointDefinition
Definition: DataPointDefinition.h:20
evf::EvFOutputJSONWriter::retCodeMask_
jsoncollector::IntJ retCodeMask_
Definition: EvFOutputModule.h:58
evf::EvFOutputJSONWriter::filelist_
jsoncollector::StringJ filelist_
Definition: EvFOutputModule.h:59
edm::EventForOutput
Definition: EventForOutput.h:50
evf::EvFOutputModule::getTriggerResults
Trig getTriggerResults(edm::EDGetTokenT< edm::TriggerResults > const &token, edm::EventForOutput const &e) const
Definition: EvFOutputModule.cc:213
writedatasetfile.run
run
Definition: writedatasetfile.py:27
evf::EvFOutputModule::beginRun
void beginRun(edm::RunForOutput const &run) override
Definition: EvFOutputModule.cc:148
evf::EvFOutputModule::streamLabel_
std::string streamLabel_
Definition: EvFOutputModule.h:95
evf::EvFOutputEventWriter::~EvFOutputEventWriter
~EvFOutputEventWriter()
Definition: EvFOutputModule.h:25
evf
Definition: fillJson.h:27
clusterbigeventsdebugger_cfi.selections
selections
Definition: clusterbigeventsdebugger_cfi.py:10
jsoncollector::IntJ
Definition: JsonMonitorable.h:66
SiStripCommissioningSource_FromEDM_cfg.FastMonitoringService
FastMonitoringService
Definition: SiStripCommissioningSource_FromEDM_cfg.py:49
edm::StreamerOutputModuleCommon
Definition: StreamerOutputModuleCommon.h:21
evf::EvFOutputModuleType
edm::one::OutputModule< edm::one::WatchRuns, edm::LuminosityBlockCache< evf::EvFOutputEventWriter > > EvFOutputModuleType
Definition: EvFOutputModule.h:71
jsoncollector::StringJ
Definition: JsonMonitorable.h:142
beamhlt_dqm_sourceclient-live_cfg.streamLabel
streamLabel
Definition: beamhlt_dqm_sourceclient-live_cfg.py:58
evf::EvFOutputModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: EvFOutputModule.cc:139
FastMonitor.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
evf::EvFOutputModule::write
void write(edm::EventForOutput const &e) override
Definition: EvFOutputModule.cc:227
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316