EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimpleNtuple.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SimpleNtuple.h
1 #ifndef SIMPLENTUPLE_H
2 #define SIMPLENTUPLE_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <map>
7 #include <set>
8 #include <string>
9 #include <vector>
10 
11 // Forward declerations
13 class PHCompositeNode;
14 class TFile;
15 class TH1;
16 class TNtuple;
17 
18 class SimpleNtuple : public SubsysReco
19 {
20  public:
22  SimpleNtuple(const std::string &name = "SimpleNtuple", const std::string &filename = "SimpleNtuple.root");
23 
25  virtual ~SimpleNtuple();
26 
28  int Init(PHCompositeNode *);
29 
32 
34  int End(PHCompositeNode *);
35 
36  void AddNode(const std::string &name, const int detid = 0);
37 
38  protected:
40  TNtuple *m_Ntup;
41  TFile *m_Outfile;
42  std::string m_Filename;
43  std::vector<TH1 *> m_ElossVec;
44  std::set<std::string> m_NodePostfixSet;
45  std::map<std::string, int> m_DetIdMap;
46 };
47 
48 #endif