KaliVeda
1.14/2
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVTemplateEvent.cpp
1
/***************************************************************************
2
$Id: KVEvent.cpp,v 1.41 2008/12/17 11:23:12 ebonnet Exp $
3
kvevent.cpp - description
4
-------------------
5
begin : Sun May 19 2002
6
copyright : (C) 2002 by J.D. Frankland
7
email : frankland@ganil.fr
8
***************************************************************************/
9
10
/***************************************************************************
11
* *
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
16
* *
17
***************************************************************************/
18
19
#include "KVTemplateEvent.h"
20
21
templateClassImp
(
KVTemplateEvent
)
22
23
24
/*
25
<h2>KVEvent</h2>
26
<h4>Base class for all types of multiparticle event consisting of KVNucleus objects</h4>
27
28
Particles are stored in a TClonesArray and KVEvent provides some basic
29
functionality for accessing and manipulating the list.
30
31
Events can be built using any class derived from KVNucleus to represent particles.
32
These classes can allocate memory in their default ctor: when filling events in a loop,
33
the same 'particle' objects are re-used for each new event, the ctor of each object will
34
only be called once when the object is first created (e.g. in the first event).
35
The particle class Clear() method will be called before each new event.
36
Therefore the cycle of use of the particle objects in a loop over many events is:
37
38
~~~~~~~~~~~~~~~
39
<particle ctor>
40
Building 1st event
41
<particle Clear()>
42
Building 2nd event
43
<particle Clear()>
44
...
45
Building last event
46
<particle dtor>
47
~~~~~~~~~~~~~~~
48
49
When writing events in a TTree, it is very important to call the TBranch::SetAutoDelete(kFALSE)
50
method of the branch which is used to store the event object.
51
52
If not, when the events are read back, the KVEvent constructor and destructor will be called
53
every time an event is read from the TTree meading to very slow reading times (& probably
54
memory leaks).
55
56
For this reason we provide the method:
57
58
~~~~~~~~~~~~~~~
59
void MakeEventBranch(TTree*, const TString&, const TString&, void*)
60
~~~~~~~~~~~~~~~
61
62
which should be used whenever it is required to stock KVEvent-derived objects in a TTree.
63
*/
65
templateClassImp
templateClassImp(THaarMatrixT)
KVTemplateEvent
Base class for event classes (containers for different types of particle objects)
Definition
KVTemplateEvent.h:91
kaliveda.doxygen
KVMultiDet
events
KVTemplateEvent.cpp
Generated on Wed Oct 23 2024 12:45:20 for KaliVeda by
1.9.8