118 if (gDebug>1) Info(
"~TGo4Slot",
"%p Starting name = %s",
this,
GetFullName().Data());
122 if (gDebug>1) Info(
"~TGo4Slot",
"%p CleanProxy()",
this);
125 if (gDebug>1) Info(
"~TGo4Slot",
"%p Event(this, evDelete)",
this);
128 if (gDebug>1) Info(
"~TGo4Slot",
"%p DeleteChilds()",
this);
131 if (gDebug>1) Info(
"~TGo4Slot",
"%p Detach from parent",
this);
137 if (gDebug>1) Info(
"~TGo4Slot",
"%p fPars.Delete()",
this);
141 if (gDebug>1) Info(
"~TGo4Slot",
"%p Detach rest children",
this);
142 for (Int_t n=0;n<=
fChilds->GetLast();n++) {
144 if (child==0)
continue;
153 if (gDebug>1) Info(
"~TGo4Slot",
"%p Finish",
this);
201 if (parent==slot)
return kTRUE;
210 if (child==0)
return;
223 UInt_t len = startedwith==0 ? 0 : strlen(startedwith);
225 for(Int_t n =
NumChilds()-1; n>=0; n--) {
227 if (child==0)
continue;
229 Bool_t flag = (len==0) ||
230 ((len<strlen(child->GetName())) &&
231 (strncmp(child->GetName(), startedwith, len)==0));
247 if (child==0)
return -1;
256 if (child==0)
return 0;
264 if ((name==0) || (*name==0))
return 0;
266 for(Int_t n=0;n<num;n++) {
268 if (strcmp(slot->GetName(), name)==0)
return slot;
284 if (name.Length()>0) name +=
"/";
319 const char* contclass = (
fProxy!=0) ?
fProxy->ClassName() : 0;
321 SetPar(
"::ProxyClass", contclass);
331 const char* info = 0;
334 if (info==0) info = GetTitle();
368 if (owner)
delete obj;
423 const char* subname = 0;
440 const char* contclass =
GetPar(
"::ProxyClass");
441 TClass* cl = (contclass==0) ? 0 : gROOT->GetClass(contclass);
455 const char* spos = strchr(name,
'/');
457 if (spos==0) { len = strlen(name); subname=0; }
458 else { len = spos-name; subname=spos+1; }
459 UInt_t ulen = (UInt_t) len;
462 for(
int n=0;n<num;n++) {
464 const char* slotname = slot->GetName();
465 if ((strlen(slotname)==ulen) && (strncmp(slotname, name, len)==0))
return slot;
473 if ((name==0) || (*name==0))
return this;
475 const char* subname = 0;
479 if ((subslot==0) && force) {
481 if (subname==0) newname = name;
482 else newname.Append(name, subname-name-1);
483 subslot =
new TGo4Slot(
this, newname.Data(),
"folder");
486 return subslot==0 ? 0 : subslot->
GetSlot(subname, force);
492 while ((fullpath!=0) && (strlen(fullpath)>2)) {
494 if (strncmp(fullpath,
"./", 2) == 0) { fullpath += 2;
continue; }
497 if ((strncmp(fullpath,
"../", 3) == 0) &&
GetParent())
505 if (subname!=0) *subname = 0;
509 const char* curname = fullpath;
513 const char* nextname = 0;
515 if (nextslot==0)
break;
520 if (subname!=0) *subname = curname;
528 Int_t indx1 = (before==0) ? -1 :
fChilds->IndexOf(before);
529 Int_t indx2 = (slot==0) ? -1 :
fChilds->IndexOf(slot);
530 if ((indx1<0) || (indx2<0) || (indx1>indx2))
return kFALSE;
531 if (indx1==indx2)
return kTRUE;
533 for (
int n=indx2;n>indx1;n--)
534 (*
fChilds)[n] = (*fChilds)[n-1];
536 (*fChilds)[indx1] = slot;
544 Int_t indx1 = (slot==0) ? -1 :
fChilds->IndexOf(slot);
545 Int_t indx2 = (after==0) ? -1 :
fChilds->IndexOf(after);
546 if ((indx1<0) || (indx2<0) || (indx1>indx2))
return kFALSE;
548 if (indx1==indx2)
return kTRUE;
550 for (
int n=indx1;n<indx2;n++)
551 (*
fChilds)[n] = (*fChilds)[n+1];
552 (*fChilds)[indx2] = slot;
559 if (child==0)
return;
566 if ((child==0) || (
fChilds==0))
return;
577 Bool_t doforward = kTRUE;
604 while (iter.
next()) {
611 if ((name==0) || (*name==0))
return;
612 if (value==0) {
RemovePar(name);
return; }
614 TNamed* par = (TNamed*)
fPars.FindObject(name);
616 par->SetTitle(value);
618 fPars.Add(
new TNamed(name,value));
623 if ((name==0) || (*name==0))
return 0;
624 TNamed* par = (TNamed*)
fPars.FindObject(name);
625 return (par!=0) ? par->GetTitle() : 0;
630 if ((name==0) || (*name==0))
return;
631 TNamed* par = (TNamed*)
fPars.FindObject(name);
642 buf.Form(
"%d",value);
648 const char* strvalue =
GetPar(name);
649 if (strvalue==0)
return kFALSE;
650 value = atoi(strvalue);
656 for (
int n=0;n<=
fPars.GetLast();n++) {
657 TNamed* par = (TNamed*)
fPars.At(n);
659 printf(
"%*c%s = %s\n", level,
' ', par->GetName(), par->GetTitle());
665 return name==0 ? 0 : strrchr(name,
'/');
674 objectname = fullname;
676 foldername.Append(fullname, rslash-fullname);
677 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)