a question of <fstream> used in makeselector analyse file

From: Zhijun Liang <Zhijun.Liang_at_cern.ch>
Date: Thu, 12 Oct 2006 14:30:44 +0200


dear all:
I meet some problem in using fstream object in files generated by makeselector or makeclass . could you help me?
for example :in tutorial directory
""
TFile f("tree1.root");
t1->MakeSelector("ana");
""
and then I add 4 lines in ana.C to do file output .

"""
#include "ana.h"
#include <TH2.h>
#include <TStyle.h>
#include <fstream.h> //the line I added in ana.C
#include <iostream.h> //the line I added in ana.C
ofstream output("out.txt",ios::out); //the line I added in ana.C output<<"the output text"; //the line I added in ana.C """
and then I use
"'
TFile f("tree1.root");
t1->process("ana.C+");
""
error message is :
Error: Symbol output is not defined in current scope ana.C:32: Error: << Illegal operator for pointer 3 ana.C:32:

it seems the fstream can not be used in makeselector files ,could you help me? thank you

best regards
Liang Received on Thu Oct 12 2006 - 14:30:50 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET