Hi So I am making a program looping through different TTree. I have some problems calling a Analysis.C macro (it is basically the standard MakeClass file with some edits)
It keeps complaining that the the function Analysis() and ~Analysis() is declared but not defined.
But they are in the header file attached.
I greatly appreciate any help!
root [0] .x GenerateAnalysis.C
Error: Analysis() declared but not defined GenerateAnalysis.C:42:
Error: ~Analysis() declared but not defined GenerateAnalysis.C:42:
*** Interpreter error recovered ***
Abs Directory: /Users/Documents/MadGraph/MG5_aMC_v2_2_3/PROC_New_Resonances_UFO_0/Events/mass500/tag_2_pythia_lhe_events.rootAnalysis Name: :Analysis500T: 0x7fd7fd771ae0root [1]
//
// GenerateAnalysis.C
//
////
//
#include <stdio.h>
#include “TFile.h”
#include
#include “TTree.h”
#include “TSystem.h”
#include “Analysis.h”
using namespace std;
void GenerateAnalysis(void);
void GenerateAnalysis(void)
{
string Dr="/Users/Documents/MadGraph/MG5_aMC_v2_2_3/PROC_New_Resonances_UFO_0/Events/mass";
string MassNumber[20]={“250”,“500”,“1000”,“1500”,“3000”,“3500”,“4000”,“4500”,“5000”,“5500”, “6000”,“6500”,“7000”};
string FileName="/tag_2_pythia_lhe_events.root";
string AbsDirectory;
string AnalysisName;
// int i=1;
for (int i =0; i<13; i++)
{
AbsDirectory=Dr+MassNumber[i]+FileName;
AnalysisName=“Analysis”+MassNumber[i];
cout<<"Abs Directory: "<<AbsDirectory;
cout<<“Analysis Name: :”<<AnalysisName;
gSystem->CompileMacro("Analysis.C","k");
//.L Analysis.C;
TFile *f = new TFile(AbsDirectory.c_str());
TTree *T;
f ->GetObject("LHEF",T);
cout<<"T: "<<T;
Analysis t;
t.Analysis(T);
}
}
Analysis.h (10.3 KB)