# TClass::BuildRealData : Cannot find any ShowMembers function for

**URL:** <https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018>\
**Category:** Newbie\
**Tags:** tree, root\
**Created:** [May 19, 2022, 12:51am UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018 "2022-05-19T00:51:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bassam](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Post date:** [May 19, 2022, 12:51am UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/1 "2022-05-19T00:51:43Z")

</div>

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.

```auto
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:

```auto
******************************************************************************
*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:

```auto
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!

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [May 19, 2022, 6:09am UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/2 "2022-05-19T06:09:15Z")

</div>

I think @pcanal can help you.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [May 19, 2022, 3:58pm UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/3 "2022-05-19T15:58:04Z")

</div>

Humm … odd …

Can you give the value of :

```auto
TClass::GetClass("StV0MuDst")->IsLoaded()

```

and the complete output of:

```auto
TClass::GetClass("StV0MuDst")->GetListOfRealData()->ls();

```

---

<div class="post-metadata">

**Author:** ![Bassam](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Post date:** [May 26, 2022, 12:25am UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/4 "2022-05-26T00:25:23Z")

</div>

> [@pcanal](#):
>
> `TClass::GetClass("StV0MuDst")->GetListOfRealData()->ls();`

Hello @pcanal,

Thank you very much for your reply! Here is what the commands you suggested return:

```auto
root4star [1] TClass::GetClass("StV0MuDst")->IsLoaded()
(const Bool_t)0
root4star [2] TClass::GetClass("StV0MuDst")->GetListOfRealData()->ls();
Error: illegal pointer to class object GetListOfRealData() 0x0 68 (tmpfile):1:
***Interpreter error recovered***

```

It looks like root doesn’t recognize the class StV0MuDst.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [May 26, 2022, 5:27pm UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/5 "2022-05-26T17:27:57Z")

</div>

So despite,

```auto
        gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
        loadSharedLibraries();
        gSystem->Load("StStrangeMuDstMaker");

```

The dictionary for the class `StV0MuDst` s not loaded. Where is that dictionary declared/generated?

---

<div class="post-metadata">

**Author:** ![Bassam](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Post date:** [May 31, 2022, 3:53pm UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/6 "2022-05-31T15:53:57Z")

</div>

Hello @pcanal,

Thank you for the reply!

I see the following relevant information defined:

1. In `./StRoot/StStrangeMuDstMaker/StV0MuDst.hh` we have:  
`ClassDef(StV0MuDst,7)`
2. In `./StRoot/StStrangeMuDstMaker/StV0MuDst.cc` we have:  
`ClassImp(StV0MuDst)`
3. In `./StRoot/StStrangeMuDstMaker/StStrangeMuDstMakerLinkDef.h` we have:

```auto
#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

```

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [May 31, 2022, 4:10pm UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/7 "2022-05-31T16:10:39Z")

</div>

Hummm … strange … Which version of ROOT are you using?  
What does

```auto
gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
loadSharedLibraries();
gSystem->Load("StStrangeMuDstMaker");
StV0MuDst *p = nullptr;
p = new StV0MuDst();

```

prints?

---

<div class="post-metadata">

**Author:** ![Bassam](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Post date:** [May 31, 2022, 4:18pm UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/8 "2022-05-31T16:18:41Z")

</div>

I believe I am using root version 5.34.38.

And I get the following:

```auto
***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.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [May 31, 2022, 6:34pm UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/9 "2022-05-31T18:34:31Z")

</div>

I am confused. Why would the 5 lines:

```auto
gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
loadSharedLibraries();
gSystem->Load("StStrangeMuDstMaker");
StV0MuDst *p = nullptr;
p = new StV0MuDst();

```

lead to this message:

> `Processing read_v0Tree.C...`

---

<div class="post-metadata">

**Author:** ![Bassam](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@Bassam](https://root-forum.cern.ch/u/Bassam)\
**Post date:** [June 16, 2022, 3:08pm UTC](https://root-forum.cern.ch/t/tclass-buildrealdata-cannot-find-any-showmembers-function-for/50018/10 "2022-06-16T15:08:20Z")

</div>

@pcanal Thank you very much for your help!

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! 🙂
