Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:30

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef COPYIODATANODES_H
0004 #define COPYIODATANODES_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 
0010 class PHCompositeNode;
0011 
0012 class CopyIODataNodes : public SubsysReco
0013 {
0014  public:
0015   CopyIODataNodes(const std::string &name = "CopyIODataNodes");
0016 
0017   ~CopyIODataNodes() override = default;
0018 
0019   /** Called for first event when run number is known.
0020       Typically this is where you may want to fetch data from
0021       database, because you know the run number. A place
0022       to book histograms which have to know the run number.
0023    */
0024   int InitRun(PHCompositeNode *topNode) override;
0025 
0026   /** Called for each event.
0027       This is where you do the real work.
0028    */
0029   int process_event(PHCompositeNode *topNode) override;
0030 
0031   void CopyCentralityInfo(bool flag = true) { m_CopyCentralityInfoFlag = flag; }
0032   void CopyEventHeader(bool flag = true) { m_CopyEventHeaderFlag = flag; }
0033   void CopyGlobalVertexMap(bool flag = true) { m_CopyGlobalVertexMapFlag = flag; }
0034   void CopyMinimumBiasInfo(bool flag = true) { m_CopyMinimumBiasInfoFlag = flag; }
0035   void CopyMbdOut(bool flag = true) { m_CopyMbdOutFlag = flag; }
0036   void CopyRunHeader(bool flag = true) { m_CopyRunHeaderFlag = flag; }
0037   void CopySyncObject(bool flag = true) { m_CopySyncObjectFlag = flag; }
0038 
0039  private:
0040   void CreateCentralityInfo(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0041   void CopyCentralityInfo(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0042 
0043   void CreateEventHeader(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0044   void CopyEventHeader(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0045 
0046   void CreateGlobalVertexMap(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0047   void CopyGlobalVertexMap(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0048 
0049   void CreateMinimumBiasInfo(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0050   void CopyMinimumBiasInfo(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0051 
0052   void CreateMbdOut(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0053   void CopyMbdOut(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0054 
0055   void CopyRunHeader(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0056 
0057   void CreateSyncObject(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0058   void CopySyncObject(PHCompositeNode *from_topNode, PHCompositeNode *to_topNode);
0059 
0060   bool m_CopyCentralityInfoFlag = true;
0061   bool m_CopyEventHeaderFlag = true;
0062   bool m_CopyGlobalVertexMapFlag = true;
0063   bool m_CopyMinimumBiasInfoFlag = true;
0064   bool m_CopyMbdOutFlag = true;
0065   bool m_CopyRunHeaderFlag = true;
0066   bool m_CopySyncObjectFlag = true;
0067 };
0068 
0069 #endif  // COPYIODATANODES_H