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  std::string const& moduleLabel);
53 
55 
67  std::shared_ptr<jsoncollector::FastMonitor> jsonMonitor_;
69  };
70 
73 
75  public:
76  explicit EvFOutputModule(edm::ParameterSet const& ps);
77  ~EvFOutputModule() override;
78  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
79 
80  private:
81  void beginRun(edm::RunForOutput const& run) override;
82  void write(edm::EventForOutput const& e) override;
83 
84  //pure in parent class but unused here
86  void writeRun(edm::RunForOutput const&) override {}
87  void endRun(edm::RunForOutput const&) override {}
88 
89  std::shared_ptr<EvFOutputEventWriter> globalBeginLuminosityBlock(
90  edm::LuminosityBlockForOutput const& iLB) const override;
92 
94 
99 
101 
102  std::unique_ptr<evf::EvFOutputJSONWriter> jsonWriter_;
103 
104  }; //end-of-class-def
105 
106 } // namespace evf
107 
108 #endif
void writeLuminosityBlock(edm::LuminosityBlockForOutput const &) override
Definition: fillJson.h:27
EvFOutputModule(edm::ParameterSet const &ps)
edm::StreamerOutputModuleCommon streamerCommon_
std::unique_ptr< evf::EvFOutputJSONWriter > jsonWriter_
jsoncollector::IntJ fileAdler32_
std::shared_ptr< EvFOutputEventWriter > globalBeginLuminosityBlock(edm::LuminosityBlockForOutput const &iLB) const override
unsigned long getAccepted() const
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_events_
jsoncollector::DataPointDefinition outJsonDef_
jsoncollector::IntJ hltErrorEvents_
Trig getTriggerResults(edm::EDGetTokenT< edm::TriggerResults > const &token, edm::EventForOutput const &e) const
jsoncollector::StringJ inputFiles_
void beginRun(edm::RunForOutput const &run) override
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
EvFOutputEventWriter(std::string const &filePath)
jsoncollector::IntJ retCodeMask_
std::string streamLabel_
std::string const & getFilePath() const
void globalEndLuminosityBlock(edm::LuminosityBlockForOutput const &iLB) override
edm::one::OutputModule< edm::one::WatchRuns, edm::LuminosityBlockCache< evf::EvFOutputEventWriter > > EvFOutputModuleType
unsigned int uint32
Definition: MsgTools.h:13
jsoncollector::IntJ processed_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void write(edm::EventForOutput const &e) override
void writeRun(edm::RunForOutput const &) override
edm::EDGetTokenT< edm::TriggerResults > trToken_
edm::StreamerOutputModuleCommon::Parameters commonParameters_
EvFOutputJSONWriter(edm::StreamerOutputModuleCommon::Parameters const &commonParameters, edm::SelectedProducts const *selections, std::string const &streamLabel, std::string const &moduleLabel)
void endRun(edm::RunForOutput const &) override
tuple msg
Definition: mps_check.py:286
jsoncollector::IntJ filesize_
jsoncollector::StringJ filelist_
jsoncollector::StringJ transferDestination_
edm::EDGetTokenT< edm::SendJobHeader::ParameterSetMap > psetToken_
std::shared_ptr< jsoncollector::FastMonitor > jsonMonitor_
void doOutputEvent(EventMsgBuilder const &msg)
jsoncollector::IntJ accepted_
edm::detail::TriggerResultsBasedEventSelector::handle_t Trig
jsoncollector::StringJ mergeType_
jsoncollector::IntJ errorEvents_
evf::FastMonitoringService * fms_