115 if (gDebug>1) Info(
"~TGo4Slot",
"%p Starting name = %s",
this,
GetFullName().Data());
119 if (gDebug>1) Info(
"~TGo4Slot",
"%p CleanProxy()",
this);
122 if (gDebug>1) Info(
"~TGo4Slot",
"%p Event(this, evDelete)",
this);
125 if (gDebug>1) Info(
"~TGo4Slot",
"%p DeleteChilds()",
this);
128 if (gDebug>1) Info(
"~TGo4Slot",
"%p Detach from parent",
this);
134 if (gDebug>1) Info(
"~TGo4Slot",
"%p fPars.Delete()",
this);
138 if (gDebug>1) Info(
"~TGo4Slot",
"%p Detach rest children",
this);
139 for (Int_t n=0;n<=
fChilds->GetLast();n++) {
141 if (child==0)
continue;
150 if (gDebug>1) Info(
"~TGo4Slot",
"%p Finish",
this);
198 if (parent==slot)
return kTRUE;
207 if (child==0)
return;
220 UInt_t len = startedwith==0 ? 0 : strlen(startedwith);
222 for(Int_t n =
NumChilds()-1; n>=0; n--) {
224 if (child==0)
continue;
226 Bool_t flag = (len==0) ||
227 ((len<strlen(child->GetName())) &&
228 (strncmp(child->GetName(), startedwith, len)==0));
244 if (child==0)
return -1;
253 if (child==0)
return 0;
261 if ((name==0) || (*name==0))
return 0;
263 for(Int_t n=0;n<num;n++) {
265 if (strcmp(slot->GetName(), name)==0)
return slot;
281 if (name.Length()>0) name +=
"/";
316 const char* contclass = (
fProxy!=0) ?
fProxy->ClassName() : 0;
318 SetPar(
"::ProxyClass", contclass);
328 const char* info = 0;
331 if (info==0) info = GetTitle();
419 const char* subname = 0;
436 const char* contclass =
GetPar(
"::ProxyClass");
437 TClass* cl = (contclass==0) ? 0 : gROOT->GetClass(contclass);
451 const char* spos = strchr(name,
'/');
453 if (spos==0) { len = strlen(name); subname=0; }
454 else { len = spos-name; subname=spos+1; }
455 UInt_t ulen = (UInt_t) len;
458 for(
int n=0;n<num;n++) {
460 const char* slotname = slot->GetName();
461 if ((strlen(slotname)==ulen) && (strncmp(slotname, name, len)==0))
return slot;
469 if ((name==0) || (*name==0))
return this;
471 const char* subname = 0;
475 if ((subslot==0) && force) {
477 if (subname==0) newname = name;
478 else newname.Append(name, subname-name-1);
479 subslot =
new TGo4Slot(
this, newname.Data(),
"folder");
482 return subslot==0 ? 0 : subslot->
GetSlot(subname, force);
488 while ((fullpath!=0) && (strlen(fullpath)>2)) {
490 if (strncmp(fullpath,
"./", 2) == 0) { fullpath += 2;
continue; }
493 if ((strncmp(fullpath,
"../", 3) == 0) &&
GetParent())
501 if (subname!=0) *subname = 0;
505 const char* curname = fullpath;
509 const char* nextname = 0;
511 if (nextslot==0)
break;
516 if (subname!=0) *subname = curname;
524 Int_t indx1 = (before==0) ? -1 :
fChilds->IndexOf(before);
525 Int_t indx2 = (slot==0) ? -1 :
fChilds->IndexOf(slot);
526 if ((indx1<0) || (indx2<0) || (indx1>indx2))
return kFALSE;
527 if (indx1==indx2)
return kTRUE;
529 for (
int n=indx2;n>indx1;n--)
530 (*
fChilds)[n] = (*fChilds)[n-1];
532 (*fChilds)[indx1] = slot;
540 Int_t indx1 = (slot==0) ? -1 :
fChilds->IndexOf(slot);
541 Int_t indx2 = (after==0) ? -1 :
fChilds->IndexOf(after);
542 if ((indx1<0) || (indx2<0) || (indx1>indx2))
return kFALSE;
544 if (indx1==indx2)
return kTRUE;
546 for (
int n=indx1;n<indx2;n++)
547 (*
fChilds)[n] = (*fChilds)[n+1];
548 (*fChilds)[indx2] = slot;
555 if (child==0)
return;
562 if ((child==0) || (
fChilds==0))
return;
573 Bool_t doforward = kTRUE;
600 while (iter.
next()) {
607 if ((name==0) || (*name==0))
return;
608 if (value==0) {
RemovePar(name);
return; }
610 TNamed* par = (TNamed*)
fPars.FindObject(name);
612 par->SetTitle(value);
614 fPars.Add(
new TNamed(name,value));
619 if ((name==0) || (*name==0))
return 0;
620 TNamed* par = (TNamed*)
fPars.FindObject(name);
621 return (par!=0) ? par->GetTitle() : 0;
626 if ((name==0) || (*name==0))
return;
627 TNamed* par = (TNamed*)
fPars.FindObject(name);
638 buf.Form(
"%d",value);
644 const char* strvalue =
GetPar(name);
645 if (strvalue==0)
return kFALSE;
646 value = atoi(strvalue);
652 for (
int n=0;n<=
fPars.GetLast();n++) {
653 TNamed* par = (TNamed*)
fPars.At(n);
655 printf(
"%*c%s = %s\n", level,
' ', par->GetName(), par->GetTitle());
661 return name==0 ? 0 : strrchr(name,
'/');
670 objectname = fullname;
672 foldername.Append(fullname, rslash-fullname);
673 objectname = (rslash+1);
Bool_t GetIntPar(const char *name, Int_t &value)
static const char * FindFolderSeparator(const char *name)
void SaveData(TDirectory *dir, Bool_t onlyobjs=kFALSE)
Bool_t HasSubLevels() const
virtual void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs)
virtual Bool_t isslotsfolder()
virtual TGo4Access * ProvideAccess(const char *)
void SetIntPar(const char *name, Int_t value)
TGo4SlotIter(const TGo4Slot *slot)
virtual TGo4Slot * getslot()
void DeleteChild(const char *name)
void SetProxy(TGo4Proxy *cont)
Bool_t HasSlotsSubLevels() const
Int_t GetSlotKind() const
TGo4Slot * FindSlot(const char *fullpath, const char **subname=0)
Int_t GetIndexOf(TGo4Slot *child)
virtual const char * GetContainedClassName()
virtual TGo4LevelIter * MakeIter()
TGo4LevelIter * MakeLevelIter() const
virtual Bool_t RemoveRegisteredObject(TObject *obj)
void PrintPars(Int_t level=3)
virtual void ProduceFullName(TString &name, TGo4Slot *toparent=0)
const char * GetSlotClassName() const
const char * GetPar(const char *name) const
void DeleteChilds(const char *startedwith=0)
virtual void Finalize(TGo4Slot *slot)
void RemoveChild(TGo4Slot *child)
virtual void Event(TGo4Slot *source, Int_t id, void *param=0)
Bool_t ShiftSlotBefore(TGo4Slot *slot, TGo4Slot *before)
void AddChild(TGo4Slot *child)
virtual const char * name()
virtual TGo4LevelIter * subiterator()
virtual Bool_t isfolder()
TObject * GetAssignedObject()
virtual void RecursiveRemove(TObject *obj)
virtual Bool_t HasSublevels() const
virtual const char * info()
Bool_t IsParent(const TGo4Slot *slot) const
TGo4Slot * FindChild(const char *name)
virtual const char * GetContainedObjectInfo()
virtual void Initialize(TGo4Slot *slot)
TGo4Slot * GetParent() const
virtual void Update(Bool_t strong=kFALSE)
virtual const char * GetClassName()
virtual Bool_t IsAcceptObject(TClass *cl)
TGo4Slot * GetSlot(const char *name, Bool_t force=kFALSE)
Bool_t ShiftSlotAfter(TGo4Slot *slot, TGo4Slot *after)
virtual Int_t GetObjectKind()
Int_t fAssignCnt
use in object manager to poll until object is assigned
void RemovePar(const char *name)
TGo4Slot * curSlot() const
TGo4Slot * DefineSubSlot(const char *name, const char *&subname) const
TGo4Slot * GetNextChild(TGo4Slot *child)
Bool_t DoingDelete() const
virtual void ReadData(TGo4Slot *slot, TDirectory *dir)
virtual Bool_t AssignObject(TGo4Slot *slot, TObject *obj, Bool_t owner)
void ReadData(TDirectory *dir)
virtual TObject * GetAssignedObject()
static void ProduceFolderAndName(const char *fullname, TString &foldername, TString &objectname)
virtual void Update(TGo4Slot *slot, Bool_t strong)
void ForwardEvent(TGo4Slot *source, Int_t id, void *param=0)
virtual void Delete(Option_t *opt="")
virtual Int_t GetObjectSizeInfo()
virtual void Print(Option_t *option) const
Bool_t AssignObject(TObject *obj, Bool_t owner)
TString GetFullName(TGo4Slot *toparent=0)
virtual Bool_t Use() const
virtual TGo4ObjectManager * GetOM() const
void SetPar(const char *name, const char *value)
TGo4Access * ProvideSlotAccess(const char *name)
TGo4Slot * GetChild(Int_t n) const
Bool_t IsAcceptObject(TClass *cl)
virtual Bool_t ProcessEvent(TGo4Slot *slot, TGo4Slot *source, Int_t id, void *param)
Bool_t next(Bool_t goesinto=kTRUE)