Protection against uninitialized fQADM
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Aug 2007 12:11:28 +0000 (12:11 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Aug 2007 12:11:28 +0000 (12:11 +0000)
PHOS/AliPHOSClusterizer.cxx
PHOS/AliPHOSClusterizerv1.cxx

index 7ea97e4..95fd28b 100644 (file)
@@ -37,7 +37,8 @@ AliPHOSClusterizer::AliPHOSClusterizer():
   fEventFolderName(""),
   fFirstEvent(0),
   fLastEvent(-1),
-  fRawReader(0)
+  fRawReader(0),
+  fQADM(0)
 {
   // ctor
 }
@@ -49,7 +50,8 @@ AliPHOSClusterizer::AliPHOSClusterizer(const TString alirunFileName,
        alirunFileName), fEventFolderName(eventFolderName),
   fFirstEvent(0),
   fLastEvent(-1),
-  fRawReader(0)
+  fRawReader(0),
+  fQADM(0)
 {
   // ctor
 }
@@ -58,7 +60,9 @@ AliPHOSClusterizer::AliPHOSClusterizer(const TString alirunFileName,
 AliPHOSClusterizer::AliPHOSClusterizer(const AliPHOSClusterizer & clusterizer) :
   TTask(clusterizer),fEventFolderName(clusterizer.GetEventFolderName()),
   fFirstEvent(clusterizer.GetFirstEvent()),fLastEvent(clusterizer.GetLastEvent()),
-  fRawReader(clusterizer.GetRawReader())
+  fRawReader(clusterizer.GetRawReader()),
+  fQADM(clusterizer.GetQualAssDataMaker())
+  
 {
   //Copy constructor
 }
index 91847c3..7a39728 100644 (file)
@@ -18,6 +18,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.110  2007/08/07 14:16:00  kharlov
+ * Quality assurance added (Yves Schutz)
+ *
  * Revision 1.109  2007/07/24 17:20:35  policheh
  * Usage of RecoParam objects instead of hardcoded parameters in reconstruction.
  * (See $ALICE_ROOT/PHOS/macros/BeamTest2006/RawReconstruction.C).
@@ -341,11 +344,13 @@ void AliPHOSClusterizerv1::Exec(Option_t *option)
       MakeUnfolding() ;
 
     //makes the quality assurance data
-    GetQualAssDataMaker()->SetData(gime->EmcRecPoints()) ; 
-    GetQualAssDataMaker()->Exec(AliQualAss::kRECPOINTS) ; 
-    GetQualAssDataMaker()->SetData(gime->CpvRecPoints()) ; 
-    GetQualAssDataMaker()->Exec(AliQualAss::kRECPOINTS) ; 
-  
+    if (GetQualAssDataMaker()) {
+      GetQualAssDataMaker()->SetData(gime->EmcRecPoints()) ; 
+      GetQualAssDataMaker()->Exec(AliQualAss::kRECPOINTS) ; 
+      GetQualAssDataMaker()->SetData(gime->CpvRecPoints()) ; 
+      GetQualAssDataMaker()->Exec(AliQualAss::kRECPOINTS) ; 
+    }
+
     WriteRecPoints();
 
     if(strstr(option,"deb"))  
@@ -357,7 +362,7 @@ void AliPHOSClusterizerv1::Exec(Option_t *option)
   }
   
   //Write the quality assurance data only after the last event 
-  if ( fEventCounter == gime->MaxEvent()) 
+  if (GetQualAssDataMaker() && fEventCounter == gime->MaxEvent()) 
        GetQualAssDataMaker()->Finish(AliQualAss::kRECPOINTS) ;
 
  if(fWrite) //do not unload in "on flight" mode