ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHRawOManager.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHRawOManager.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef PHOOLRAW_PHRAWOMANAGER_H
4 #define PHOOLRAW_PHRAWOMANAGER_H
5 
6 //-----------------------------------------------------------------------------
7 //
8 // The PHOOL's Software
9 // Copyright (C) PHENIX collaboration, 1999
10 //
11 // Declaration of class PHRawOManager
12 //
13 // Purpose: Write a node-tree into a PRDF file
14 //
15 // Description:
16 // - The default constructor sets all pointers to NULL. SetFile() would
17 // have to be called in addition.
18 // - The second constructor calls the setFile method to which it passes
19 // on its arguments. In order of appearance:
20 // 1. The filename, type std::string, no default
21 // 2. The runnumber, int, defaults to 0
22 // 3. The buffersize, int, defaults to 100000
23 // 4. The eventlength, int, defaults to -1, in which case a quarter
24 // of the selected buffersize will be chosen.
25 // 5. The compression-level. Values can range between 1 and 9, as in
26 // gzip, the underlying compression program. Zero means no
27 // compression at all, default is 3.
28 //
29 // Author: Matthias Messer
30 //-----------------------------------------------------------------------------
31 
32 #include <phool/PHIOManager.h>
33 
34 #include <Event/phenixTypes.h>
35 
36 #include <string>
37 
38 class PHCompositeNode;
39 class PHRawDataNode;
40 class oBuffer;
41 
42 class PHRawOManager : public PHIOManager
43 {
44  public:
45  PHRawOManager();
46  PHRawOManager(const std::string &, const int run = 0, const int bufl = 100000, const int evtl = -1, const int complvl = 3);
47  virtual ~PHRawOManager();
48 
49  bool setFile(const std::string &, const int setRun, const int setBufl, const int setEvtl, const int complvl);
50  virtual void closeFile();
51  virtual bool write(PHCompositeNode *);
52  bool write(PHRawDataNode *);
53 
54  virtual void print() const;
55 
56  private:
57  int filedesc;
60  int runNumber;
64 };
65 
66 #endif