ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4AllFileOutStream.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4AllFileOutStream.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef FUN4ALLRAW_FUN4ALLFILEOUTSTREAM_H
4 #define FUN4ALLRAW_FUN4ALLFILEOUTSTREAM_H
5 
7 
8 #include <Event/phenixTypes.h>
9 
10 #include <iostream>
11 #include <string>
12 
13 class Event;
14 class oBuffer;
15 
17 {
18  public:
19  static const unsigned int LENGTH = (4 * 1024 * 1024);
20  Fun4AllFileOutStream(const std::string &frule = "OUTDATA-%010d-%04d.PRDFF", const std::string &name = "FILEOUTSTREAM");
21  virtual ~Fun4AllFileOutStream();
22  int WriteEventOut(Event *evt);
23  int CloseOutStream();
24  void identify(std::ostream &os = std::cout) const;
25  oBuffer *GetoBuffer() { return m_ob; }
26  void SetoBuffer(oBuffer *bf) { m_ob = bf; }
27  unsigned long long MaxSize() const { return m_MaxSize; }
28  void DeleteoBuffer();
29  std::string FileRule() const { return m_FileRule; }
30  int iSeq() const { return m_iSeq; }
31  void iSeq(const int i) { m_iSeq = i; }
32  unsigned long long BytesWritten() const { return m_BytesWritten; }
33  void BytesWritten(const unsigned long long i) { m_BytesWritten = i; }
34  int OutFileDescriptor() const { return m_OutFileDesc; }
35  void OutFileDescriptor(const int i) { m_OutFileDesc = i; }
36  PHDWORD *xb() { return m_xb; }
37 
38  private:
39  std::string m_FileRule;
41  int m_iSeq;
44  unsigned long long m_BytesWritten;
45  unsigned long long m_MaxSize;
46 };
47 
48 #endif