KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVList.cpp
1#include "KVList.h"
2
4
5
6
9
11{
12 // Default ctor.
13 // By default, a KVList owns its objects.
14 SetOwner(owner);
15}
16
17
18
21
22#include "Riostream.h"
23void 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
bool Bool_t
short Version_t
Extended TList class which owns its objects by default.
Definition KVList.h:28
KaliVeda extensions to ROOT collection classes.
virtual void SetOwner(Bool_t enable=kTRUE)
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
Bool_t IsReading() const
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
static TClass * Class()
void Streamer(TBuffer &) override
virtual void SetOwner(Bool_t enable=kTRUE)
Bool_t IsOwner() const
void Streamer(TBuffer &) override
void Clear(Option_t *option="") override
void Streamer(TBuffer &) override
ClassImp(TPyArg)