Dear all,
I’m using a PDF created with RooClassFactory (named Acceptance) to perform a Fit.
The code compiles and runs.
The Acceptance.* files are created using the RooClassFactory methods and compiled: the shared libraries used to link the application.
The fit is ok and I save it in a file (using the ->Write() methods).
I save the likelihood and the dataset. Later I can access them in the save file without problems.
But When I try to save the PDF inside the file I fail to read it back. (I need the PDF because I want to reobtain the likelihood scans after the fit is finished).
When I load the file I see:
Warning in TClass::TClass: no dictionary for class Acceptance is available
The pdfs have been saved:
root [1] _file0->ls()
TFile** Sim_data_stri_FitRes.root
TFile* Sim_data_stri_FitRes.root
KEY: RooFitResult L;1 @0+@1+@2-@3
KEY: RooAddPdf pdf_fit_BS2KK;1 Total(B+S) BS -> K+ K- PDF
KEY: RooDataSet pdf_fit_BS2KKData;1 Generated From Total(B+S) BS -> K+ K- PDF
KEY: RooAddPdf pdf_fit_BS2Kpi;1 Total(B+S) BS -> K+ pi- PDF
KEY: RooDataSet pdf_fit_BS2KpiData;1 Generated From Total(B+S) BS -> K+ pi- PDF
KEY: RooAddPdf pdf_fit_BS2piK;1 Total(B+S) BS -> pi+ K- PDF
KEY: RooDataSet pdf_fit_BS2piKData;1 Generated From Total(B+S) BS -> pi+ K- PDF
But When I try to access them I have the bad crash appended below.
How can I add the class dictionary to ROOT?
I am doing:
#include </home/asarti/roofit/b2hh/B2hhFit/Acceptance.h>
and
gSystem->Load(“Acceptance_cxx.so”);
in my macro…
Am I missing something stupid?
The same also applies when using a compiled code. The crash is appended Below the one of the macro.
Thanks,
alessio
Macro crash:
Error: Can’t call Acceptance::Acceptance() in current scope macro/LikeScan.cc:15:
Possible candidates are…
(in Acceptance)
/home/asarti/roofit/b2hh/B2hhFit/Acceptance.h -1:0 0 public: Acceptance Acceptance::Acceptance(const char* name,const char* title,RooAbsReal& _tom,RooAbsReal& _alpha,RooAbsReal& _mass);
/home/asarti/roofit/b2hh/B2hhFit/Acceptance.h -1:0 0 public: Acceptance Acceptance::Acceptance(const Acceptance& other,const char* name=0);
/home/asarti/roofit/b2hh/B2hhFit/Acceptance.h -1:-1 0 public: Acceptance Acceptance::Acceptance(const char* name,const char* title,RooAbsReal& _tom,RooAbsReal& _alpha,RooAbsReal& _mass);
/home/asarti/roofit/b2hh/B2hhFit/Acceptance.h -1:-1 0 public: Acceptance Acceptance::Acceptance(const Acceptance& other,const char* name=0);
(in RooAbsReal)
(in RooAbsArg)
(in RooPrintable)
Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a checksum of 1073742729 for the class “RooRealProxy” in /home/asarti/roofit/b2hh/B2hhFit/Sim_data_stri_FitRes.root.
Error in TBufferFile::CheckByteCount: object of class TNamed read too few bytes: 18 instead of 868
Error in TBufferFile::ReadVersion: Could not find the StreamerInfo with a checksum of 0 for the class “RooAbsProxy” in /home/asarti/roofit/b2hh/B2hhFit/Sim_data_stri_FitRes.root.
Error in TBufferFile::CheckByteCount: object of class RooRealProxy read too few bytes: 898 instead of 911
Compiled code crash:
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TBufferFile::CheckByteCount: object of class RooRefCountList read too few bytes: 41 instead of 956
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TBufferFile::CheckByteCount: object of class RooRefCountList read too few bytes: 30 instead of 953
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TExMap::Remove: key 29620 not found at 447
Warning in TBufferFile::CheckObject: reference to object of unavailable class RooAbsArg, offset=29620 pointer will be 0
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TExMap::Remove: key 7340037 not found at 261
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=7340037 pointer will be 0
Error in TExMap::Remove: key 16402 not found at 309
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=16402 pointer will be 0
Error in TExMap::Remove: key 593625089 not found at 82
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=593625089 pointer will be 0
Error in TExMap::Remove: key 33554431 not found at 327
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=33554431 pointer will be 0
Error in TExMap::Remove: key 278528 not found at 373
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=278528 pointer will be 0
Error in TExMap::Remove: key 2752513 not found at 106
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=2752513 pointer will be 0
Error in TExMap::Remove: key 65536 not found at 147
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=65536 pointer will be 0
Error in TExMap::Remove: key 65537 not found at 148
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=65537 pointer will be 0
Error in TExMap::Remove: key 768 not found at 269
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=768 pointer will be 0
Error in TExMap::Remove: key 675295274 not found at 192
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=675295274 pointer will be 0
Error in TExMap::Remove: key 2657 not found at 144
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=2657 pointer will be 0
Error in TExMap::Remove: key 846227824 not found at 242
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=846227824 pointer will be 0
Error in TExMap::Remove: key 1667592308 not found at 440
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=1667592308 pointer will be 0
Error in TExMap::Remove: key 541217586 not found at 150
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=541217586 pointer will be 0
Error in TExMap::Remove: key 1073741826 not found at 304
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=1073741826 pointer will be 0
Error in TExMap::Remove: key 81920 not found at 444
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=81920 pointer will be 0
Error in TExMap::Remove: key 31981569 not found at 332
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=31981569 pointer will be 0
Error in TBufferFile::CheckByteCount: object of class RooRefCountList read too few bytes: 102 instead of 1188794
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TExMap::Remove: key 53741 not found at 423
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=53741 pointer will be 0
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TBufferFile::CheckByteCount: object of class RooRefCountList read too few bytes: 30 instead of 1133715
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TExMap::Remove: key 16384 not found at 241
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=16384 pointer will be 0
Error in TExMap::Remove: key 261029889 not found at 583
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=261029889 pointer will be 0
Error in TExMap::Remove: key 2490369 not found at 161
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=2490369 pointer will be 0
Error in TExMap::Remove: key 1075042035 not found at 968
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=1075042035 pointer will be 0
Error in TExMap::Remove: key 2145 not found at 132
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=2145 pointer will be 0
Error in TBufferFile::CheckByteCount: object of class RooRefCountList read too few bytes: 33178 instead of 39042
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TExMap::Remove: key 69928 not found at 309
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=69928 pointer will be 0
Error in TClass::New: cannot create object of class Acceptance
Error in TBufferFile::ReadObject: could not create object of class Acceptance
Error in TExMap::Remove: key 108561 not found at 602
Warning in TBufferFile::CheckObject: reference to object of unavailable class TObject, offset=108561 pointer will be 0