Problem with code generated by MakeClass

Hello,

I created a heather file and .C file with MakeClass from an ntuple (see attached files). The problem is that I cannot add an extra function to what MakeClass provided me. I get a segmentation violation when loading the code in the interpreter. Then, I tried to create a global function (MassCollinearCore in the heather file) but there is still a segmentation violation (with not much information).

How can I do to get this function in my environment.

I’m using the interpreter of root 6.04/16.

Many thanks in advance, Pilar___
ROOT Version: 6.04/16
Platform: Tier3 machines at pic, Barcelona
WeightAnalysis_Res__ntuple.C (5.4 KB)
WeightAnalysis_Res__ntuple.h (11.4 KB)
Compiler: 6.04.16-x86_64-slc6-gcc49-opt


ROOT 6.04/16 is very old. You should try the newest version.

In the “WeightAnalysis_Res__ntuple.h” file, add:

#include "TLorentzVector.h"
#include <iostream>

In the “WeightAnalysis_Res__ntuple.C” file, you must define the type of the “resultMass”:

bool resultMass = MassCollinearCore(...);

Then you should try to precompile your code using ACLiC (this will let the compiler find the remaining problems):

root [0] .L WeightAnalysis_Res__ntuple.C++

In particular, it complains that “met_HPTO” (in line 140) and “met” (in line 136) may be used uninitialized.

Many thanks!!! Pilar

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.