Hello Experts,
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).
The following is the layout of the tree:
******************************************************************************
*Tree :v0Tree : Reconstructed V0 Tree *
*Entries : 20 : Total = 5947 bytes File Size = 2401 *
* : : Tree compression factor = 2.29 *
******************************************************************************
*Br 0 :nTzero : eventNTZero/I *
*Entries : 20 : Total Size= 648 bytes File Size = 129 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.20 *
*............................................................................*
*Br 1 :numLambda : numLambda/I *
*Entries : 20 : Total Size= 648 bytes File Size = 109 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.45 *
*............................................................................*
*Br 2 :lambda : StV0MuDst *
*Entries : 20 : Total Size= 4205 bytes File Size = 1521 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.45 *
*............................................................................*
The following is my run macro:
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);
}
}
Thank you very much for the help in advance!