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
edm::streamer::OutputFile::~OutputFile
~OutputFile()
Definition: StreamerFileIO.cc:21
edm::streamer::OutputFile::filename_
std::string filename_
Definition: StreamerFileIO.h:47
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
propagate_const.h
edm::streamer::OutputFile::fileName
std::string fileName() const
Definition: StreamerFileIO.h:31
findQualityFiles.v
v
Definition: findQualityFiles.py:179
edm::streamer::OutputFile::close
void close()
Definition: StreamerFileIO.cc:34
uint32
unsigned int uint32
Definition: MsgTools.h:13
edm::streamer::OutputFile::set_do_adler
void set_do_adler(bool v)
Definition: StreamerFileIO.h:35
edm::streamer::OutputFile::adler32
uint32 adler32() const
Definition: StreamerFileIO.h:33
edm::propagate_const
Definition: propagate_const.h:32
edm::streamer::OutputFile::current_offset
uint64 current_offset() const
Definition: StreamerFileIO.h:32
edm::streamer::OutputFile::OutputFile
OutputFile(const std::string &name)
Definition: StreamerFileIO.cc:8
edm::streamer::OutputFile::ost_
edm::propagate_const< std::shared_ptr< std::ofstream > > ost_
Definition: StreamerFileIO.h:46
edm::streamer::OutputFile::current_offset_
uint64 current_offset_
Definition: StreamerFileIO.h:40
MsgTools.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::streamer::OutputFile::write
bool write(const char *ptr, size_t n)
Definition: StreamerFileIO.cc:23
edm::streamer::OutputFile::adlera_
uint32 adlera_
Definition: StreamerFileIO.h:43
edm::streamer
Definition: StreamerFileIO.h:16
uint64
unsigned long long uint64
Definition: MsgTools.h:14
edm::streamer::OutputFile::adlerb_
uint32 adlerb_
Definition: StreamerFileIO.h:44
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::streamer::OutputFile::set_current_offset
void set_current_offset(uint64 v)
Definition: StreamerFileIO.h:36
edm::streamer::OutputFile::do_adler_
bool do_adler_
Definition: StreamerFileIO.h:42
edm::streamer::OutputFile
Definition: StreamerFileIO.h:17