Logo ROOT  
Reference Guide
clonesA_Event.cxx
Go to the documentation of this file.
1#include "TFile.h"
2#include "TClonesArray.h"
3#include "clonesA_Event.h"
4
5////////////////////////////////////////////////////////////////////////////////
6
8 fEventNumber = ev;
9 fModuleNumber = ev%4;
10 fChannel = ev+1000;
11 for (Int_t i=0;i<3;i++) fEventTime[i] = 100+ev;
12}
13
14//______________________________________________________
15
17 fNofEntries = maxent;
18 fNofHits = 0;
19 fHits = new TClonesArray("TUsrHit", fNofEntries);
20 std::cout << "ctor TUsrHitBuffer " << this << std::endl;
21}
22
23//______________________________________________________
24
26 TClonesArray & hits = *fHits;
27 TUsrHit *hit = new(hits[fNofHits++]) TUsrHit(ev);
28 return hit;
29}
30
31//______________________________________________________
32
34 fHits->Clear();
35 fNofHits = 0;
36}
37
38//______________________________________________________
39
41 Clear();
42 std::cout << "TUsrSevtData1: " << ev << std::endl;
43 fTimeStamp = 100+ev; //in TMrbSubevent_Caen
44 fSevtName = "SubEvent_1_";
45 fSevtName += ev;
46 fMer = 1100 + ev;
47 fPileup = 2100 + ev;
48 for(Int_t i = 1; i <= ev+1; i++) {
50 }
51}
52//______________________________________________________
53
55 Clear();
56 std::cout << "TUsrSevtData2: " << ev << std::endl;
57 fTimeStamp = 100+ev; //in TMrbSubevent_Caen
58 fSevtName = "SubEvent_2_";
59 fSevtName += ev;
60 fMer = 21000 + ev;
61 fPileup = 22000 + ev;
62 for(Int_t i = 1; i <= ev+1; i++) {
64 }
65}
const char Option_t
Definition: RtypesCore.h:66
An array of clone (identical) objects.
Definition: TClonesArray.h:29
void Clear(Option_t *option="") override
Clear the clones array.
void Clear(Option_t *="")
Definition: clonesA_Event.h:51
TUsrHitBuffer fHitBuffer
Definition: clonesA_Event.h:56
friend class TClonesArray
Definition: TObject.h:228
TUsrHit * AddHit(Int_t ev)
void Clear(Option_t *opt="")
TUsrHitBuffer(Int_t maxent=10)
TClonesArray * fHits
Definition: clonesA_Event.h:39
TUsrHit(Int_t ev=0)
Int_t fEventNumber
Definition: clonesA_Event.h:10
Int_t fModuleNumber
Definition: clonesA_Event.h:11
UShort_t fEventTime[3]
Definition: clonesA_Event.h:13
Int_t fChannel
Definition: clonesA_Event.h:12
void SetEvent(Int_t ev)
TString fSevtName
Definition: clonesA_Event.h:72
void SetEvent(Int_t ev)
TString fSevtName
Definition: clonesA_Event.h:89