ROOT
Version v6.32
master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
v6.04
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
►
core
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
html
►
io
►
main
►
math
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
▼
tutorials
►
cocoa
►
cont
►
dataframe
►
eve
►
eve7
►
fft
►
fit
►
fitsio
►
foam
►
geom
►
gl
►
graphics
►
graphs
►
gui
►
hist
►
histfactory
►
html
►
http
►
image
►
io
►
legacy
►
math
►
matrix
►
mc
►
multicore
►
net
►
physics
►
proof
►
pyroot
►
pythia
►
quadp
►
r
►
rcanvas
►
roofit
►
roostats
►
spectrum
►
splot
►
sql
►
tmva
▼
tree
►
dictionary
basic.C
basic2.C
bill.C
cernbuild.C
cernstaff.C
circular.C
clonesA_Event.C
clonesA_Event.cxx
►
clonesA_Event.h
copytree.C
copytree2.C
copytree3.C
drawsparse.C
h1analysis.C
►
h1analysis.h
h1analysisProxy.C
►
h1analysisProxy.h
►
h1analysisProxyCut.C
h1analysisTreeReader.C
►
h1analysisTreeReader.h
h1chain.C
hsimpleProxy.C
hsimpleProxyDriver.C
hsimpleReader.C
htest.C
hvector.C
JetEvent.cxx
►
JetEvent.h
jets.C
ntuple1.C
parallelcoord.C
parallelcoordtrans.C
printSizes.C
run_h1analysis.C
spider.C
staff.C
tcl.C
temperature.C
tree.C
tree0.C
tree1.C
tree2.C
tree2a.C
tree3.C
tree4.C
treefriend.C
treegetval.C
►
tv3.C
►
tvdemo.C
►
unfold
►
unuran
►
v7
►
vecops
►
webgui
►
xml
.rootlogon.py
demos.C
demoshelp.C
hsimple.C
rootlogoff.C
rootlogon.C
►
v6-32-00-patches
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
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
7
TUsrHit::TUsrHit
(
Int_t
ev
) {
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
16
TUsrHitBuffer::TUsrHitBuffer
(
Int_t
maxent
) {
17
fNofEntries
=
maxent
;
18
fNofHits
= 0;
19
fHits
=
new
TClonesArray
(
"TUsrHit"
,
fNofEntries
);
20
std::cout <<
"ctor TUsrHitBuffer "
<<
this
<< std::endl;
21
}
22
23
//______________________________________________________
24
25
TUsrHit
*
TUsrHitBuffer::AddHit
(
Int_t
ev
) {
26
TClonesArray
&
hits
= *
fHits
;
27
TUsrHit
*
hit
=
new
(
hits
[
fNofHits
++])
TUsrHit
(
ev
);
28
return
hit
;
29
}
30
31
//______________________________________________________
32
33
void
TUsrHitBuffer::Clear
(
Option_t
*) {
34
fHits
->
Clear
();
35
fNofHits
= 0;
36
}
37
38
//______________________________________________________
39
40
void
TUsrSevtData1::SetEvent
(
Int_t
ev
) {
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
54
void
TUsrSevtData2::SetEvent
(
Int_t
ev
) {
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
}
Option_t
const char Option_t
Definition
RtypesCore.h:66
TClonesArray.h
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
TFile.h
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TClonesArray
An array of clone (identical) objects.
Definition
TClonesArray.h:29
TClonesArray::Clear
void Clear(Option_t *option="") override
Clear the clones array.
Definition
TClonesArray.cxx:409
TMrbSubevent_Caen::Clear
void Clear(Option_t *="")
Definition
clonesA_Event.h:51
TMrbSubevent_Caen::fTimeStamp
Int_t fTimeStamp
Definition
clonesA_Event.h:55
TMrbSubevent_Caen::fHitBuffer
TUsrHitBuffer fHitBuffer
Definition
clonesA_Event.h:56
TObject::TClonesArray
friend class TClonesArray
Definition
TObject.h:240
TUsrHitBuffer::fNofEntries
Int_t fNofEntries
Definition
clonesA_Event.h:37
TUsrHitBuffer::AddHit
TUsrHit * AddHit(Int_t ev)
Definition
clonesA_Event.cxx:25
TUsrHitBuffer::Clear
void Clear(Option_t *opt="")
Definition
clonesA_Event.cxx:33
TUsrHitBuffer::TUsrHitBuffer
TUsrHitBuffer(Int_t maxent=10)
Definition
clonesA_Event.cxx:16
TUsrHitBuffer::fNofHits
Int_t fNofHits
Definition
clonesA_Event.h:38
TUsrHitBuffer::fHits
TClonesArray * fHits
Definition
clonesA_Event.h:39
TUsrHit
Definition
clonesA_Event.h:4
TUsrHit::TUsrHit
TUsrHit(Int_t ev=0)
Definition
clonesA_Event.cxx:7
TUsrHit::fEventNumber
Int_t fEventNumber
Definition
clonesA_Event.h:10
TUsrHit::fModuleNumber
Int_t fModuleNumber
Definition
clonesA_Event.h:11
TUsrHit::fEventTime
UShort_t fEventTime[3]
Definition
clonesA_Event.h:13
TUsrHit::fChannel
Int_t fChannel
Definition
clonesA_Event.h:12
TUsrSevtData1::fPileup
Int_t fPileup
Definition
clonesA_Event.h:74
TUsrSevtData1::fMer
Int_t fMer
Definition
clonesA_Event.h:73
TUsrSevtData1::SetEvent
void SetEvent(Int_t ev)
Definition
clonesA_Event.cxx:40
TUsrSevtData1::fSevtName
TString fSevtName
Definition
clonesA_Event.h:72
TUsrSevtData2::fPileup
Int_t fPileup
Definition
clonesA_Event.h:91
TUsrSevtData2::fMer
Int_t fMer
Definition
clonesA_Event.h:90
TUsrSevtData2::SetEvent
void SetEvent(Int_t ev)
Definition
clonesA_Event.cxx:54
TUsrSevtData2::fSevtName
TString fSevtName
Definition
clonesA_Event.h:89
int
clonesA_Event.h
tutorials
tree
clonesA_Event.cxx
ROOT v6-32 - Reference Guide Generated on Fri Feb 28 2025 14:27:03 (GVA Time) using Doxygen 1.10.0