Hi,
I have loaded a ‘.cxx’ file in my roofit macro the following way: #ifdefCINT
gROOT->ProcessLineSync(".L RoodMyRBW.cxx+") ; #endif
I am trying to run my roofit macro in root V 6.14 in a mac OS machine. I am getting following error message when I try to call a function from this ‘RoodMyRBW.cxx’ file.
rocessing MLfit2dw.C…
In file included from input_line_10:1:
/Users/vindy/Documents/bes3/dalitz/dtowphi/Fit/MLfit2dw.C:34:3:error:unknown type name 'RoodMyRBW’
IncrementalExecutor::executeFunction: symbol ‘ZN9RoodMyRBWC1EPKcS1_R10RooAbsRealS3_S3’ unresolved while linking [cling interface function]!
You are probably missing the definition of RoodMyRBW::RoodMyRBW(char const*, char const*, RooAbsReal&, RooAbsReal&, RooAbsReal&)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol ‘_ZTV9RoodMyRBW’ unresolved while linking [cling interface function]!
You are probably missing the definition of vtable for RoodMyRBW
Maybe you need to load the corresponding shared library?
My short code snippet can be seen below:
#include “RoodMyRBW.h”
void MLfit2dw()
{
using namespace RooFit ;
// #ifdefCINT
gROOT->ProcessLineSync(".x RoodMyRBW.cxx++") ; // please find RoodMyRBW.cxx/h file from the attachment.
// #endif
I guess you cannot load things while defining a function using gROOT->, but I think there is a simple solution:
In your macro, include the .cxx file, so cling sees both the header and the code in the cxx. Then, put the MLfit2dw function as usual, don’t put any gROOT.
The macro can be loaded with .L, or directly run with .x