]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Interference with other detectors removed: read/fill only our branches
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2001 08:51:40 +0000 (08:51 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Apr 2001 08:51:40 +0000 (08:51 +0000)
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSSDigitizer.cxx
PHOS/AliPHOSTrackSegmentMakerv1.cxx

index d59f607cc1a86a3ebdecad5689608e6be4576d2e..5c7920dd3db0f02ef55db618f24e16039989696a 100644 (file)
@@ -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) ;  
   
 }
index dfc5c9e26af767fcdcc95db6b28ac74708ca0518..51f8b2fd9a6e0f3a8bdcaca733b8db274f811b47 100644 (file)
@@ -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 ;
index c45f8a14f1f56354f17d952e4529701308d8f863..be3a255f66c419c9ffa4de49d2b4d02e310e2c01 100644 (file)
@@ -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) ;  
   
 }
index f973f8e5c22076c399622023e368f82afb30857e..7e5091298fde6e1bcab9a8252c131dde6d36ee93 100644 (file)
@@ -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"))
index d493cfac47830d43e079e58e20f49cc399c4432e..a2cab4beccc3c68c8a7b55bc173d64e685f69f12 100644 (file)
@@ -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) ;  
   
 }