Hi rooters,
I don’t know where did I missed when using Branch to get a vector but resulted in nothing. I followed tutorials that all I can find step by step
It print out 0s in a row.
There’s no problem with the branch in root file (checked by TBrowser) and I’m using root. 5.08/00b.
What can be the reason:?: Thanks.
I strongly recommend that you do NOT manipulate the TBranch objects directly. They come and go during the life of the TChain.
Do NOT usebranch->SetAddress(...); but USE
chain.SetBranchAddress(name,&h);This will properly propagate the information during the life of the TChain AND will provide checking of the address type being passed (aka if you make an error it should warn you).
[quote]The only way is to read out the whole branch, and then read the leaf from the vector of branch. [/quote]I am not sure what you mean. Could you send the result of chain.Print()
[quote]Limitation: Can’t instantiate precompiled template
edm::Wrapper<vector > analysis.C:39:[/quote]This indicates that the dictionary for edm::Wrapper<vector > was NOT loaded. Please check with your local CMS build system guru to see why this is not properly loaded.