TTree Draw 5 variables

From: Andrea Massironi <andrea.massironi_at_cern.ch>
Date: Fri, 1 Oct 2010 15:09:07 +0200


Dear Rooters,

     I'm wondering if it's possible to use the "Draw" of a TTree with 5 variables with the "goff" option and then get the results with
"GetVal(Int_i i)", like in the following example.

I get the following error:

    Error in <TSelectorDraw::Begin>: Too many variables. Use the option     "para", "gl5d" or "candle" to display more than 4 variables.

even if in http://root.cern.ch/root/html/TTree.html I read

"Giving more than 4 variables without the option=para or

   option=candle or option=goff will produce an error."

But "goff" seems to be an available option.

Thanks,

     Andrea

    TTree* myTree = new TTree("myTree","myTree");

    double x,y,z,t,w;

    myTree->Branch("x",&x,"x/D");
    myTree->Branch("y",&x,"y/D");
    myTree->Branch("z",&x,"z/D");
    myTree->Branch("t",&x,"t/D");
    myTree->Branch("w",&x,"w/D");


    for (int i=0; i<100; i++){
      x = i;
      y = i+1;
      z = i+2;
      t = i+3;
      w = i+4;
      myTree->Fill();

    }

    myTree->Draw("x:y:z:t:w","","goff");

    Double_t *vX = myTree->GetVal(0);
    Double_t *vY = myTree->GetVal(1);
    Double_t *vZ = myTree->GetVal(2);
    Double_t *vT = myTree->GetVal(3);
    Double_t *vW = myTree->GetVal(4);
Received on Fri Oct 01 2010 - 15:09:18 CEST

This archive was generated by hypermail 2.2.0 : Fri Oct 01 2010 - 17:50:01 CEST