KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVList.cpp
Go to the documentation of this file.
1 #include "KVList.h"
2 
4 
5 
6 
7 
8 
13 {
14  // Default ctor.
15  // By default, a KVList owns its objects.
16  SetOwner(owner);
17 }
18 
19 
20 
22 
23 KVList::~KVList()
24 {
25 }
26 
27 
28 
31 
32 #include "Riostream.h"
33 void KVList::Streamer(TBuffer& R__b)
34 {
35  // Backwards-compatible streamer
36 
37  UInt_t R__s, R__c;
38  if (R__b.IsReading()) {
39  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
40  if (R__v < 3) {
41  // read in old KVList object which inherited from TList
42  TList list;
43  list.Streamer(R__b);
44  TQObjSender fQObj;
45  fQObj.Streamer(R__b);
46  SetOwner(list.IsOwner()); // was list owner of objects ?
47  list.SetOwner(kFALSE); // make sure old list doesn't delete objects when it goes out of scope
48  TIter next(&list);
49  TObject* obj;
50  while ((obj = next())) Add(obj);
51  list.Clear();
52  }
53  else
54  R__b.ReadClassBuffer(KVList::Class(), this, R__v, R__s, R__c);
55  }
56  else {
57  R__b.WriteClassBuffer(KVList::Class(), this);
58  }
59 }
60 
61 
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="")