17 #include "TObjArray.h"
20 #include "TPaveText.h"
21 #include "TObjString.h"
42 fIter = pad->GetListOfPrimitives()->MakeIterator();
43 fStacks.SetOwner(kTRUE);
56 fCurrent = fIter->Next();
58 if (fCurrent==0)
break;
60 TFrame* fr =
dynamic_cast<TFrame*
>(
fCurrent);
61 if (fr!=0) { skip =
true;
continue; }
63 TPaveText* ptxt =
dynamic_cast<TPaveText*
> (
fCurrent);
64 if ((ptxt!=0) && (strcmp(ptxt->GetName(),
"title")==0)) { skip =
true;
continue; }
66 if (dynamic_cast<TPave*>(fCurrent) != 0) { skip =
true;
continue; }
68 if (fCurrent->GetName()==0) { skip =
true;
continue; }
70 if (strlen(fCurrent->GetName())==0) { skip =
true;
continue; }
72 if (strcmp(fCurrent->GetName(), fCurrent->ClassName())==0) { skip =
true;
continue; }
75 if (fStacks.FindObject(fCurrent->GetName()) && fCurrent->InheritsFrom(TH1F::Class())) { skip =
true;
continue; }
79 if (fCurrent && fCurrent->InheritsFrom(THStack::Class()))
80 fStacks.Add(
new TObjString(fCurrent->GetName()));
87 return (dynamic_cast<TPad*>(fCurrent)!=0) ||
88 (
dynamic_cast<THStack*
>(
fCurrent)!=0);
93 TPad* subpad =
dynamic_cast<TPad*
>(
fCurrent);
95 THStack* hs =
dynamic_cast<THStack*
> (
fCurrent);
102 return fCurrent->GetName();
107 return fCurrent->ClassName();
117 return fCurrent->ClassName();
175 const char* objname = 0;
180 slot->
SetPar(
"CanvasProxy::CanvasName", objname);
182 if ((dir==0) || (
fCanvas==0))
return;
191 const char* objname = slot->
GetPar(
"CanvasProxy::CanvasName");
192 if ((objname==0) || (dir==0))
return;
201 return (cl!=0) && cl->InheritsFrom(TCanvas::Class());
209 fCanvas =
dynamic_cast<TCanvas*
> (obj);
212 if ((
fCanvas==0) && (obj!=0) && owner)
delete obj;
228 if (canv==0)
return 0;
232 const char* curname = name;
235 const char* slash = strchr(curname,
'/');
236 UInt_t len = (slash!=0) ? slash - curname : strlen(curname);
237 TIter iter(curpad->GetListOfPrimitives());
239 while ((obj = iter())!=0)
240 if ((strlen(obj->GetName())==len) &&
241 (strncmp(obj->GetName(), curname, len)==0))
break;
242 if (obj==0)
return 0;
250 curpad =
dynamic_cast<TPad*
>(obj);
253 THStack* hs =
dynamic_cast<THStack*
> (obj);
virtual void Initialize(TGo4Slot *slot)
virtual void ReadData(TGo4Slot *slot, TDirectory *dir)
virtual void Finalize(TGo4Slot *slot)
void UnregisterObject(TObject *obj, TGo4Slot *slot)
virtual Bool_t isfolder()
virtual const char * name()
static TGo4LevelIter * ProduceIter(THStack *canv)
virtual ~TGo4CanvasLevelIter()
static TGo4Access * CreateAccess(TCanvas *canv, const char *name)
const char * GetPar(const char *name) const
void RegisterObjectWith(TObject *obj, TGo4Slot *slot)
virtual const char * info()
static TGo4LevelIter * ProduceIter(TCanvas *canv)
virtual Int_t GetObjectKind()
virtual ~TGo4CanvasProxy()
virtual void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs)
virtual Bool_t RemoveRegisteredObject(TObject *obj)
virtual TObject * GetAssignedObject()
virtual Bool_t IsAcceptObject(TClass *cl)
virtual TGo4LevelIter * subiterator()
static TGo4Access * CreateAccess(THStack *canv, const char *name)
void ForwardEvent(TGo4Slot *source, Int_t id, void *param=0)
virtual const char * GetContainedClassName()
virtual TGo4ObjectManager * GetOM() const
void SetPar(const char *name, const char *value)
virtual const char * GetClassName()
virtual Bool_t AssignObject(TGo4Slot *slot, TObject *obj, Bool_t owner)
TGo4CanvasLevelIter(TPad *pad)