19 TClonesArray* fClones;
22 TrackClones(TString ClassName =
"", TString branchname =
"", TString dirname =
"");
23 void Register(Bool_t write);
25 void Compress(Int_t* map, Int_t map_size);
28 void CopyFrom(
const TClonesArray* from) {
30 Int_t size = from->GetEntriesFast();
31 fClones->ExpandCreateFast(size);
32 for (
int i = 0; i < size; i++) {
33 const T* obj_from = (T*) from->UncheckedAt(i);
34 T* obj_to = (T*) fClones->UncheckedAt(i);
39 void CopyTo(TClonesArray* to) {
41 Int_t size = to->GetEntriesFast();
42 to->ExpandCreateFast(size);
43 for (
int i = 0; i < size; i++) {
44 T* obj_from = (T*) fClones->UncheckedAt(i);
45 T* obj_to = (T*) to->UncheckedAt(i);
50 void CopyCompress(TClonesArray* from, Int_t* map, Int_t map_size) {
52 fClones->ExpandCreateFast(map_size);
53 for (
int i = 0; i < map_size; i++) {
54 T* obj_from = (T*) from->UncheckedAt(map[i]);
55 T* obj_to = (T*) fClones->UncheckedAt(i);
59 Int_t GetEntriesFast()
const {
return fClones->GetEntriesFast(); };
60 Bool_t ExistInTree()
const;
61 TString GetBranchName()
const {
return fBranchName; }
62 TObject* UncheckedAt(Int_t i)
const {
return fClones->UncheckedAt(i); }
63 TClonesArray* GetArray()
const {
return fClones; };