Alt$(primary, alternate) for TTree::Draw() not defined in current scope?

From: Matt Dunkman <mgdunkma_at_mtu.edu>
Date: Tue, 8 Jul 2008 18:33:00 -0400


Dear ROOTers,

I have been having an issue using the alternate function of TTree::Draw, specifically it complains:

Error: Function Alt$("b_u30->En",0) is not defined in current scope (tmpfile):1:

Here is a sample macro...

{

	TFile inputFile("June27_20km.root");
	TTree *inputTree = (TTree*)inputFile->Get("events");


//this draw works:
inputTree->Draw("b_u20->En");
//but when I try to use Alt$ as defined in TTree::Draw() it fails.
inputTree->Draw(Alt$("b_u20->En", 0));

}

Where b_u20 is a branch, and En a leaf on that branch.

Is there a simple #include statement needed (I am attempting to use it in a compiled program)? I am currently including the following



TApplication
TH1F
TH2F
TF1
TFile
TTree
TCanvas
TPad
TPaveStats

Thanks,
Matt Received on Wed Jul 09 2008 - 00:33:29 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 09 2008 - 05:50:03 CEST