@@ -50,34 +50,16 @@ the TEventList object created in the above commands:
5050#include " TBuffer.h"
5151#include " TCut.h"
5252#include " TDirectory.h"
53- #include " TList.h"
54- #include " TMath.h"
55- #include " strlcpy.h"
56- #include " snprintf.h"
57-
58-
59- // //////////////////////////////////////////////////////////////////////////////
60- // / Default constructor for a EventList.
61-
62- TEventList::TEventList (): TNamed()
63- {
64- fN = 0 ;
65- fSize = 100 ;
66- fDelta = 100 ;
67- fList = nullptr ;
68- fDirectory = nullptr ;
69- fReapply = false ;
70- }
53+ #include " TCollection.h"
54+ #include " TMathBase.h"
7155
7256// //////////////////////////////////////////////////////////////////////////////
7357// / Create a EventList.
7458// /
7559// / This Eventlist is added to the list of objects in current directory.
7660
77- TEventList::TEventList (const char *name, const char *title, Int_t initsize, Int_t delta)
78- :TNamed(name,title), fReapply(false )
61+ TEventList::TEventList (const char *name, const char *title, Int_t initsize, Int_t delta) : TNamed(name, title)
7962{
80- fN = 0 ;
8163 if (initsize > 100 ) fSize = initsize;
8264 else fSize = 100 ;
8365 if (delta > 100 ) fDelta = delta;
@@ -90,12 +72,10 @@ TEventList::TEventList(const char *name, const char *title, Int_t initsize, Int_
9072// //////////////////////////////////////////////////////////////////////////////
9173// / Copy constructor.
9274
93- TEventList::TEventList (const TEventList &list) : TNamed(list)
75+ TEventList::TEventList (const TEventList &list)
76+ : TNamed(list), fN(list.fN ), fSize(list.fSize ), fDelta(list.fDelta ), fList(new Long64_t[fSize ])
9477{
95- fN = list.fN ;
96- fSize = list.fSize ;
97- fDelta = list.fDelta ;
98- fList = new Long64_t[fSize ];
78+
9979 for (Int_t i=0 ; i<fN ; i++)
10080 fList [i] = list.fList [i];
10181 fReapply = list.fReapply ;
@@ -107,9 +87,9 @@ TEventList::TEventList(const TEventList &list) : TNamed(list)
10787
10888TEventList::~TEventList ()
10989{
110- delete [] fList ; fList = nullptr ;
111- if (fDirectory ) fDirectory -> Remove ( this );
112- fDirectory = nullptr ;
90+ delete[] fList ;
91+ if (fDirectory )
92+ fDirectory -> Remove ( this ) ;
11393}
11494
11595// //////////////////////////////////////////////////////////////////////////////
0 commit comments