ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4EdepNtuple.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4EdepNtuple.h
1 #ifndef G4HISTOS_G4EDEPNTUPLE_H
2 #define G4HISTOS_G4EDEPNTUPLE_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <map>
7 #include <set>
8 #include <string>
9 
10 // Forward declerations
12 class PHCompositeNode;
13 class TFile;
14 class TNtuple;
15 
16 class G4EdepNtuple : public SubsysReco
17 {
18  public:
20  G4EdepNtuple(const std::string &name = "G4EdepNtuple", const std::string &filename = "G4EdepNtuple.root");
21 
23  ~G4EdepNtuple() override;
24 
26  int Init(PHCompositeNode *) override;
27 
29  int process_event(PHCompositeNode *) override;
30 
32  int End(PHCompositeNode *) override;
33 
34  void AddNode(const std::string &name, const int detid = 0);
35 
36  protected:
37  int nblocks;
39  std::string _filename;
40  std::set<std::string> _node_postfix;
41  std::map<std::string, int> _detid;
42  TNtuple *ntup;
43  TFile *outfile;
44 };
45 
46 #endif