While doing make command for the RooUnfold, I am getting this error:
$ make
Use ROOT 6.12/07 for linuxx8664gcc from /cvmfs/cms.cern.ch/slc7_amd64_gcc700/cms/cmssw/CMSSW_10_2_11/external/slc7_amd64_gcc700/bin/../../../../../../../slc7_amd64_gcc700/lcg/root/6.12.07-gnimlf5
Making /afs/cern.ch/user/s/ssnehshu/predocProject/CMSSW_10_2_11/src/RooUnfold/build/linuxx8664gcc/dep/RooFitUnfold.d
/afs/cern.ch/user/s/ssnehshu/predocProject/CMSSW_10_2_11/src/RooUnfold/src/RooFitUnfold.cxx:21:10: fatal error: RooWrapperPdf.h: No such file or directory
#include "RooWrapperPdf.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
Compiling /afs/cern.ch/user/s/ssnehshu/predocProject/CMSSW_10_2_11/src/RooUnfold/src/RooFitUnfold.cxx
/afs/cern.ch/user/s/ssnehshu/predocProject/CMSSW_10_2_11/src/RooUnfold/src/RooFitUnfold.cxx:21:10: fatal error: RooWrapperPdf.h: No such file or directory
#include "RooWrapperPdf.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [GNUmakefile:333: /afs/cern.ch/user/s/ssnehshu/predocProject/CMSSW_10_2_11/src/RooUnfold/build/linuxx8664gcc/obj/RooFitUnfold.o] Error 1
This is an error using a package RooUnfold which is not part of ROOT.
I think however the error is caused by using a too old version of ROOT, RooWrapperPdf was introduced in ROOT version 6.20 and you are using a very old version 6.12. The solution is to use a most recent version of ROOT, like the recommended one, 6.28
Thank you so much.
My current ROOT version is 6.24/08. But when i am giving the command ‘cmsenv’ the ROOT version is changed to 6.12. Also, in the newer version, I am getting the error:
root [0] .L examples/RooUnfoldExample.cxx
In file included from input_line_8:1:
/afs/cern.ch/user/s/ssnehshu/predocProject/CMSSW_10_2_11/src/RooUnfold/examples/RooUnfoldExample.cxx:54:3: error: unknown type name 'RooUnfoldResponse'
RooUnfoldResponse response (40, -10.0, 10.0);
^
/afs/cern.ch/user/s/ssnehshu/predocProject/CMSSW_10_2_11/src/RooUnfold/examples/RooUnfoldExample.cxx:77:3: error: unknown type name 'RooUnfoldBayes'
RooUnfoldBayes unfold (&response, hMeas, 4); // OR