Yes, this is a typical Tree structure.
Your class Event has data members subdet1, subdet2, etc.
subdet1,etc should be:
- either a pointer to an object (derived from TObject). In this case
Root will create one branch for this object.
- a TClonesArray (the best). In this case the TClonesArray
references objects from the same class (count). Root will create
one branch for each data member of the count class.
If you create an Object of class Event, eg:
Event *event = new Event();
you can create the corresponding TTree with
TFile f("myfile.root","recreate");
TTree T("T","title");
T.Branch("event","Event",&event);
Examples of Tree are given in
$ROOTSYS/test/Event
ATLFast
Rene Brun