Dear RooTers,
This is probably a rookie’s stupid question, so sorry in advance.
I am using TTree::MakeClass to generate a .C and .h
file from a given tree (called “Data”). This tree contains
TH1 and TH2 histograms.
Here are the beginnigs of the files:
Data.h:
[code]//////////////////////////////////////////////////////////
// This class has been automatically generated
// (Fri Feb 13 17:21:13 2004 by ROOT version3.10/02)
// from TTree Data/Data
// found on file: /data/usr/lumi/data/Root/040201/21h.root
//////////////////////////////////////////////////////////
#ifndef Data_h
#define Data_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
class Data {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
//Declaration of leaves types
UInt_t TimeStamp_date;
[…]
TH2F *LED_ET1;
TH1F *TrainEtotY_Ped;
[…][/code]
Data.C:
[code]#define Data_cxx
#include “Data.h”
#include “TH2.h”
#include “TStyle.h”
#include “TCanvas.h”
void Data::Loop()
{
[…]
[/code]
Compilation with ACLiC fails:
[color=blue][size=75]Error: Symbol TH2F is not defined in current scope FILE:/afs/desy.de/user/s/specka/lumi/LOnlChx/LOnlClasses/Data.h LINE:99
Error: Symbol LED_ET1 is not defined in current scope FILE:/afs/desy.de/user/s/specka/lumi/LOnlChx/LOnlClasses/Data.h LINE:99
Error: Symbol TH1F is not defined in current scope FILE:/afs/desy.de/user/s/specka/lumi/LOnlChx/LOnlClasses/Data.h LINE:100
Error: Symbol TrainEtotY_Ped is not defined in current scope FILE:/afs/desy.de/user/s/specka/lumi/LOnlChx/LOnlClasses/Data.h LINE:100[/size][/color]
This comes as no surprise because the C precompiler pragma #include "TH2.h"
comes after #include “Data.h” in Data.C, and Data.h contains
no pragma #include “TH2.h” at all.
Changing the order of the pragmas by hand helps, of course.
Maybe there’s something wrong with my setup (include path etc.),
so that ACLiC does not know about TH2 (and TH1, and other RooT classes).
Thanks
Arnd