I am trying to read a root tree that has custom class entries. I keep getting the following error, and I am not really sure what it is referring to. I could not find an answer by looking it up on the forum.
TClass::BuildRealData : Cannot find any ShowMembers function for StV0I!
With respect to where my run macro is, here are the header files.
The header file for the class StV0I. is in ./StRoot/StStrangeMuDstMaker/StV0I.hh. The class StV0MuDst is in ./StRoot/StStrangeMuDstMaker/StV0MuDst.hh. I load StStrangeMuDstMaker as part of my macro.
StV0MuDst inherits from StV0I, and the lambda branch in the root tree is of the class StV0MuDst.
Not sure if this is helpful or not, but I get the same error when the split level of generating the lambda branch is set to max (99).
void read_v0Tree(int nevent=1000000000, const char* inputFile = "test_weakDecayAnalysis_16138024.root") {
gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
loadSharedLibraries();
gSystem->Load("StStrangeMuDstMaker");
// Variables
const Int_t maxNumV0 = 200;
TChain* v0Chain = new TChain("v0Tree"); // Chains trees named v0Tree from all input files
v0Chain->Add(inputFile);
// Create branches you need
Int_t nTzero;
Int_t nLambda; // Number of lambda's in each event
StV0MuDst lambdaArry[maxNumV0];
v0Tree->SetBranchAddress("nTzero", nTzero);
v0Tree->SetBranchAddress("numLambda", nLambda);
v0Tree->SetBranchAddress("lambda", lambdaArry); // =====>Issues arises here
// Get number of entries in the tree
Int_t nEntries = v0Tree->GetEntries();
// Loop over entries in the tree
for(int iEntry=0; iEntry<nEntries; iEntry++) {
//v0Tree->GetEntry(iEntry);
}
}
In ./StRoot/StStrangeMuDstMaker/StV0MuDst.hh we have: ClassDef(StV0MuDst,7)
In ./StRoot/StStrangeMuDstMaker/StV0MuDst.cc we have: ClassImp(StV0MuDst)
In ./StRoot/StStrangeMuDstMaker/StStrangeMuDstMakerLinkDef.h we have:
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragme link C++ global gFakeTopoPtr;
#pragma link C++ class DcaService+;
#pragma link C++ class StDecayMode+;
#pragma link C++ class StKinkI+;
#pragma link C++ class StKinkBase+;
#pragma link C++ class StKinkMc+;
#pragma link C++ class StKinkMuDst+;
#pragma link C++ class StStrangeControllerBase+;
#pragma link C++ class StV0Controller+;
#pragma link C++ class StXiController+;
#pragma link C++ class StKinkController+;
#pragma link C++ class StStrangeCuts+;
#pragma link C++ class StStrangeEvMuDst+;
#pragma link C++ class StStrangeMuDst+;
#pragma link C++ class StStrangeAssoc+;
#pragma link C++ class StStrangeMuDstMaker+;
#pragma link C++ class StrangeMuDstPlayer+;
#pragma link C++ class StV0I;
#pragma link C++ class StV0Mc+;
#pragma link C++ class StV0MuDst+;
#pragma link C++ class StXiI;
#pragma link C++ class StXiMc+;
#pragma link C++ class StXiMuDst+;
#endif
*** Float Point Exception is OFF ***
*** Start at Date : Tue May 31 12:16:04 2022
QAInfo:You are using STAR_LEVEL : pro, ROOT_LEVEL : 5.34.38 and node : rcas6005.rcf.bnl.gov
root4star [0]
Processing read_v0Tree.C...
Warning in <TClass::TClass>: no dictionary for class StStrangeMuDst is available
Warning in <TClass::TClass>: no dictionary for class StStrangeAssoc is available
strangeArrayNames-arrayNames-__NARRAYS__ = 0
loading of shared libraries done
Error: Symbol nullptr is not defined in current scope read_v0Tree.C:9:
*** Interpreter error recovered ***
I have come up with a different way to store the information I want in a tree that doesn’t require special classes. But, it would be informative to know why specifying a class is not working.
As you might already know, I am switched to a different that doesn’t require saving special classes in the tree. I appreciate your time and effort in addressing this!