42 fgCleanups->
SetName(
"KVSeqCollection_Cleanups");
43 gROOT->GetListOfCleanups()->Add(fgCleanups);
109 Error(
"SetCollection(const Char_t*)",
"Called for unknown class: %s",
113 if (!
cl->InheritsFrom(
"TSeqCollection")) {
114 Error(
"SetCollection(const Char_t*)",
115 "Called for class %s which does not inherit from TSeqCollection",
123 if (strcmp(
GetName(),
"KVSeqCollection"))
203 while ((
b = next())) {
205 copy.
Add(
b->Clone());
381 printf(
"Collection name='%s', embedded list class='%s', size=%d\n",
GetName(),
400 while ((obj = next())) {
420 while ((obj = next())) {
421 if (!strcmp(obj->
GetTitle(), title))
438 while ((obj = next())) {
439 if (obj->IsA() ==
cl)
return obj;
471 while ((obj = next())) {
473 if (!strcmp(((
KVBase*)obj)->GetLabel(), label))
return obj;
495 while ((obj = next())) {
497 if (((
KVBase*)obj)->GetNumber() == num)
return obj;
518 while ((obj = next())) {
547 if (retvalue && method) {
553 while ((obj = next())) {
560 if (ret !=
nullptr) {
576 if (ret == RV.
Atoi()) {
583 if (ret == RV.
Atof()) {
587 else Error(
"FindObjectWithMethod",
"Return type %d is not supported", (
int)mt.
ReturnType());
610 while ((obj = next())) {
611 obj->
Execute(method, params, error);
631 while ((obj = next())) {
632 obj->
Execute(method, params, error);
672 if (!strcmp(att,
"name")) char_test =
kName;
673 else if (!strcmp(att,
"title")) char_test =
kTitle;
674 else if (!strcmp(att,
"type")) char_test = kType;
675 else if (!strcmp(att,
"label")) char_test = kLabel;
676 else if (!strcmp(att,
"class")) char_test =
kClass;
684 unique_ptr<TObjArray> keywords(_keys.
Tokenize(
' '));
685 if (!keywords.get())
return nullptr;
687 if (!(nkeys = keywords->GetEntries())) {
695 while ((obj = next())) {
719 for (
int i = 0; i < nkeys; i++) {
722 if ((nmatches && !contains_all) || ((nmatches == nkeys) && contains_all)) {
765 while ((ob = next())) {
766 if (_class == ob->IsA()) outputList->
Add(ob);
847 if (retvalue && method) {
853 while ((ob = next())) {
867 if (RV == ret) outputList->
Add(ob);
876 if (ret == RV.
Atoi()) outputList->
Add(ob);
881 if (ret == RV.
Atof()) outputList->
Add(ob);
883 else std::cout <<
"this type is not supported " << (int)mt.
ReturnType() << std::endl;
1125 void KVSeqCollection::Streamer(
TBuffer& R__b)
1132 TSeqCollection::Streamer(R__b);
1136 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
1142 fQObject.Streamer(R__b);
1153 R__c = R__b.
WriteVersion(KVSeqCollection::IsA(), kTRUE);
1154 TSeqCollection::Streamer(R__b);
1155 fQObject.Streamer(R__b);
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
Base class for KaliVeda framework.
const Char_t * GetLabel() const
const Char_t * GetType() const
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
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.
static TSeqCollection * fgCleanups
regroup all lists which are to be cleaned up
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 void SetOwner(Bool_t enable=kTRUE)
virtual void Clear(Option_t *option="")
virtual Int_t GetSize() 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.
KVSeqCollection * GetSubListWithType(const Char_t *retvalue) const
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()
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
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 TObject * FindObjectWithNameAndType(const Char_t *name, const Char_t *type) const
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Make and return iterator for the list.
KVSeqCollection * GetSubListWithLabel(const Char_t *retvalue) const
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)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const char *classname)=0
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
static TClass * GetClass(Bool_t load=kTRUE, Bool_t silent=kFALSE)
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const=0
virtual const char * GetName() const
virtual void Clear(Option_t *option="")=0
void SetName(const char *name)
virtual void RecursiveRemove(TObject *obj)
virtual void Delete(Option_t *option="")=0
virtual TObject ** GetObjectRef(const TObject *obj) const=0
virtual void SetOwner(Bool_t enable=kTRUE)
virtual TObject * Remove(TObject *obj)=0
virtual Int_t GetSize() const
virtual TObject * ReadObj()
static const EReturnType kLong
void InitWithPrototype(const char *function, const char *proto, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
static const EReturnType kString
static const EReturnType kDouble
virtual const char * GetName() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Execute(const char *method, const char *params, Int_t *error=0)
virtual const char * ClassName() const
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Copy(TObject &object) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual const char * GetTitle() const
static void IndentLevel()
virtual void Add(TObject *obj)
TObjArray * Tokenize(const TString &delim) const
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Type GetType(const std::string &Name)