ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHIOManager.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHIOManager.h
1 #ifndef PHOOL_PHIOMANAGER_H
2 #define PHOOL_PHIOMANAGER_H
3 
4 // Declaration of class PHIOManager
5 // Purpose: Abstract base class for file IO
6 // Author: Matthias Messer
7 
8 #include <cstddef>
9 #include <string>
10 
11 class PHCompositeNode;
12 
14 {
15  public:
16  virtual ~PHIOManager() {}
17 
18  public:
19  std::string getFilename() const { return filename; }
20  size_t getEventNumber() const { return eventNumber; }
21  void setEventNumber(const size_t evno)
22  {
23  eventNumber = evno;
24  return;
25  }
26  virtual void closeFile() = 0;
27  virtual bool write(PHCompositeNode *) = 0;
28  virtual void print() const = 0;
29 
30  protected:
32  std::string filename;
33  size_t eventNumber = 0;
34 };
35 
36 #endif