25 ClassImp(TSelectorList);
33 Bool_t TSelectorList::UnsetDirectory(TObject *obj)
35 if (!obj || !obj->IsA())
39 callEnv.InitWithPrototype(obj->IsA(),
"SetDirectory",
"TDirectory*");
40 if (!callEnv.IsValid())
43 callEnv.SetParam((Long_t) 0);
55 Bool_t TSelectorList::CheckDuplicateName(TObject *obj)
60 TObject *org = FindObject(obj->GetName());
62 Error(
"CheckDuplicateName",
"object with name: %s already in the list",obj->GetName());
67 Error(
"CheckDuplicateName",
"an object with the same name: %s is already in the list",obj->GetName());
77 void TSelectorList::AddFirst(TObject *obj)
80 if (CheckDuplicateName(obj))
81 THashList::AddFirst(obj);
87 void TSelectorList::AddFirst(TObject *obj, Option_t *opt)
90 if (CheckDuplicateName(obj))
91 THashList::AddFirst(obj, opt);
97 void TSelectorList::AddLast(TObject *obj)
100 if (CheckDuplicateName(obj))
101 THashList::AddLast(obj);
107 void TSelectorList::AddLast(TObject *obj, Option_t *opt)
110 if (CheckDuplicateName(obj))
111 THashList::AddLast(obj, opt);
117 void TSelectorList::AddAt(TObject *obj, Int_t idx)
120 if (CheckDuplicateName(obj))
121 THashList::AddAt(obj, idx);
127 void TSelectorList::AddAfter(
const TObject *after, TObject *obj)
130 if (CheckDuplicateName(obj))
131 THashList::AddAfter(after, obj);
137 void TSelectorList::AddAfter(TObjLink *after, TObject *obj)
140 if (CheckDuplicateName(obj))
141 THashList::AddAfter(after, obj);
147 void TSelectorList::AddBefore(
const TObject *before, TObject *obj)
150 if (CheckDuplicateName(obj))
151 THashList::AddBefore(before, obj);
157 void TSelectorList::AddBefore(TObjLink *before, TObject *obj)
160 if (CheckDuplicateName(obj))
161 THashList::AddBefore(before, obj);