forked from akornmay/originalDataFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventReader.h
More file actions
54 lines (46 loc) · 996 Bytes
/
EventReader.h
File metadata and controls
54 lines (46 loc) · 996 Bytes
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
49
50
51
52
53
54
#ifndef EVENTREADER_H_
#define EVENTREADER_H_
#include "TRandom3.h"
#include "TFile.h"
#include "TTree.h"
#include "CommonDefs.h"
#include <list>
class RootHits
{
public:
~RootHits();
void Init(int lr, std::string &name);
void GetHits(Event &event, int nEvents);
private:
short int col, row, adc;
int event_nr;
int ladder, layer;
unsigned int tree_event;
short tree_ladder, tree_module, panel;
UInt_t N_Entries;
UInt_t rPointer;
TFile *HitFile;
TTree *HitTree;
};
class RootReader
{
public:
void Init(int layer);
void ReadEvent(Event &event);
private:
std::list<RootHits *> signalTrees, MB_Trees;
TRandom3 rndm;
double E_PileUp; // expectation value for number of pile up events
double E_Signal; // expectation value for number of signal events
std::list<RootHits *>::iterator iSignal, iMinBias;
};
class ASCIIReader
{
public:
void Init(int layer);
void ReadEvent(Event &event);
void Terminate();
private:
ifstream is[4];
};
#endif /*EVENTREADER_H_*/