]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG4/AliCaloTrackESDReader.cxx
bugfix: correctly handle steering events in order to avoid warning 'Data source compo...
[u/mrichter/AliRoot.git] / PWG4 / AliCaloTrackESDReader.cxx
index 6ed8ac0307f843a149de0bf049880bbda1e6cb79..f93cd87c09d8c4d45c6fc765a1754b7ac9090ef8 100644 (file)
  **************************************************************************/
 /* $Id:  $ */
 
-/* History of cvs commits:
- *
- * $Log$
- *
- *
- */
-
 //_________________________________________________________________________
 // Class for reading data (ESDs) in order to do prompt gamma 
 // or other particle identification and correlations
@@ -132,7 +125,7 @@ void AliCaloTrackESDReader::FillInputCTS() {
       }//Pt and Fidutial cut passed. 
     }// track status
   }// track loop
-  if(fDebug > 1) printf("FillInputCTS():: aod entries %d\n", fAODCTS->GetEntries());
+  if(fDebug > 1) printf("FillInputCTS():: aod entries %d\n", fAODCTS->GetEntriesFast());
 }
   
 //____________________________________________________________________________
@@ -153,7 +146,7 @@ void AliCaloTrackESDReader::FillInputEMCAL() {
   Float_t pos[3] ;
 //   Double_t * pid = new Double_t[AliPID::kSPECIESN];
 
-  for (Int_t iclus =  0; iclus <  caloClusters->GetEntries(); iclus++) {
+  for (Int_t iclus =  0; iclus <  caloClusters->GetEntriesFast(); iclus++) {
     AliESDCaloCluster * clus = (AliESDCaloCluster *) caloClusters->At(iclus) ;
     TLorentzVector momentum ;
     clus->GetMomentum(momentum, v);      
@@ -198,7 +191,7 @@ void AliCaloTrackESDReader::FillInputEMCAL() {
     }//Pt and Fidutial cut passed.
   }//esd cluster loop
   
-  if(fDebug > 1) printf("FillInputEMCAL():: aod entries %d\n", fAODEMCAL->GetEntries());
+  if(fDebug > 1) printf("FillInputEMCAL():: aod entries %d\n", fAODEMCAL->GetEntriesFast());
 
 }
 
@@ -219,7 +212,7 @@ void AliCaloTrackESDReader::FillInputPHOS() {
   Float_t pos[3] ;
   Double_t * pid = new Double_t[AliPID::kSPECIESN];
  
-  for (Int_t iclus =  0; iclus <  caloClusters->GetEntries(); iclus++) {
+  for (Int_t iclus =  0; iclus <  caloClusters->GetEntriesFast(); iclus++) {
     AliESDCaloCluster * clus = (AliESDCaloCluster *) caloClusters->At(iclus) ;
     TLorentzVector momentum ;
     clus->GetMomentum(momentum, v);      
@@ -269,7 +262,7 @@ void AliCaloTrackESDReader::FillInputPHOS() {
      
     }//Pt and Fidutial cut passed.
   }//esd cluster loop
-  if(fDebug > 1) printf("FillInputPHOS():: aod entries %d\n", fAODPHOS->GetEntries());
+  if(fDebug > 1) printf("FillInputPHOS():: aod entries %d\n", fAODPHOS->GetEntriesFast());
 
 
 }
@@ -302,7 +295,12 @@ void AliCaloTrackESDReader::GetVertex(Double_t  v[3]) {
 //____________________________________________________________________________
 void AliCaloTrackESDReader::SetInputEvent(TObject* esd, TObject* aod, TObject* mc) {
   // Connect the data pointers
+
+  if(strcmp(esd->GetName(),"AliESDEvent"))
+    AliFatal(Form("Wrong reader, here only ESDs. Input name: %s != AliESDEvent \n",esd->GetName()));
+  
   SetESD((AliESDEvent*) esd);
   SetAOD ((AliAODEvent*) aod);
   SetMC((AliMCEvent*) mc);
+
 }