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++) {
49  fHitBuffer.AddHit(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++) {
63  fHitBuffer.AddHit(i);
64  }
65 }
TUsrHitBuffer::fNofEntries
Int_t fNofEntries
Definition: clonesA_Event.h:37
TUsrHitBuffer::fNofHits
Int_t fNofHits
Definition: clonesA_Event.h:38
Option_t
const char Option_t
Definition: RtypesCore.h:66
TUsrSevtData2::SetEvent
void SetEvent(Int_t ev)
Definition: clonesA_Event.cxx:54
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
TObject::TClonesArray
friend class TClonesArray
Definition: TObject.h:213
TUsrHit::TUsrHit
TUsrHit(Int_t ev=0)
Definition: clonesA_Event.cxx:7
TFile.h
TClonesArray.h
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::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::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
clonesA_Event.h
TUsrSevtData2::fPileup
Int_t fPileup
Definition: clonesA_Event.h:91
TUsrSevtData1::fMer
Int_t fMer
Definition: clonesA_Event.h:73
TUsrSevtData2::fSevtName
TString fSevtName
Definition: clonesA_Event.h:86
TUsrSevtData1::fPileup
Int_t fPileup
Definition: clonesA_Event.h:74
TClonesArray
An array of clone (identical) objects.
Definition: TClonesArray.h:29
TUsrHit::fChannel
Int_t fChannel
Definition: clonesA_Event.h:12
int
TMrbSubevent_Caen::Clear
void Clear(Option_t *="")
Definition: clonesA_Event.h:51
TClonesArray::Clear
virtual void Clear(Option_t *option="")
Clear the clones array.
Definition: TClonesArray.cxx:409