Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaEvent.h
Go to the documentation of this file.
1#ifndef Podd_THaEvent_h_
2#define Podd_THaEvent_h_
3
5//
6// THaEvent
7//
9
10#include "TObject.h"
11#include <vector>
12
13class THaVar;
14
16
17public:
19 fEvtTime(0), fEvtNum(0), fEvtType(0), fEvtLen(0), fHelicity(0),
20 fTrigBits(0), fRun(0) {}
21 virtual ~THaEventHeader() = default;
22
23 void Set( UInt_t num, UInt_t type, UInt_t len, ULong64_t time,
24 Int_t hel, UInt_t tbits, UInt_t run ) {
25 fEvtNum = num;
26 fEvtType = type;
27 fEvtLen = len;
28 fEvtTime = time;
29 fHelicity = hel;
30 fTrigBits = tbits;
31 fRun = run;
32 }
33 UInt_t GetEvtNum() const { return fEvtNum; }
34 UInt_t GetEvtType() const { return fEvtType; }
35 UInt_t GetEvtLen() const { return fEvtLen; }
36 ULong64_t GetEvtTime() const { return fEvtTime; }
37 Int_t GetHelicity() const { return fHelicity; }
38 UInt_t GetTrigBits() const { return fTrigBits; }
39 UInt_t GetRun() const { return fRun; }
40
41private:
42 // The units of these data are entirely up to the experiment
43 ULong64_t fEvtTime; // Event time stamp
44 UInt_t fEvtNum; // Event number
45 UInt_t fEvtType; // Event type
46 UInt_t fEvtLen; // Event length
47 Int_t fHelicity; // Beam helicity
48 UInt_t fTrigBits; // Trigger bitpattern
49 UInt_t fRun; // Run number
50
51 ClassDef(THaEventHeader,7) // Header for analyzed event data in ROOT file
52};
53
54
55class THaEvent : public TObject {
56
57public:
59 virtual ~THaEvent() = default;
60
62
63 virtual void Clear( Option_t *opt = "" );
64 virtual Int_t Init();
65 virtual Int_t Fill();
66 virtual void Reset( Option_t *opt = "" );
67
68protected:
69
70 THaEventHeader fEvtHdr; // Event header
71
73
74 class DataMap {
75 public:
77 const char* name;
78 void* dest;
81 };
82 std::vector<DataMap> fDataMap;
83
84 ClassDef(THaEvent,3) //Base class for event structure definition
85};
86
87
88#endif
89
int Int_t
unsigned int UInt_t
uint32_t time
bool Bool_t
const char Option_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
UInt_t fEvtLen
Definition THaEvent.h:46
ULong64_t fEvtTime
Definition THaEvent.h:43
ULong64_t GetEvtTime() const
Definition THaEvent.h:36
UInt_t fEvtNum
Definition THaEvent.h:44
UInt_t GetEvtLen() const
Definition THaEvent.h:35
virtual ~THaEventHeader()=default
UInt_t fTrigBits
Definition THaEvent.h:48
UInt_t fEvtType
Definition THaEvent.h:45
UInt_t fRun
Definition THaEvent.h:49
void Set(UInt_t num, UInt_t type, UInt_t len, ULong64_t time, Int_t hel, UInt_t tbits, UInt_t run)
Definition THaEvent.h:23
Int_t fHelicity
Definition THaEvent.h:47
UInt_t GetEvtType() const
Definition THaEvent.h:34
UInt_t GetTrigBits() const
Definition THaEvent.h:38
UInt_t GetEvtNum() const
Definition THaEvent.h:33
Int_t GetHelicity() const
Definition THaEvent.h:37
UInt_t GetRun() const
Definition THaEvent.h:39
Fill() initialized.
Definition THaEvent.h:74
void * dest
Global variable name.
Definition THaEvent.h:78
const char * name
Number of elements to copy.
Definition THaEvent.h:77
Int_t * ncopyvar
Address of corresponding member variable.
Definition THaEvent.h:79
THaVar * pvar
Variable holding value of ncopy (if ncopy=-1)
Definition THaEvent.h:80
virtual void Clear(Option_t *opt="")
Definition THaEvent.cxx:42
virtual Int_t Init()
Definition THaEvent.cxx:170
THaEventHeader * GetHeader()
Definition THaEvent.h:61
Bool_t fInit
Definition THaEvent.h:72
THaEventHeader fEvtHdr
Definition THaEvent.h:70
std::vector< DataMap > fDataMap
Definition THaEvent.h:82
virtual Int_t Fill()
Definition THaEvent.cxx:48
virtual void Reset(Option_t *opt="")
Definition THaEvent.cxx:191
virtual ~THaEvent()=default
unsigned long long ULong64_t