Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:19:15

0001 #ifndef G4HISTOS_G4EDEPNTUPLE_H
0002 #define G4HISTOS_G4EDEPNTUPLE_H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <map>
0007 #include <set>
0008 #include <string>
0009 
0010 // Forward declerations
0011 class Fun4AllHistoManager;
0012 class PHCompositeNode;
0013 class TFile;
0014 class TNtuple;
0015 
0016 class G4EdepNtuple : public SubsysReco
0017 {
0018  public:
0019   //! constructor
0020   G4EdepNtuple(const std::string &name = "G4EdepNtuple", const std::string &filename = "G4EdepNtuple.root");
0021 
0022   //! destructor
0023   ~G4EdepNtuple() override;
0024 
0025   //! full initialization
0026   int Init(PHCompositeNode *) override;
0027 
0028   //! event processing method
0029   int process_event(PHCompositeNode *) override;
0030 
0031   //! end of run method
0032   int End(PHCompositeNode *) override;
0033 
0034   void AddNode(const std::string &name, const int detid = 0);
0035 
0036  protected:
0037   int nblocks;
0038   Fun4AllHistoManager *hm;
0039   std::string _filename;
0040   std::set<std::string> _node_postfix;
0041   std::map<std::string, int> _detid;
0042   TNtuple *ntup;
0043   TFile *outfile;
0044 };
0045 
0046 #endif