17 #include "TDirectory.h"
73 ((TH1*)
fObject)->SetDirectory(0);
111 const char* objname = 0;
116 slot->
SetPar(
"ObjectProxy::ObjName", objname);
118 if ((dir==0) || (
fObject==0))
return;
122 if (
fObject->InheritsFrom(TH1::Class())) {
124 TDirectory* olddir = h1->GetDirectory();
126 h1->SetDirectory(olddir);
134 const char* objname = slot->
GetPar(
"ObjectProxy::ObjName");
135 if ((objname==0) || (dir==0))
return;
166 return (cl!=0) && cl->InheritsFrom(TObject::Class());
177 ((TH1*)
fObject)->SetDirectory(0);
194 if (obj==0)
return 0;
196 Long_t sz = obj->IsA()->Size();
198 if (obj->InheritsFrom(TH1::Class())) {
199 TH1* histo =
dynamic_cast<TH1*
> (obj);
200 Int_t nbins = histo->GetNbinsX()+2;
201 if (histo->GetDimension()>1)
202 nbins = nbins*(histo->GetNbinsY()+2);
203 if (histo->GetDimension()>2)
204 nbins = nbins * (histo->GetNbinsZ()+2);
206 if (strchr(histo->ClassName(),
'S')!=0) binsize =
sizeof(Short_t);
else
207 if (strchr(histo->ClassName(),
'D')!=0) binsize =
sizeof(Double_t);
else
208 if (strchr(histo->ClassName(),
'F')!=0) binsize =
sizeof(Float_t);
else
209 if (strchr(histo->ClassName(),
'I')!=0) binsize =
sizeof(Int_t);
else
210 if (strchr(histo->ClassName(),
'C')!=0) binsize =
sizeof(Char_t);
211 sz += binsize * nbins;
213 if (obj->InheritsFrom(TTree::Class())) {
214 TTree* t = (TTree*) obj;
215 sz += t->GetZipBytes();
217 if (obj->InheritsFrom(TGo4Picture::Class())) {
virtual Bool_t IsAcceptObject(TClass *cl)
void UnregisterObject(TObject *obj, TGo4Slot *slot)
virtual Bool_t CanGetObject() const
virtual void ReadData(TGo4Slot *slot, TDirectory *dir)
virtual const char * GetContainedClassName()
virtual Bool_t GetObject(TObject *&obj, Bool_t &owner) const
const char * GetPar(const char *name) const
static Long_t DefineObjectSize(TObject *obj)
virtual const char * GetObjectName() const
virtual Bool_t AssignObject(TGo4Slot *slot, TObject *obj, Bool_t owner)
void RegisterObjectWith(TObject *obj, TGo4Slot *slot)
virtual const char * GetContainedObjectInfo()
virtual void Initialize(TGo4Slot *slot)
virtual TClass * GetObjectClass() const
virtual void Finalize(TGo4Slot *slot)
virtual Int_t GetObjectSizeInfo()
virtual const char * GetObjectClassName() const
virtual Int_t GetObjectKind()
virtual TGo4Access * ProvideAccess(const char *name)
virtual void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs)
void ForwardEvent(TGo4Slot *source, Int_t id, void *param=0)
virtual Int_t GetObjectSizeInfo()
virtual TObject * GetAssignedObject()
virtual TGo4ObjectManager * GetOM() const
void SetPar(const char *name, const char *value)
TGo4ObjectAccess(TObject *obj)
virtual Bool_t RemoveRegisteredObject(TObject *obj)
virtual ~TGo4ObjectProxy()