CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EvFOutputModule.h
Go to the documentation of this file.
1 #ifndef EventFilter_Utilities_EvFOutputModule_h
2 #define EventFilter_Utilities_EvFOutputModule_h
3 
8 
11 #
13 
14 namespace evf {
15 
17  // class EvFOutputEventWriter;
18 
20  public:
22  : filePath_(filePath), accepted_(0), stream_writer_events_(new StreamerOutputFile(filePath)) {}
23 
25 
26  void close() { stream_writer_events_->close(); }
27 
29  EventMsgView eview(msg.startAddress());
30  stream_writer_events_->write(eview);
31  }
32 
33  uint32 get_adler32() const { return stream_writer_events_->adler32(); }
34 
35  std::string const& getFilePath() const { return filePath_; }
36 
37  unsigned long getAccepted() const { return accepted_; }
38  void incAccepted() { accepted_++; }
39 
40  private:
42  unsigned long accepted_;
44  };
45 
47  public:
50  std::string const& streamLabel);
51 
53 
65  std::shared_ptr<jsoncollector::FastMonitor> jsonMonitor_;
67  };
68 
71 
73  public:
74  explicit EvFOutputModule(edm::ParameterSet const& ps);
75  ~EvFOutputModule() override;
76  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
77 
78  private:
79  void beginRun(edm::RunForOutput const& run) override;
80  void write(edm::EventForOutput const& e) override;
81 
82  //pure in parent class but unused here
84  void writeRun(edm::RunForOutput const&) override {}
85  void endRun(edm::RunForOutput const&) override {}
86 
87  std::shared_ptr<EvFOutputEventWriter> globalBeginLuminosityBlock(
88  edm::LuminosityBlockForOutput const& iLB) const override;
89  void globalEndLuminosityBlock(edm::LuminosityBlockForOutput const& iLB) override;
90 
92 
96 
98 
99  std::unique_ptr<evf::EvFOutputJSONWriter> jsonWriter_;
100 
101  }; //end-of-class-def
102 
103 } // namespace evf
104 
105 #endif
void writeLuminosityBlock(edm::LuminosityBlockForOutput const &) override
Definition: fillJson.h:27
edm::StreamerOutputModuleCommon streamerCommon_
std::unique_ptr< evf::EvFOutputJSONWriter > jsonWriter_
edm::ParameterSet const & ps_
jsoncollector::IntJ fileAdler32_
unsigned long getAccepted() const
std::string const & getFilePath() const
uint8 * startAddress() const
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_events_
jsoncollector::DataPointDefinition outJsonDef_
jsoncollector::IntJ hltErrorEvents_
jsoncollector::StringJ inputFiles_
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
EvFOutputEventWriter(std::string const &filePath)
jsoncollector::IntJ retCodeMask_
std::string streamLabel_
edm::one::OutputModule< edm::one::WatchRuns, edm::LuminosityBlockCache< evf::EvFOutputEventWriter > > EvFOutputModuleType
unsigned int uint32
Definition: MsgTools.h:13
jsoncollector::IntJ processed_
void writeRun(edm::RunForOutput const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< bool > getTriggerResults(const std::vector< unsigned int > &triggers, const edm::TriggerResults &triggerResults)
Definition: L1TCommon.cc:34
edm::EDGetTokenT< edm::TriggerResults > trToken_
void endRun(edm::RunForOutput const &) override
tuple msg
Definition: mps_check.py:285
jsoncollector::IntJ filesize_
jsoncollector::StringJ filelist_
jsoncollector::StringJ transferDestination_
std::shared_ptr< jsoncollector::FastMonitor > jsonMonitor_
void doOutputEvent(EventMsgBuilder const &msg)
uint32 get_adler32() const
jsoncollector::IntJ accepted_
edm::detail::TriggerResultsBasedEventSelector::handle_t Trig
jsoncollector::StringJ mergeType_
jsoncollector::IntJ errorEvents_
evf::FastMonitoringService * fms_