GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4DrawObjProxy.cxx
Go to the documentation of this file.
1 // $Id: TGo4DrawObjProxy.cxx 478 2009-10-29 12:26:09Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TGo4DrawObjProxy.h"
15 
16 #include "TList.h"
17 #include "THStack.h"
18 #include "TMultiGraph.h"
19 
20 TGo4DrawObjProxy::TGo4DrawObjProxy(TObject* obj, Bool_t owner, Bool_t doclear) :
21  TGo4ObjectProxy(obj, owner),
22  fDoClear(doclear)
23 {
24 }
25 
27 {
29 }
30 
32 {
33  if (obj == fObject) TryToClearObject();
35 }
36 
38 {
39  if (fObject==0) return;
40  if (fObject->InheritsFrom(THStack::Class())) {
41  THStack* hs = (THStack*) fObject;
42  if (hs->GetHists())
43  hs->GetHists()->Clear();
44  } else
45  if (fObject->InheritsFrom(TMultiGraph::Class())) {
46  TMultiGraph* mgr = (TMultiGraph*) fObject;
47  if (mgr->GetListOfGraphs())
48  mgr->GetListOfGraphs()->Clear();
49  }
50 }
virtual ~TGo4DrawObjProxy()
virtual Bool_t RemoveRegisteredObject(TObject *obj)
TGo4DrawObjProxy(TObject *obj, Bool_t owner, Bool_t doclear=kFALSE)
virtual Bool_t RemoveRegisteredObject(TObject *obj)