-//____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv2::WriteTrackSegments()
-{
- // Writes found TrackSegments to TreeR. Creates branches
- // "PHOSTS" and "AliPHOSTrackSegmentMaker" with the same title.
- // In the former branch found TrackSegments are stored, while
- // in the latter all parameters, with which TS were made.
- // ROOT does not allow overwriting existing branches, therefore
- // first we check, if branches with the same title already exist.
- // If yes - exits without writing.
-
- AliPHOSGetter *gime = AliPHOSGetter::Instance() ;
-
- TClonesArray * trackSegments = gime->TrackSegments() ;
- trackSegments->Expand(trackSegments->GetEntriesFast()) ;
-
- if(fWrite){ //We write TreeT
- TTree * treeT = gime->TreeT();
-
- //First TS
- Int_t bufferSize = 32000 ;
- TBranch * tsBranch = treeT->Branch("PHOSTS",&trackSegments,bufferSize);
- tsBranch->Fill() ;
-
- gime->WriteTracks("OVERWRITE");
- gime->WriteTrackSegmentMaker("OVERWRITE");
- }