Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:19

0001 #ifndef PHOOL_PHIOMANAGER_H
0002 #define PHOOL_PHIOMANAGER_H
0003 
0004 //  Declaration of class PHIOManager
0005 //  Purpose: Abstract base class for file IO
0006 //  Author: Matthias Messer
0007 
0008 #include <cstddef>
0009 #include <string>
0010 
0011 class PHCompositeNode;
0012 
0013 class PHIOManager
0014 {
0015  public:
0016   virtual ~PHIOManager() = default;
0017 
0018  public:
0019   const std::string &getFilename() const { return filename; }
0020   size_t getEventNumber() const { return eventNumber; }
0021   void setEventNumber(const size_t evno)
0022   {
0023     eventNumber = evno;
0024     return;
0025   }
0026   virtual void closeFile() = 0;
0027   virtual bool write(PHCompositeNode *) = 0;
0028   virtual void print() const = 0;
0029 
0030  protected:
0031   PHIOManager() = default;
0032   size_t eventNumber{0};
0033   std::string filename;
0034 };
0035 
0036 #endif