I have successfully defined an “Event” class which contains (pointers to) a TClonesArray.
class Event : public TObject{
private:
TClonesArray *fDetectorArray; // this is contains objects of another custom class, DetT1
...
class DetT1 : public TObject{
private:
Int_t fEnergy;
Int_t fTime;
...
I create a branch of my tree using the Event object - note the split level.
Event *event=0;
myTree->Branch("Events", "Event", &event, 256000, 99);
I then populate the tree, creating TClonesArrays of DetT1 objects, assigning them to the Event object and filling the tree. However, when I view the tree afterwards, I have no branches for the members of the DetT1 objects inside the TClonesArray, simply:
*............................................................................*
*Br 2 :fDetectorArray : TClonesArray* *
*Entries : 6717662 : Total Size= 634780291 bytes File Size = 61381598 *
*Baskets : 382 : Basket Size= 25600000 bytes Compression= 10.21 *
*............................................................................*
My question is how can I split to view the members of the DetT1 objects? I think I’m pretty much following what is in the first section of this post https://root.cern.ch/root/roottalk/roottalk02/5076.html, which apparently does work (or did at least).
I’m also fairly certain that the DetT1 class itself is not to blame: if I directly create a branch containing a TClonesArray of DetT1 objects then all works as expected.
Any help is appreciated, let me know if you need more details or if anything is unclear etc.