4 #ifndef __KVSEQCOLLECTION_H
5 #define __KVSEQCOLLECTION_H
7 #include "TSeqCollection.h"
93 RQ_OBJECT(
"KVSeqCollection")
115 TSeqCollection::Changed();
129 virtual void Copy(TObject& obj)
const;
153 virtual TObject*
At(Int_t idx)
const
163 if (
IsCleanup()) obj->SetBit(kMustCleanup);
173 if (
IsCleanup()) obj->SetBit(kMustCleanup);
177 virtual void AddAt(TObject* obj, Int_t idx)
183 if (
IsCleanup()) obj->SetBit(kMustCleanup);
187 virtual void AddAfter(
const TObject* after, TObject* obj)
193 if (
IsCleanup()) obj->SetBit(kMustCleanup);
197 virtual void AddBefore(
const TObject* before, TObject* obj)
203 if (
IsCleanup()) obj->SetBit(kMustCleanup);
207 virtual TObject*
Before(
const TObject* obj)
const
211 virtual TObject*
After(
const TObject* obj)
const
223 virtual void Add(TObject* obj)
229 if (
IsCleanup()) obj->SetBit(kMustCleanup);
233 virtual void Clear(Option_t* option =
"");
234 virtual void Delete(Option_t* option =
"");
235 virtual TObject**
GetObjectRef(
const TObject* obj)
const;
236 virtual TIterator*
MakeIterator(Bool_t dir = kIterForward)
const;
237 virtual TObject*
Remove(TObject* obj);
246 TSeqCollection::SetOwner(enable);
254 virtual void SetCleanup(Bool_t enable = kTRUE);
289 virtual TObject*
FindObjectAny(
const Char_t* att,
const Char_t* keys, Bool_t contains_all = kFALSE, Bool_t case_sensitive = kTRUE)
const;
291 #ifdef __WITHOUT_TCOLLECTION_GETENTRIES
293 virtual Int_t GetEntries()
const
298 virtual void Execute(
const char* method,
const char* params,
300 virtual void Execute(TMethod* method, TObjArray* params,
333 #if ROOT_VERSION_CODE < ROOT_VERSION(5,11,2)
340 #define R__FOR_EACH(type,proc) \
341 SetCurrentCollection(); \
342 TIter _NAME3_(nxt_,type,proc)(TCollection::GetCurrentCollection()); \
343 type *_NAME3_(obj_,type,proc); \
344 while ((_NAME3_(obj_,type,proc) = (type*) _NAME3_(nxt_,type,proc)())) \
345 _NAME3_(obj_,type,proc)->proc
KaliVeda extensions to ROOT collection classes.
virtual TObject * FindObjectByLabel(const Char_t *) const
static Long64_t fSCCounter
counter used to give unique names to all lists
const Char_t * CollectionClassName() const
virtual ~KVSeqCollection()
virtual void Copy(TObject &obj) const
KVSeqCollection * GetSubListWithName(const Char_t *retvalue) const
KVSeqCollection * GetSubListWithMethod(const Char_t *retvalue, const Char_t *method) const
KVSeqCollection & operator=(const KVSeqCollection &)
virtual TObject ** GetObjectRef(const TObject *obj) const
Return reference to object.
virtual TObject * Before(const TObject *obj) const
static TSeqCollection * fgCleanups
regroup all lists which are to be cleaned up
virtual void AddLast(TObject *obj)
T * get_object(const TString &name) const
virtual TObject * After(const TObject *obj) const
virtual void SendModifiedSignals(Bool_t yes=kTRUE)
virtual KVSeqCollection * NewCollectionLikeThisOne() const
virtual Bool_t IsCleanup() const
virtual void SetCollection(const Char_t *)
KVSeqCollection * GetSubListWithClass(const TClass *_class) const
TSeqCollection * fCollection
Pointer to embedded ROOT collection.
virtual TObject * Last() const
virtual void SetOwner(Bool_t enable=kTRUE)
virtual Bool_t IsSortable() const
virtual void Clear(Option_t *option="")
virtual Int_t GetSize() const
virtual TObject * At(Int_t idx) const
virtual TObject * FindObjectAny(const Char_t *att, const Char_t *keys, Bool_t contains_all=kFALSE, Bool_t case_sensitive=kTRUE) const
TObject * FindObjectByClass(const Char_t *) const
Return (first) object in embedded list with given class.
virtual void AddBefore(const TObject *before, TObject *obj)
virtual TObject * First() const
KVSeqCollection * GetSubListWithType(const Char_t *retvalue) const
virtual void AddAfter(const TObject *after, TObject *obj)
virtual void _GetSubListWithMethod(KVSeqCollection *, TCollection *, const Char_t *, const Char_t *) const
virtual void Execute(const char *method, const char *params, Int_t *error=0)
KVSeqCollection()
Default constructor.
virtual Bool_t IsSendingModifiedSignals() const
static void RehashCleanupList()
virtual TObject * FindObject(const TObject *obj) const
static Int_t fgCounter
counts instances
virtual void PrintCollectionHeader(Option_t *option) const
Overrides TCollection::PrintCollectionHeader to show the class name of the embedded list.
virtual void SetCleanup(Bool_t enable=kTRUE)
static KVSeqCollection * MakeListFromFileWithClass(TFile *file, const TClass *_class)
virtual TObject * FindObjectByNumber(UInt_t num) const
TSeqCollection * GetCollection() const
virtual TObject * FindObjectWithMethod(const Char_t *retvalue, const Char_t *method) const
static KVSeqCollection * MakeListFromFile(TFile *file)
virtual TObject * FindObjectByType(const Char_t *) const
virtual TObject * FindObjectByTitle(const Char_t *) const
Will return object with given title (value of TObject::GetTitle() method).
virtual void Add(TObject *obj)
virtual Bool_t IsSorted() const
virtual TObject * FindObjectByName(const Char_t *name) const
virtual TObject * FindObjectWithNameAndType(const Char_t *name, const Char_t *type) const
virtual void AddAt(TObject *obj, Int_t idx)
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Make and return iterator for the list.
KVSeqCollection * GetSubListWithLabel(const Char_t *retvalue) const
virtual void AddFirst(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from list.
virtual void Delete(Option_t *option="")
static KVSeqCollection * MakeListFromFileWithMethod(TFile *file, const Char_t *retvalue, const Char_t *method)
@ kCleanup
in ROOT v6 BIT(16) is used by TCollection - without changing the class version
void _GetSubListWithClass(KVSeqCollection *, TCollection *, const TClass *) const
virtual void RecursiveRemove(TObject *obj)
virtual TObject * FindObject(const char *name) const