File indexing completed on 2025-08-05 08:16:13
0001
0002
0003 #ifndef FUN4ALLRAW_FUN4ALLROLLOVERFILEOUTSTREAM_H
0004 #define FUN4ALLRAW_FUN4ALLROLLOVERFILEOUTSTREAM_H
0005
0006 #include "Fun4AllFileOutStream.h"
0007
0008 #include <iostream> // for cout, ostream
0009 #include <string> // for string
0010
0011 class Event;
0012
0013 class Fun4AllRolloverFileOutStream : public Fun4AllFileOutStream
0014 {
0015 public:
0016 Fun4AllRolloverFileOutStream(const std::string &frule = "OUTDATA-%010d-%04d.PRDFF",
0017 const unsigned int nEvents = 0,
0018 const unsigned int sizeInMB = 0,
0019 const int offset = 0,
0020 const int increment = 1,
0021 const std::string &name = "Fun4AllRolloverFileOutStream");
0022
0023 ~Fun4AllRolloverFileOutStream() override = default;
0024 int WriteEventOut(Event *evt) override;
0025 void identify(std::ostream &os = std::cout) const override;
0026
0027 private:
0028 void open_new_file();
0029 uint64_t m_MaxFileFize{0};
0030 unsigned int m_MaxNEvents{0};
0031 int m_CurrentSequence{0};
0032 int m_Offset{0};
0033 int m_Increment{1};
0034 };
0035
0036 #endif