Warning in <TStreamerInfo::Compile>: Counter fNClusterRange

Hello Rooters,

While adding root file in TChain, I got this error:

Warning in <TStreamerInfo::Compile>: Counter fNClusterRange should not be skipped from class TTree

Because of this (I guess), the program crashes when I do

chain->SetBranchAddress("x", &x, &b_x);

and read the entries. It does not crash if I remove the above line.
Any suggestion how to fix this error? I am using root 5.26/00d.

Thanks.

Ok, I am no longer getting warning after updating to root 5_34. However, I am still facing crashing problem. The minimum code is:

void plot()
{
        TChain *chain = new TChain("tree");
        chain->Add("out.root");
        int nEvent = chain->GetEntries();

        int id;
        TBranch *b_id;

        chain->SetBranchAddress("id", &id, &b_id);

        for(int i=0; i<nEvent; i++) {
                cout << chain->GetEntry(i) << endl;;
        }
}

It crashes. However, I can load the root file interactively and scan the branches, works fine. Also, it works fine with

        chain->Draw("id >> h(200, 0, 2000)");

It crashes due to the line

        chain->SetBranchAddress("id", &id, &b_id);

Any help?

Thanks.

In the end of your “void plot()” (just before doing “return”), try to add:
chain->ResetBranchAddresses();

Thanks for reply. Unfortunately, it does not work.

Try (post the output here):
root [0] TFile *f = TFile::Open(“out.root”);
root [1] f->ls();
root [2] tree->Print();

f->ls gives

KEY: TTree	tree;1	tree

tree.Print() gives

*............................................................................*
*Br   17 :id       : id[id]/I                                     *
*Entries :    80001 : Total  Size=    2062408 bytes  File Size  =     222186 *
*Baskets :       75 : Basket Size=      32000 bytes  Compression=   9.27     *
*............................................................................*

“id[id]/I” :question: :question: :question: WTF :question: :question: :question:

P.S. This branch looks like it was supposed to be a “variable length array” of integers.

[color=#FF0000][/color] WTF WTF[color=#FF0000][/color]

  1. Post the FULL output of “tree->Print();” (yes, one needs to “inspect” all available branches in order to see if there are any “hidden” / “non-obvious” problems).
  2. Find the one who created that “tree” and ask how was this “id” branch created exactly and what is it supposed to keep.