CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamerFileIO.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamerFileIO_h
2 #define IOPool_Streamer_StreamerFileIO_h
3 
10 #include <memory>
11 #include <iosfwd>
12 #include <string>
13 
14 //-------------------------------------------------------
15 
16 class OutputFile
20  {
21  public:
22  explicit OutputFile(const std::string& name);
26  ~OutputFile();
27 
28  bool write(const char *ptr, size_t n);
29 
30  std::string fileName() const { return filename_; }
32  uint32 adler32() const { return (adlerb_ << 16) | adlera_; }
33 
34  void set_do_adler(bool v) { do_adler_ = v; }
36 
37  private:
40  bool do_adler_;
43 
44  std::shared_ptr<std::ofstream> ost_;
46  };
47 
48 #endif
uint64 current_offset_
ULong64_t uint64
uint32 adler32() const
uint64 current_offset() const
std::string filename_
OutputFile(const std::string &name)
bool write(const char *ptr, size_t n)
void set_do_adler(bool v)
void set_current_offset(uint64 v)
unsigned int uint32
Definition: MsgTools.h:13
std::string fileName() const
std::shared_ptr< std::ofstream > ost_
uint32 adlerb_
uint32 adlera_