TTree::Draw(myfunction.C+)

From: Carlos Munoz Camacho <cmunoz_at_clipper.ens.fr>
Date: Wed, 27 Apr 2005 17:07:52 +0200 (MEST)

Hi,

  I am trying to use TTree::Draw() to plot the function below. I have a ntuple (called tree) with variables x:y:z:e, and I try to plot the function mass.C (just for testing, it will of course more complicated later). I have problems at compilation (see below). Can you please give me a hint of what I'm doing wrong? This is root 4.03/04 on Linux.

Carlos

///////////mass.C //////////////

#include "TLorentzVector.h"

double mass() {

   TLorentzVector a(x,y,z,e);
   return a.M();
}

/////////////////

tree->Draw("mass.C+");

Info in <TUnixSystem::ACLiC>: creating shared library
/home/dvcs/bertin/PIO_AVRIL/./generatedSel_h.so

In file included from /work/dvcs/root/include/TVector3.h:16,
                 from /work/dvcs/root/include/TLorentzVector.h:38,
                 from /home/dvcs/bertin/PIO_AVRIL/sum.C:1,
                 from /home/dvcs/bertin/PIO_AVRIL/generatedSel.h:133,
                 from /home/dvcs/bertin/PIO_AVRIL/file5FfYpG.h:32,
                 from /home/dvcs/bertin/PIO_AVRIL/file5FfYpG.cxx:16:

/work/dvcs/root/include/TVector2.h:125: cannot declare member function `

   generatedSel::TVector2::operator=' within `generatedSel'
/work/dvcs/root/include/TVector2.h:126: cannot declare member function `

   generatedSel::TVector2::operator+=' within `generatedSel'
/work/dvcs/root/include/TVector2.h:127: cannot declare member function `

   generatedSel::TVector2::operator-=' within `generatedSel'
/work/dvcs/root/include/TVector2.h:131: cannot declare member function `

   generatedSel::TVector2::operator*=' within `generatedSel'
/work/dvcs/root/include/TVector2.h:133: cannot declare member function `

   generatedSel::TVector2::operator*=' within `generatedSel'
/work/dvcs/root/include/TVector2.h:134: cannot declare member function `

   generatedSel::TVector2::operator/=' within `generatedSel'
/work/dvcs/root/include/TVector2.h:138: `generatedSel::TVector2

etc etc.... Received on Wed Apr 27 2005 - 17:08:01 MEST

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