KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVList.cpp
Go to the documentation of this file.
1 #include "KVList.h"
2 
4 
5 
6 
11 {
12  // Default ctor.
13  // By default, a KVList owns its objects.
14  SetOwner(owner);
15 }
16 
17 
18 
21 
22 #include "Riostream.h"
23 void KVList::Streamer(TBuffer& R__b)
24 {
25  // Backwards-compatible streamer
26 
27  UInt_t R__s, R__c;
28  if (R__b.IsReading()) {
29  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
30  if (R__v < 3) {
31  // read in old KVList object which inherited from TList
32  TList list;
33  list.Streamer(R__b);
34  TQObjSender fQObj;
35  fQObj.Streamer(R__b);
36  SetOwner(list.IsOwner()); // was list owner of objects ?
37  list.SetOwner(kFALSE); // make sure old list doesn't delete objects when it goes out of scope
38  TIter next(&list);
39  TObject* obj;
40  while ((obj = next())) Add(obj);
41  list.Clear();
42  }
43  else
44  R__b.ReadClassBuffer(KVList::Class(), this, R__v, R__s, R__c);
45  }
46  else {
47  R__b.WriteClassBuffer(KVList::Class(), this);
48  }
49 }
50 
51 
unsigned int UInt_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
short Version_t
bool Bool_t
Extended TList class which owns its objects by default.
Definition: KVList.h:27
KaliVeda extensions to ROOT collection classes.
virtual void SetOwner(Bool_t enable=kTRUE)
virtual void Add(TObject *obj)
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
Bool_t IsReading() const
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void SetOwner(Bool_t enable=kTRUE)
Bool_t IsOwner() const
virtual void Clear(Option_t *option="")