Logo ROOT  
Reference Guide
clonesA_Event.h
Go to the documentation of this file.
1 #include "TTree.h"
2 #include "Riostream.h"
3 
4 class TUsrHit:public TObject {
5  public:
6  TUsrHit(Int_t ev=0);
7  virtual ~TUsrHit() {}
8 
9  protected:
10  Int_t fEventNumber; // internal event number
11  Int_t fModuleNumber; // module serial number
12  Int_t fChannel; // module channel
13  UShort_t fEventTime[3]; // time stamp generated by dgf clock bus (48 bits unsigned!)
14 
15  ClassDef(TUsrHit, 1) // [Analyze] Hit
16 };
17 
18 //______________________________________________________
19 
20 class TUsrHitBuffer:public TObject {
21  public:
22 // TUsrHitBuffer(){};
23  TUsrHitBuffer(Int_t maxent = 10);
24  virtual ~TUsrHitBuffer() {
25  std::cout << "~~~~~~dtor TUsrHitBuffer " << this << std::endl;
26  delete fHits;
27  }
28 
29 
30  TUsrHit *AddHit(Int_t ev);
31  Int_t GetBufSize() { return fHits->GetSize();}
32  TClonesArray *GetCA() { return (fHits);}
33  void Clear(Option_t *opt="");
34 
35  protected:
36 
37  Int_t fNofEntries; // max number of entries
38  Int_t fNofHits; // current number of hits
39  TClonesArray *fHits; // array containing hit data
40 
41  ClassDef(TUsrHitBuffer, 1) // [Analyze] Hit buffer
42 };
43 
44 //______________________________________________________
45 
46 class TMrbSubevent_Caen:public TObject {
47 
48  public:
49  TMrbSubevent_Caen() {std::cout << "ctor TMrbSubevent_Caen" << this << std::endl;}
50  virtual ~TMrbSubevent_Caen() {}
51  void Clear(Option_t * /* opt */ ="") {fHitBuffer.Clear();};
53  protected:
54 
55  Int_t fTimeStamp; // time stamp, same as fUniqueID
56  TUsrHitBuffer fHitBuffer; // hit buffer to store subevent data
57 
58  ClassDef(TMrbSubevent_Caen, 1) // [Analyze] Base class for subevents: CAEN data stored in hit buffer
59 };
60 
61 //______________________________________________________
62 
64  public:
66 
67  virtual ~TUsrSevtData1() {}
68  void SetEvent(Int_t ev);
69  Int_t GetPileup() {return fPileup; };
70 
71  protected:
72  TString fSevtName; // subevent name
73  Int_t fMer; // data2.mer
74  Int_t fPileup; // data2.mpileup
75 
76  ClassDef(TUsrSevtData1, 1) // [Analyze] Store CAEN data in hit buffer
77 };
78 //______________________________________________________
79 
81  public:
83 
84  virtual ~TUsrSevtData2() {}
85  void SetEvent(Int_t ev);
86  Int_t GetPileup() {return fPileup; };
87 
88  protected:
89  TString fSevtName; // subevent name
90  Int_t fMer; // data2.mer
91  Int_t fPileup; // data2.mpileup
92 
93  ClassDef(TUsrSevtData2, 1) // [Analyze] Store CAEN data in hit buffer
94 };
TUsrHitBuffer::fNofEntries
Int_t fNofEntries
Definition: clonesA_Event.h:37
TUsrHitBuffer::fNofHits
Int_t fNofHits
Definition: clonesA_Event.h:38
TUsrHitBuffer::GetBufSize
Int_t GetBufSize()
Definition: clonesA_Event.h:31
Option_t
const char Option_t
Definition: RtypesCore.h:66
TMrbSubevent_Caen::GetHitBuffer
TUsrHitBuffer * GetHitBuffer()
Definition: clonesA_Event.h:52
TUsrSevtData2::SetEvent
void SetEvent(Int_t ev)
Definition: clonesA_Event.cxx:54
UShort_t
unsigned short UShort_t
Definition: RtypesCore.h:40
TUsrHit::~TUsrHit
virtual ~TUsrHit()
Definition: clonesA_Event.h:7
TUsrSevtData1::TUsrSevtData1
TUsrSevtData1()
Definition: clonesA_Event.h:65
Int_t
int Int_t
Definition: RtypesCore.h:45
TUsrHit::fEventNumber
Int_t fEventNumber
Definition: clonesA_Event.h:10
TMrbSubevent_Caen::fHitBuffer
TUsrHitBuffer fHitBuffer
Definition: clonesA_Event.h:56
TUsrSevtData1::fSevtName
TString fSevtName
Definition: clonesA_Event.h:69
TUsrHit::TUsrHit
TUsrHit(Int_t ev=0)
Definition: clonesA_Event.cxx:7
TUsrHitBuffer
Definition: clonesA_Event.h:20
TTree.h
TString
Basic string class.
Definition: TString.h:136
TUsrSevtData1::GetPileup
Int_t GetPileup()
Definition: clonesA_Event.h:69
TUsrHitBuffer::TUsrHitBuffer
TUsrHitBuffer(Int_t maxent=10)
Definition: clonesA_Event.cxx:16
TUsrHitBuffer::Clear
void Clear(Option_t *opt="")
Definition: clonesA_Event.cxx:33
TMrbSubevent_Caen
Definition: clonesA_Event.h:46
TMrbSubevent_Caen::fTimeStamp
Int_t fTimeStamp
Definition: clonesA_Event.h:52
TUsrHit::fModuleNumber
Int_t fModuleNumber
Definition: clonesA_Event.h:11
TUsrSevtData1::SetEvent
void SetEvent(Int_t ev)
Definition: clonesA_Event.cxx:40
TUsrHit::fEventTime
UShort_t fEventTime[3]
Definition: clonesA_Event.h:13
TUsrHit
Definition: clonesA_Event.h:4
TUsrHitBuffer::GetCA
TClonesArray * GetCA()
Definition: clonesA_Event.h:32
TUsrHitBuffer::fHits
TClonesArray * fHits
Definition: clonesA_Event.h:39
TUsrSevtData2::fMer
Int_t fMer
Definition: clonesA_Event.h:90
TUsrHitBuffer::AddHit
TUsrHit * AddHit(Int_t ev)
Definition: clonesA_Event.cxx:25
TMrbSubevent_Caen::TMrbSubevent_Caen
TMrbSubevent_Caen()
Definition: clonesA_Event.h:49
TUsrSevtData1
Definition: clonesA_Event.h:63
TCollection::GetSize
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TUsrSevtData2::fPileup
Int_t fPileup
Definition: clonesA_Event.h:91
TUsrSevtData1::fMer
Int_t fMer
Definition: clonesA_Event.h:73
TUsrSevtData2::GetPileup
Int_t GetPileup()
Definition: clonesA_Event.h:86
TUsrHitBuffer::~TUsrHitBuffer
virtual ~TUsrHitBuffer()
Definition: clonesA_Event.h:24
TUsrSevtData2::fSevtName
TString fSevtName
Definition: clonesA_Event.h:86
TUsrSevtData2::~TUsrSevtData2
virtual ~TUsrSevtData2()
Definition: clonesA_Event.h:84
TUsrSevtData1::fPileup
Int_t fPileup
Definition: clonesA_Event.h:74
Riostream.h
TClonesArray
An array of clone (identical) objects.
Definition: TClonesArray.h:29
TUsrSevtData1::~TUsrSevtData1
virtual ~TUsrSevtData1()
Definition: clonesA_Event.h:67
TUsrSevtData2
Definition: clonesA_Event.h:80
TUsrSevtData2::TUsrSevtData2
TUsrSevtData2()
Definition: clonesA_Event.h:82
TUsrHit::fChannel
Int_t fChannel
Definition: clonesA_Event.h:12
int
TMrbSubevent_Caen::Clear
void Clear(Option_t *="")
Definition: clonesA_Event.h:51
TMrbSubevent_Caen::~TMrbSubevent_Caen
virtual ~TMrbSubevent_Caen()
Definition: clonesA_Event.h:50