options drawing multigraphs

From: Mateusz Ploskon <M.Ploskon_at_gsi.de>
Date: Tue, 12 Apr 2005 11:40:42 +0200


Please consider following:

root [7] TH1F *alax = new TH1F("alax","alax", 12,10,111);
root [8] alax->SetOption("la")
root [9] alax->GetOption()

(const Option_t* 0x90d16ec)"la"

root [10] alax->SetDrawOption("la")
root [11] alax->GetDrawOption()
(const Option_t* 0xd0b416)""

Actually, my question is how can I get the option of a TGraph which is owned by a TMultiGraph...
What's wrong with the following code(?) for example:

  TMultiGraph *tmgr = new ....
  tmgr->Add(..., "L");

        ...
  TList *hlist = (TList*)tmgr->GetListOfGraphs();   TIter *hiter = new TIter(hlist);

  TGraph *hist = 0;
  hiter->Reset();
  while ((hist = (TGraph*)hiter->Next()) != NULL)     {

      cout << "Draw option?" << hist->GetTitle() << " " << hist->GetDrawOption() << endl;
      // nothing... :(

    }

On a side I have the impression that this option'ing stuff is a bit messy...

my best!
m.

PS I've read the sources of TObject etc...

-- 
Mateusz Ploskon
GSI KP1 Planckstrasse 1
D-64291 Darmstadt
tel.: +49-6159-71-2914
Received on Tue Apr 12 2005 - 11:40:57 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET