Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:19

0001 #ifndef IOPool_Streamer_StreamerOutputModuleBase_h
0002 #define IOPool_Streamer_StreamerOutputModuleBase_h
0003 
0004 #include "IOPool/Streamer/interface/StreamerOutputModuleCommon.h"
0005 #include "FWCore/Framework/interface/one/OutputModule.h"
0006 #include "FWCore/Utilities/interface/EDGetToken.h"
0007 #include "IOPool/Streamer/interface/MsgTools.h"
0008 #include "DataFormats/Streamer/interface/StreamedProducts.h"
0009 //#include "IOPool/Streamer/interface/StreamSerializer.h"
0010 //#include <memory>
0011 //#include <vector>
0012 
0013 class InitMsgBuilder;
0014 class EventMsgBuilder;
0015 namespace edm {
0016   class ParameterSetDescription;
0017 
0018   typedef detail::TriggerResultsBasedEventSelector::handle_t Trig;
0019 
0020   class StreamerOutputModuleBase : public one::OutputModule<one::WatchRuns, one::WatchLuminosityBlocks>,
0021                                    StreamerOutputModuleCommon {
0022   public:
0023     explicit StreamerOutputModuleBase(ParameterSet const& ps);
0024     ~StreamerOutputModuleBase() override;
0025     static void fillDescription(ParameterSetDescription& desc);
0026 
0027   private:
0028     void beginRun(RunForOutput const&) override;
0029     void endRun(RunForOutput const&) override;
0030     void beginJob() override;
0031     void endJob() override;
0032     void writeRun(RunForOutput const&) override;
0033     void writeLuminosityBlock(LuminosityBlockForOutput const&) override;
0034     void write(EventForOutput const& e) override;
0035 
0036     virtual void start() = 0;
0037     virtual void stop() = 0;
0038     virtual void doOutputHeader(InitMsgBuilder const& init_message) = 0;
0039     virtual void doOutputEvent(EventMsgBuilder const& msg) = 0;
0040 
0041     Trig getTriggerResults(EDGetTokenT<TriggerResults> const& token, EventForOutput const& e) const;
0042 
0043   private:
0044     edm::EDGetTokenT<edm::TriggerResults> trToken_;
0045     edm::EDGetTokenT<SendJobHeader::ParameterSetMap> psetToken_;
0046 
0047   };  //end-of-class-def
0048 
0049 }  // namespace edm
0050 
0051 #endif