]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTrackerDataMaker.cxx
Previous commit had the bad side-effect of changing the behaviour of Raw QA to comput...
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerDataMaker.cxx
index ebb16f0963aee266c71e77810922b4e0bd6cac09..278df70ab28347530b02c098e91df9c7a4b831a2 100644 (file)
@@ -63,6 +63,7 @@ fIsRunning(kFALSE),
 fIsOwnerOfRawReader(kFALSE),
 fIsEventByEvent(kFALSE)
 {
+/// Root IO ctor
 }
 
 //_____________________________________________________________________________
@@ -168,7 +169,8 @@ AliMUONTrackerDataMaker::Ctor(const AliMUONRecoParam* recoParam,
                               Double_t xmin, Double_t xmax)
 {
   /// "designated constructor"
-  Bool_t calibrate = ( fOCDBPath.Length() > 0 );
+
+  Bool_t calibrate = ( strlen(calibMode) > 0 );
   
   TString name;
   TString type("RAW");
@@ -180,6 +182,7 @@ AliMUONTrackerDataMaker::Ctor(const AliMUONRecoParam* recoParam,
     if ( scalib == "GAIN" ) type = "CALC";
     if ( scalib == "NOGAIN" ) type = "CALZ";
     if ( scalib == "GAINCONSTANTCAPA") type = "CALG";
+    if ( scalib == "INJECTIONGAIN" ) type = "CALE";
   }
   
   if ( !fRunNumber ) 
@@ -209,12 +212,17 @@ AliMUONTrackerDataMaker::Ctor(const AliMUONRecoParam* recoParam,
     // out of sync)
     // But with the current CDBManager implementation, I don't know how to solve
     // this better (e.g. to avoid clearing cache messages and so on).
+
+    AliCDBStorage* storage(0x0);
     
-    AliCDBStorage* storage = AliCDBManager::Instance()->GetDefaultStorage();
-    
-    if ( storage->GetURI() != fOCDBPath.Data() ) 
+    if ( fOCDBPath.Length() > 0 )
     {
-      AliCDBManager::Instance()->SetDefaultStorage(fOCDBPath.Data());
+      storage = AliCDBManager::Instance()->GetDefaultStorage();
+
+      if ( storage && ( storage->GetURI() != fOCDBPath.Data() ) )
+      {
+        AliCDBManager::Instance()->SetDefaultStorage(fOCDBPath.Data());
+      }
     }
     
     fCalibrationData->Pedestals();
@@ -223,7 +231,7 @@ AliMUONTrackerDataMaker::Ctor(const AliMUONRecoParam* recoParam,
     fCalibrationData->HV();
     fCalibrationData->Capacitances();
     
-    if ( storage->GetURI() != fOCDBPath.Data() ) 
+    if ( storage && ( storage->GetURI() != fOCDBPath.Data() ) )
     {
       AliCDBManager::Instance()->SetDefaultStorage(storage);
     }
@@ -236,6 +244,8 @@ AliMUONTrackerDataMaker::Ctor(const AliMUONRecoParam* recoParam,
 //_____________________________________________________________________________
 AliMUONTrackerDataMaker::~AliMUONTrackerDataMaker()
 {
+/// dtor
+
   delete fOneEventData;
   delete fAccumulatedData;
   if ( fIsOwnerOfRawReader ) delete fRawReader;
@@ -379,6 +389,10 @@ Bool_t AliMUONTrackerDataMaker::ProcessEvent()
       {
         charge = fDigitCalibrator->CalibrateDigit(detElemId, manuId, manuChannel,adc,3.0);
       }
+      else
+      {
+        charge = 0.0;
+      }
     }
     
     if (charge > 0.0 )