Open jedori0228 opened 4 months ago
Hello Jaesung! (Nice to meet you!)
What is the type of TObject you put in the TTree for ZExpA1CCQE
?
Below is what we are basically doing:
TGraph *gr = nullptr;
theTree.Branch( "ZExpA1CCQE", &gr );
Ok I see 🤔
We are actually using l->GetNdata()
to figure out whether or not we should use an extended buffer for non-primitive objects. TClonesArray
or TSpline3
typically return 0 here.
You could try to use TClonesArray in the meantime
I also tested saving TSpline instead, but getting same error. TTree print out is:
*............................................................................*
*Br 138 :ZExpA1CCQE : TSpline3 *
*Entries : 1627 : Total Size= 974351 bytes File Size = 155105 *
*Baskets : 31 : Basket Size= 32000 bytes Compression= 6.28 *
*............................................................................*
, and also seeing
[JSKIMDEBUG][BranchBuffer::buildBuffer] _branchPtr_->GetName() = ZExpA1CCQE
[JSKIMDEBUG][BranchBuffer::buildBuffer] - nLeaves = 1
[JSKIMDEBUG][BranchBuffer::buildBuffer] - iLeaf = 0
[JSKIMDEBUG][BranchBuffer::buildBuffer] - l->GetNdata() = 1
[JSKIMDEBUG][BranchBuffer::buildBuffer] - l->GetLenType() = 0
Thank you very much @jedori0228
It seems like we need a new way to find out if a leaf is a TObject. TClonesArray
should still work fine (we are actively using it for event-by-event dials).
Hi! In our input MC rootfile, we are saving
TGraph
objects into theTTree
;This object is an event-by-event reweights (i.e., a
TGraph
where x:sigmas, y:reweights) and we use this dial with a Parameter definition as follows:When I run
gundamFitter
, we saw an error message:After tracking down the source of the error, I found that in cpp-generic-toolbox/include/GenericToolbox.Root.h#L1531, the Leaf of this Branch has
l->GetNdata() = 1
andl->GetLenType() = 0
, thus gotbufferSize = 0
. In our on-going analysis, we put this TGraph into a TClonesArray, and there I saw the Leaf gotl->GetNdata() = 0
andl->GetLenType() = 4
, then had no issue. We can keep using TClonesArray, but wonder if using TGraph (or TSpline3) directly without TClonesArray can be also supported, or our configuration needs to be updated.1.9.0
6.30/06