Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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.
void Clear(Option_t *option="") override
Clear the clones array.
void Clear(Option_t *="")
TUsrHitBuffer fHitBuffer
friend class TClonesArray
Definition TObject.h:240
TUsrHit * AddHit(Int_t ev)
void Clear(Option_t *opt="")
TUsrHitBuffer(Int_t maxent=10)
TClonesArray * fHits
TUsrHit(Int_t ev=0)
Int_t fEventNumber
Int_t fModuleNumber
UShort_t fEventTime[3]
Int_t fChannel
void SetEvent(Int_t ev)
TString fSevtName
void SetEvent(Int_t ev)
TString fSevtName