CMS 3D CMS Logo

StreamerFileIO.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamerFileIO_h
2 #define IOPool_Streamer_StreamerFileIO_h
3 
11 #include <memory>
12 #include <iosfwd>
13 #include <string>
14 
15 //-------------------------------------------------------
16 namespace edm::streamer {
17  class OutputFile
21  {
22  public:
23  explicit OutputFile(const std::string& name);
27  ~OutputFile();
28 
29  bool write(const char* ptr, size_t n);
30 
31  std::string fileName() const { return filename_; }
33  uint32 adler32() const { return (adlerb_ << 16) | adlera_; }
34 
35  void set_do_adler(bool v) { do_adler_ = v; }
37  void close();
38 
39  private:
42  bool do_adler_;
45 
48  };
49 } // namespace edm::streamer
50 #endif
std::string fileName() const
edm::propagate_const< std::shared_ptr< std::ofstream > > ost_
uint64 current_offset() const
OutputFile(const std::string &name)
bool write(const char *ptr, size_t n)
unsigned int uint32
Definition: MsgTools.h:13
void set_current_offset(uint64 v)
unsigned long long uint64
Definition: MsgTools.h:14