[root] / trunk / hist / hist / src / TMultiGraph.cxx Repository:
ViewVC logotype

Diff of /trunk/hist/hist/src/TMultiGraph.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4915, Mon Jul 15 15:03:38 2002 UTC revision 5552, Wed Nov 6 21:16:43 2002 UTC
# Line 1  Line 1 
1  // @(#)root/graf:$Name:  $:$Id: TMultiGraph.cxx,v 1.9 2002/02/24 18:01:15 brun Exp $  // @(#)root/graf:$Name:  $:$Id: TMultiGraph.cxx,v 1.10 2002/07/15 15:03:38 brun Exp $
2  // Author: Rene Brun   12/10/2000  // Author: Rene Brun   12/10/2000
3    
4  /*************************************************************************  /*************************************************************************
# Line 70  Line 70 
70    
71    
72     if (!fGraphs) return;     if (!fGraphs) return;
73       TGraph *g;
74       TIter   next(fGraphs);
75       while ((g = (TGraph*) next())) {
76         g->ResetBit(kMustCleanup);
77       }
78     fGraphs->Delete();     fGraphs->Delete();
79     delete fGraphs;     delete fGraphs;
80     fGraphs = 0;     fGraphs = 0;
# Line 83  Line 88 
88     // add a new graph to the list of graphs     // add a new graph to the list of graphs
89    
90     if (!fGraphs) fGraphs = new TList();     if (!fGraphs) fGraphs = new TList();
91       graph->SetBit(kMustCleanup);
92     fGraphs->Add(graph,chopt);     fGraphs->Add(graph,chopt);
93  }  }
94    
# Line 181  Line 187 
187  {  {
188  // paint all the graphs of this multigraph  // paint all the graphs of this multigraph
189    
190      if (fGraphs->GetSize() == 0) return;
191    
192    char *l;    char *l;
193    static char chopt[33];    static char chopt[33];
194    Int_t nch = strlen(option);    Int_t nch = strlen(option);
# Line 334  Line 342 
342  }  }
343    
344  //______________________________________________________________________________  //______________________________________________________________________________
345    void TMultiGraph::RecursiveRemove(TObject *obj)
346    {
347       // Recursively remove this object from a list. Typically implemented
348       // by classes that can contain mulitple references to a same object.
349    
350       if (!fGraphs) return;
351       TObject *objr = fGraphs->Remove(obj);
352       if (!objr) return;
353       delete fHistogram; fHistogram = 0;
354       if (gPad) gPad->Modified();
355    }
356    
357    //______________________________________________________________________________
358  void TMultiGraph::SavePrimitive(ofstream &out, Option_t *option)  void TMultiGraph::SavePrimitive(ofstream &out, Option_t *option)
359  {  {
360      // Save primitive as a C++ statement(s) on output stream out      // Save primitive as a C++ statement(s) on output stream out

Legend:
Removed from v.4915  
changed lines
  Added in v.5552

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9