Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:16:45

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef FUN4ALL_FUN4ALLDSTOUTPUTMANAGER_H
0004 #define FUN4ALL_FUN4ALLDSTOUTPUTMANAGER_H
0005 
0006 #include "Fun4AllOutputManager.h"
0007 
0008 #include <set>
0009 #include <string>
0010 
0011 class PHNodeIOManager;
0012 class PHCompositeNode;
0013 
0014 class Fun4AllDstOutputManager : public Fun4AllOutputManager
0015 {
0016  public:
0017   Fun4AllDstOutputManager(const std::string &myname = "DSTOUT", const std::string &filename = "dstout.root");
0018   ~Fun4AllDstOutputManager() override;
0019   // Fun4AllDstOutputManager contains pointer to memory
0020   // copy ctor and = operator  need explicit implementation, do just delete it here
0021   Fun4AllDstOutputManager(const Fun4AllDstOutputManager &) = delete;
0022   Fun4AllDstOutputManager &operator=(Fun4AllDstOutputManager const &) = delete;
0023   int AddNode(const std::string &nodename) override;
0024   int AddRunNode(const std::string &nodename) override;
0025   int StripCompositeNode(const std::string &nodename) override;
0026   int StripNode(const std::string &nodename) override;
0027   int StripRunNode(const std::string &nodename) override;
0028   void SaveRunNode(const int i) override { m_SaveRunNodeFlag = i; }
0029   void SaveDstNode(const int i) override { m_SaveDstNodeFlag = i; }
0030   int outfileopen(const std::string &fname) override;
0031 
0032   void Print(const std::string &what = "ALL") const override;
0033 
0034   int Write(PHCompositeNode *startNode) override;
0035   int WriteNode(PHCompositeNode *thisNode) override;
0036   const std::string &UsedOutFileName() const { return m_UsedOutFileName; }
0037   void CompressionSetting(const int i) override { m_CompressionSetting = i; }
0038 
0039  private:
0040   int outfile_open_first_write();
0041   PHNodeIOManager *dstOut{nullptr};
0042   int m_SaveRunNodeFlag{1};
0043   int m_SaveDstNodeFlag{1};
0044   int m_CompressionSetting{505};
0045   std::string m_FileNameStem;
0046   std::string m_UsedOutFileName;
0047   std::set<std::string> savenodes;
0048   std::set<std::string> saverunnodes;
0049   std::set<std::string> m_StripCompositeNodes;
0050   std::set<std::string> stripnodes;
0051   std::set<std::string> striprunnodes;
0052 };
0053 
0054 #endif