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 
8 
11 #
13 
14 namespace evf {
15 
16  class FastMonitoringService;
17 // class EvFOutputEventWriter;
18 
20  {
21  public:
22 
23  explicit EvFOutputEventWriter(std::string const& filePath):
24  filePath_(filePath),
25  accepted_(0),
27  {
28  }
29 
31  }
32 
33  void close() {
34  stream_writer_events_->close();
35  }
36 
38  EventMsgView eview(msg.startAddress());
39  stream_writer_events_->write(eview);
40  }
41 
42  uint32 get_adler32() const {
43  return stream_writer_events_->adler32();
44  }
45 
46  std::string const& getFilePath() const {return filePath_;}
47 
48  unsigned long getAccepted() const {return accepted_;}
49  void incAccepted() {accepted_++;}
50 
51  private:
53  unsigned long accepted_;
55 
56  };
57 
58 
60  public:
62 
64 
76  std::shared_ptr<jsoncollector::FastMonitor> jsonMonitor_;
78  };
79 
80 
82 
83  class EvFOutputModule :
84  public EvFOutputModuleType
85  {
86  public:
87  explicit EvFOutputModule(edm::ParameterSet const& ps);
88  ~EvFOutputModule() override;
89  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
90 
91  private:
92  void beginRun(edm::RunForOutput const& run) override;
93  void write(edm::EventForOutput const& e) override;
94 
95  //pure in parent class but unused here
97  void writeRun(edm::RunForOutput const&) override {}
98  void endRun(edm::RunForOutput const&) override {}
99 
100  std::shared_ptr<EvFOutputEventWriter> globalBeginLuminosityBlock(edm::LuminosityBlockForOutput const& iLB) const override;
101  void globalEndLuminosityBlock(edm::LuminosityBlockForOutput const& iLB) override;
102 
104 
108 
110 
111  std::unique_ptr<evf::EvFOutputJSONWriter> jsonWriter_;
112 
113 
114  }; //end-of-class-def
115 
116 } // end of namespace-evf
117 
118 #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_
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:35
edm::EDGetTokenT< edm::TriggerResults > trToken_
void endRun(edm::RunForOutput const &) override
tuple msg
Definition: mps_check.py:279
jsoncollector::IntJ filesize_
jsoncollector::StringJ filelist_
jsoncollector::StringJ transferDestination_
std::shared_ptr< jsoncollector::FastMonitor > jsonMonitor_
void doOutputEvent(EventMsgBuilder const &msg)
uint32 get_adler32() const
def write(self, setup)
edm::one::OutputModule< edm::one::WatchRuns, edm::LuminosityBlockCache< evf::EvFOutputEventWriter > > EvFOutputModuleType
jsoncollector::IntJ accepted_
edm::detail::TriggerResultsBasedEventSelector::handle_t Trig
jsoncollector::StringJ mergeType_
jsoncollector::IntJ errorEvents_
evf::FastMonitoringService * fms_