forked from sPHENIX-Collaboration/coresoftware
/
G4EdepNtuple.h
46 lines (35 loc) · 949 Bytes
/
G4EdepNtuple.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef G4HISTOS_G4EDEPNTUPLE_H
#define G4HISTOS_G4EDEPNTUPLE_H
#include <fun4all/SubsysReco.h>
#include <map>
#include <set>
#include <string>
// Forward declerations
class Fun4AllHistoManager;
class PHCompositeNode;
class TFile;
class TNtuple;
class G4EdepNtuple : public SubsysReco
{
public:
//! constructor
G4EdepNtuple(const std::string &name = "G4EdepNtuple", const std::string &filename = "G4EdepNtuple.root");
//! destructor
~G4EdepNtuple() override;
//! full initialization
int Init(PHCompositeNode *) override;
//! event processing method
int process_event(PHCompositeNode *) override;
//! end of run method
int End(PHCompositeNode *) override;
void AddNode(const std::string &name, const int detid = 0);
protected:
int nblocks;
Fun4AllHistoManager *hm;
std::string _filename;
std::set<std::string> _node_postfix;
std::map<std::string, int> _detid;
TNtuple *ntup;
TFile *outfile;
};
#endif