-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEvent.h
More file actions
44 lines (38 loc) · 796 Bytes
/
Event.h
File metadata and controls
44 lines (38 loc) · 796 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
#ifndef EVENT_H_
#define EVENT_H_
#include <vector>
#include <algorithm>
//
// hit data structure
//
class pxhit {
public:
long timeStamp;
bool trigger;
int roc;
int row;
int dcol;
int CD_Select;
double pulseHeight;
bool wrongTS;
bool operator < (const pxhit& b)const{
long aa=roc*1000+dcol;
long bb=b.roc*1000+b.dcol;
return (aa<bb);
};
void clear() { timeStamp=0;} ;
void init() { timeStamp=-1; wrongTS = true; row = -17;} ;
void printhit();
};
typedef std::vector<pxhit> hit_vector;
typedef std::vector<pxhit>::iterator hit_iterator;
typedef std::vector<pxhit>::const_iterator hit_const_iterator;
class Event
{
public:
hit_vector hits[4];
long clock;
bool trigger;
void New(long clk, int trg);
};
#endif /*EVENT_H_*/