From: schutz Date: Wed, 25 Apr 2001 08:51:40 +0000 (+0000) Subject: Interference with other detectors removed: read/fill only our branches X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=761e34c0b1f596bca0aeb91cb2e3127fb175b4bd;ds=sidebyside Interference with other detectors removed: read/fill only our branches --- diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index d59f607cc1a..5c7920dd3db 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -464,8 +464,9 @@ Bool_t AliPHOSClusterizerv1::ReadDigits(){ digitsBranch->SetAddress(&fDigits) ; digitizerBranch->SetAddress(&fDigitizer) ; - - treeD->GetEvent(0) ; + + digitsBranch->GetEntry(0) ; + digitizerBranch->GetEntry(0) ; fPedestal = fDigitizer->GetPedestal() ; fSlope = fDigitizer->GetSlope() ; @@ -488,6 +489,8 @@ void AliPHOSClusterizerv1::WriteRecPoints(){ for(index = 0; index < fEmcRecPoints->GetEntries(); index++) ((AliPHOSEmcRecPoint *)fEmcRecPoints->At(index))->SetIndexInList(index) ; + fEmcRecPoints->Expand(fEmcRecPoints->GetEntriesFast()) ; + //Now the same for CPV for(index = 0; index < fCpvRecPoints->GetEntries(); index++) ((AliPHOSRecPoint *)fCpvRecPoints->At(index))->EvalAll(fW0CPV,fDigits) ; @@ -497,6 +500,8 @@ void AliPHOSClusterizerv1::WriteRecPoints(){ for(index = 0; index < fCpvRecPoints->GetEntries(); index++) ((AliPHOSRecPoint *)fCpvRecPoints->At(index))->SetIndexInList(index) ; + fCpvRecPoints->Expand(fCpvRecPoints->GetEntriesFast()) ; + if(gAlice->TreeR()==0) gAlice->MakeTree("R") ; @@ -568,8 +573,9 @@ void AliPHOSClusterizerv1::WriteRecPoints(){ if (filename) { emcBranch->SetFile(filename); TIter next( emcBranch->GetListOfBranches()); - while ((emcBranch=(TBranch*)next())) { - emcBranch->SetFile(filename); + TBranch * sb ; + while ((sb=(TBranch*)next())) { + sb->SetFile(filename); } cwd->cd(); } @@ -580,8 +586,9 @@ void AliPHOSClusterizerv1::WriteRecPoints(){ if (filename) { cpvBranch->SetFile(filename); TIter next( cpvBranch->GetListOfBranches()); - while ((cpvBranch=(TBranch*)next())) { - cpvBranch->SetFile(filename); + TBranch * sb; + while ((sb=(TBranch*)next())) { + sb->SetFile(filename); } cwd->cd(); } @@ -594,14 +601,17 @@ void AliPHOSClusterizerv1::WriteRecPoints(){ if (filename) { clusterizerBranch->SetFile(filename); TIter next( clusterizerBranch->GetListOfBranches()); - while ((clusterizerBranch=(TBranch*)next())) { - clusterizerBranch->SetFile(filename); + TBranch * sb ; + while ((sb=(TBranch*)next())) { + sb->SetFile(filename); } cwd->cd(); } - gAlice->TreeR()->Fill() ; + emcBranch->Fill() ; + cpvBranch->Fill() ; + clusterizerBranch->Fill() ; gAlice->TreeR()->Write(0,kOverwrite) ; } diff --git a/PHOS/AliPHOSDigitizer.cxx b/PHOS/AliPHOSDigitizer.cxx index dfc5c9e26af..51f8b2fd9a6 100644 --- a/PHOS/AliPHOSDigitizer.cxx +++ b/PHOS/AliPHOSDigitizer.cxx @@ -368,9 +368,8 @@ void AliPHOSDigitizer::WriteDigits(){ gAlice->SetEvent(fIevent->At(0)) ; // for all-to-all will produce a lot of branches in TreeD if(gAlice->TreeD()==0) - gAlice->MakeTree("D") ; + gAlice->MakeTree("D") ; - //Check, if this branch already exits? TBranch * digitsBranch = 0; TBranch * digitizerBranch = 0; @@ -422,8 +421,9 @@ void AliPHOSDigitizer::WriteDigits(){ if (file) { digitsBranch->SetFile(file); TIter next( digitsBranch->GetListOfBranches()); - while ((digitsBranch=(TBranch*)next())) { - digitsBranch->SetFile(file); + TBranch * sbr ; + while ((sbr=(TBranch*)next())) { + sbr->SetFile(file); } cwd->cd(); } @@ -437,13 +437,15 @@ void AliPHOSDigitizer::WriteDigits(){ if (file) { digitizerBranch->SetFile(file); TIter next( digitizerBranch->GetListOfBranches()); - while ((digitizerBranch=(TBranch*)next())) { - digitizerBranch->SetFile(file); + TBranch * sbr; + while ((sbr=(TBranch*)next())) { + sbr->SetFile(file); } cwd->cd(); } - gAlice->TreeD()->Fill() ; + digitsBranch->Fill() ; + digitizerBranch->Fill() ; gAlice->TreeD()->Write(0,kOverwrite) ; @@ -559,7 +561,9 @@ Bool_t AliPHOSDigitizer::ReadSDigits(){ AliPHOSSDigitizer *sDigitizer = new AliPHOSSDigitizer(); sdigitizerBranch->SetAddress(&sDigitizer) ; - treeS->GetEvent(0) ; + + sdigitsBranch->GetEntry(0) ; + sdigitizerBranch->GetEntry(0) ; if(fSDigitizer == 0) fSDigitizer = sDigitizer ; diff --git a/PHOS/AliPHOSPIDv1.cxx b/PHOS/AliPHOSPIDv1.cxx index c45f8a14f1f..be3a255f66c 100644 --- a/PHOS/AliPHOSPIDv1.cxx +++ b/PHOS/AliPHOSPIDv1.cxx @@ -232,7 +232,8 @@ Bool_t AliPHOSPIDv1::ReadTrackSegments() tsMakerBranch->SetAddress(&fTSMaker) ; tsBranch->SetAddress(&fTrackSegments) ; - treeR->GetEvent(0) ; + tsMakerBranch->GetEntry(0) ; + tsBranch->GetEntry(0) ; fRecPointsTitle = fTSMaker->GetRecPointsBranch() ; @@ -276,7 +277,10 @@ Bool_t AliPHOSPIDv1::ReadTrackSegments() cpvBranch->SetAddress(&fCpvRecPoints) ; cluBranch->SetAddress(&fClusterizer) ; - treeR->GetEvent(0) ; + emcBranch->GetEntry(0) ; + cpvBranch->GetEntry(0) ; + cluBranch->GetEntry(0) ; + return kTRUE ; @@ -493,8 +497,9 @@ void AliPHOSPIDv1::WriteRecParticles() if (filename) { rpBranch->SetFile(filename); TIter next( rpBranch->GetListOfBranches()); - while ((rpBranch=(TBranch*)next())) { - rpBranch->SetFile(filename); + TBranch * sb ; + while ((sb=(TBranch*)next())) { + sb->SetFile(filename); } cwd->cd(); } @@ -507,13 +512,15 @@ void AliPHOSPIDv1::WriteRecParticles() if (filename) { pidBranch->SetFile(filename); TIter next( pidBranch->GetListOfBranches()); - while ((pidBranch=(TBranch*)next())) { - pidBranch->SetFile(filename); + TBranch * sb ; + while ((sb=(TBranch*)next())) { + sb->SetFile(filename); } cwd->cd(); } - gAlice->TreeR()->Fill() ; + rpBranch->Fill() ; + pidBranch->Fill() ; gAlice->TreeR()->Write(0,kOverwrite) ; } diff --git a/PHOS/AliPHOSSDigitizer.cxx b/PHOS/AliPHOSSDigitizer.cxx index f973f8e5c22..7e5091298fd 100644 --- a/PHOS/AliPHOSSDigitizer.cxx +++ b/PHOS/AliPHOSSDigitizer.cxx @@ -268,8 +268,9 @@ void AliPHOSSDigitizer::Exec(Option_t *option) { if (file) { sdigitsBranch->SetFile(file); TIter next( sdigitsBranch->GetListOfBranches()); - while ((sdigitsBranch=(TBranch*)next())) { - sdigitsBranch->SetFile(file); + TBranch * subbr; + while ((subbr=(TBranch*)next())) { + subbr->SetFile(file); } cwd->cd(); } @@ -283,14 +284,16 @@ void AliPHOSSDigitizer::Exec(Option_t *option) { if (file) { sdigitizerBranch->SetFile(file); TIter next( sdigitizerBranch->GetListOfBranches()); - while ((sdigitizerBranch=(TBranch*)next())) { - sdigitizerBranch->SetFile(file); + TBranch * subbr ; + while ((subbr=(TBranch*)next())) { + subbr->SetFile(file); } cwd->cd(); delete file; } - gAlice->TreeS()->Fill() ; + sdigitsBranch->Fill() ; + sdigitizerBranch->Fill() ; gAlice->TreeS()->Write(0,TObject::kOverwrite) ; if(strstr(option,"deb")) diff --git a/PHOS/AliPHOSTrackSegmentMakerv1.cxx b/PHOS/AliPHOSTrackSegmentMakerv1.cxx index d493cfac478..a2cab4beccc 100644 --- a/PHOS/AliPHOSTrackSegmentMakerv1.cxx +++ b/PHOS/AliPHOSTrackSegmentMakerv1.cxx @@ -523,8 +523,10 @@ Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints(){ emcBranch->SetAddress(&fEmcRecPoints) ; cpvBranch->SetAddress(&fCpvRecPoints) ; clusterizerBranch->SetAddress(&fClusterizer) ; - - gAlice->TreeR()->GetEvent(0) ; + + emcBranch->GetEntry(0) ; + cpvBranch->GetEntry(0) ; + clusterizerBranch->GetEntry(0) ; return kTRUE ; @@ -587,8 +589,9 @@ void AliPHOSTrackSegmentMakerv1::WriteTrackSegments(){ if (filename) { tsBranch->SetFile(filename); TIter next( tsBranch->GetListOfBranches()); - while ((tsBranch=(TBranch*)next())) { - tsBranch->SetFile(filename); + TBranch * sb ; + while ((sb=(TBranch*)next())) { + sb->SetFile(filename); } cwd->cd(); } @@ -602,13 +605,15 @@ void AliPHOSTrackSegmentMakerv1::WriteTrackSegments(){ if (filename) { tsMakerBranch->SetFile(filename); TIter next( tsMakerBranch->GetListOfBranches()); - while ((tsMakerBranch=(TBranch*)next())) { - tsMakerBranch->SetFile(filename); + TBranch * sb; + while ((sb=(TBranch*)next())) { + sb->SetFile(filename); } cwd->cd(); } - gAlice->TreeR()->Fill() ; + tsBranch->Fill() ; + tsMakerBranch->Fill() ; gAlice->TreeR()->Write(0,kOverwrite) ; }