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_FUN4ALLDSTINPUTMANAGER_H
0004 #define FUN4ALL_FUN4ALLDSTINPUTMANAGER_H
0005 
0006 #include "Fun4AllInputManager.h"
0007 
0008 #include <map>
0009 #include <string>
0010 
0011 class PHCompositeNode;
0012 class PHNodeIOManager;
0013 class SyncObject;
0014 
0015 class Fun4AllDstInputManager : public Fun4AllInputManager
0016 {
0017  public:
0018   Fun4AllDstInputManager(const std::string &name = "DUMMY", const std::string &nodename = "DST", const std::string &topnodename = "TOP");
0019   ~Fun4AllDstInputManager() override;
0020   int fileopen(const std::string &filenam) override;
0021   int fileclose() override;
0022   int run(const int nevents = 0) override;
0023   int GetSyncObject(SyncObject **mastersync) override;
0024   int SyncIt(const SyncObject *mastersync) override;
0025   int BranchSelect(const std::string &branch, const int iflag) override;
0026   int setBranches() override;
0027   virtual int setSyncBranches(PHNodeIOManager *iman);
0028   void Print(const std::string &what = "ALL") const override;
0029   int PushBackEvents(const int i) override;
0030   int HasSyncObject() const override;
0031 
0032  protected:
0033   int ReadNextEventSyncObject();
0034   void ReadRunTTree(const int i) { m_ReadRunTTree = i; }
0035   void IManager(PHNodeIOManager *iman) { m_IManager = iman; }
0036   PHNodeIOManager *IManager() { return m_IManager; }
0037   void runNode(PHCompositeNode *node) { m_RunNode = node; }
0038   PHCompositeNode *runNode() { return m_RunNode; }
0039   void runNodeCopy(PHCompositeNode *node) { m_RunNodeCopy = node; }
0040   PHCompositeNode *runNodeCopy() { return m_RunNodeCopy; }
0041   void runNodeSum(PHCompositeNode *node) { m_RunNodeSum = node; }
0042   PHCompositeNode *runNodeSum() { return m_RunNodeSum; }
0043   const std::string &RunNodeName() const { return RunNode; }
0044   std::string fullfilename;
0045 
0046  private:
0047   PHCompositeNode *dstNode{nullptr};
0048   PHCompositeNode *m_RunNode{nullptr};
0049   PHCompositeNode *m_RunNodeCopy{nullptr};
0050   PHCompositeNode *m_RunNodeSum{nullptr};
0051   PHNodeIOManager *m_IManager{nullptr};
0052   SyncObject *syncobject{nullptr};
0053   int m_ReadRunTTree{1};
0054   int events_total{0};
0055   int events_thisfile{0};
0056   int events_skipped_during_sync{0};
0057   int m_HaveSyncObject{0};
0058   std::map<const std::string, int> branchread;
0059   std::string syncbranchname;
0060   std::string RunNode{"RUN"};
0061 };
0062 
0063 #endif /* __FUN4ALLDSTINPUTMANAGER_H__ */