/
SimpleNtuple.h
48 lines (37 loc) · 974 Bytes
/
SimpleNtuple.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
47
48
#ifndef SIMPLENTUPLE_H
#define SIMPLENTUPLE_H
#include <fun4all/SubsysReco.h>
#include <map>
#include <set>
#include <string>
#include <vector>
// Forward declerations
class Fun4AllHistoManager;
class PHCompositeNode;
class TFile;
class TH1;
class TNtuple;
class SimpleNtuple : public SubsysReco
{
public:
//! constructor
SimpleNtuple(const std::string &name = "SimpleNtuple", const std::string &filename = "SimpleNtuple.root");
//! destructor
virtual ~SimpleNtuple();
//! full initialization
int Init(PHCompositeNode *);
//! event processing method
int process_event(PHCompositeNode *);
//! end of run method
int End(PHCompositeNode *);
void AddNode(const std::string &name, const int detid = 0);
protected:
Fun4AllHistoManager *m_HistoManager;
TNtuple *m_Ntup;
TFile *m_Outfile;
std::string m_Filename;
std::vector<TH1 *> m_ElossVec;
std::set<std::string> m_NodePostfixSet;
std::map<std::string, int> m_DetIdMap;
};
#endif