Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
clones_event.cxx
Go to the documentation of this file.
1#include "TFile.h"
2#include "TClonesArray.h"
3#include "clones_event.h"
4
5////////////////////////////////////////////////////////////////////////////////
6
8{
9 fEventNumber = ev;
10 fModuleNumber = ev%4;
11 fChannel = ev+1000;
12 for (Int_t i = 0; i < 3; i++)
13 fEventTime[i] = 100 + ev;
14}
15
16//______________________________________________________
17
19{
20 fNofEntries = maxent;
21 fNofHits = 0;
22 fHits = new TClonesArray("TUsrHit", fNofEntries);
23 std::cout << "ctor TUsrHitBuffer " << this << std::endl;
24}
25
26//______________________________________________________
27
29{
30 TClonesArray & hits = *fHits;
31 TUsrHit *hit = new(hits[fNofHits++]) TUsrHit(ev);
32 return hit;
33}
34
35//______________________________________________________
36
38{
39 fHits->Clear();
40 fNofHits = 0;
41}
42
43//______________________________________________________
44
46{
47 Clear();
48 std::cout << "TUsrSevtData1: " << ev << std::endl;
49 fTimeStamp = 100 + ev; //in TMrbSubevent_Caen
50 fSevtName = "SubEvent_1_";
51 fSevtName += ev;
52 fMer = 1100 + ev;
53 fPileup = 2100 + ev;
54 for (Int_t i = 1; i <= ev+1; i++) {
56 }
57}
58//______________________________________________________
59
61{
62 Clear();
63 std::cout << "TUsrSevtData2: " << ev << std::endl;
64 fTimeStamp = 100 + ev; //in TMrbSubevent_Caen
65 fSevtName = "SubEvent_2_";
66 fSevtName += ev;
67 fMer = 21000 + ev;
68 fPileup = 22000 + ev;
69 for (Int_t i = 1; i <= ev+1; i++) {
71 }
72}
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