Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef IOPool_Streamer_StreamerFileWriter_h
0002 #define IOPool_Streamer_StreamerFileWriter_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 
0006 #include "IOPool/Streamer/interface/StreamerOutputFile.h"
0007 #include "IOPool/Streamer/interface/InitMsgBuilder.h"
0008 #include "IOPool/Streamer/interface/EventMsgBuilder.h"
0009 #include "FWCore/Utilities/interface/propagate_const.h"
0010 #include "IOPool/Streamer/interface/InitMessage.h"
0011 #include "IOPool/Streamer/interface/EventMessage.h"
0012 #include "IOPool/Streamer/interface/MsgTools.h"
0013 
0014 #include <iostream>
0015 #include <vector>
0016 #include <memory>
0017 #include <string>
0018 
0019 namespace edm {
0020   class ParameterSetDescription;
0021   class StreamerFileWriter {
0022   public:
0023     explicit StreamerFileWriter(edm::ParameterSet const& ps);
0024     explicit StreamerFileWriter(std::string const& fileName);
0025     ~StreamerFileWriter();
0026 
0027     static void fillDescription(ParameterSetDescription& desc);
0028 
0029     void doOutputHeader(InitMsgBuilder const& init_message);
0030     void doOutputHeader(InitMsgView const& init_message);
0031 
0032     void doOutputEvent(EventMsgBuilder const& msg);
0033     void doOutputEvent(EventMsgView const& msg);
0034 
0035     void start() {}
0036     void stop(){};
0037 
0038     uint32 get_adler32() const { return stream_writer_->adler32(); }
0039 
0040   private:
0041     edm::propagate_const<std::unique_ptr<StreamerOutputFile>> stream_writer_;
0042   };
0043 }  // namespace edm
0044 #endif