Logo ROOT   6.10/09
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();};
52  TUsrHitBuffer * GetHitBuffer() {return &fHitBuffer;};
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:
65  TUsrSevtData1() {SetEvent(0);}
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:
82  TUsrSevtData2() {SetEvent(0);}
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 };
virtual void Clear(Option_t *="")
Definition: TObject.h:91
virtual ~TMrbSubevent_Caen()
Definition: clonesA_Event.h:50
Int_t fEventNumber
Definition: clonesA_Event.h:10
const char Option_t
Definition: RtypesCore.h:62
unsigned short UShort_t
Definition: RtypesCore.h:36
TUsrHit(Int_t ev=0)
Int_t GetBufSize()
Definition: clonesA_Event.h:31
Int_t GetPileup()
Definition: clonesA_Event.h:86
Int_t fChannel
Definition: clonesA_Event.h:12
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
Int_t fModuleNumber
Definition: clonesA_Event.h:11
virtual ~TUsrSevtData1()
Definition: clonesA_Event.h:67
virtual ~TUsrHit()
Definition: clonesA_Event.h:7
TUsrHitBuffer fHitBuffer
Definition: clonesA_Event.h:56
TUsrHitBuffer * GetHitBuffer()
Definition: clonesA_Event.h:52
TClonesArray * fHits
Definition: clonesA_Event.h:39
void Clear(Option_t *="")
Definition: clonesA_Event.h:51
Int_t GetPileup()
Definition: clonesA_Event.h:69
#define ClassDef(name, id)
Definition: Rtypes.h:297
virtual ~TUsrHitBuffer()
Definition: clonesA_Event.h:24
UShort_t fEventTime[3]
Definition: clonesA_Event.h:13
Mother of all ROOT objects.
Definition: TObject.h:37
An array of clone (identical) objects.
Definition: TClonesArray.h:32
TClonesArray * GetCA()
Definition: clonesA_Event.h:32
virtual ~TUsrSevtData2()
Definition: clonesA_Event.h:84