]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTrackerDataMaker.cxx
dNdPt analysis
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerDataMaker.cxx
index 1af7f1f8809d39ad0f79b5a3f2ce230d5ccae55d..26ec1a5e85090d1c0d6ff65df63d79b4167de13b 100644 (file)
@@ -149,6 +149,7 @@ fIsRunning(kFALSE),
 fIsOwnerOfRawReader(kTRUE),
 fIsEventByEvent(kFALSE)
 {
+  /// Ctor from raw data reader
   if (fRawReader) 
   {
     fRawReader->NextEvent(); // to be sure to get run number available
@@ -169,7 +170,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");
@@ -211,12 +213,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();
@@ -225,7 +232,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);
     }
@@ -288,7 +295,7 @@ AliMUONTrackerDataMaker::NextEvent()
     return kFALSE;
   }
   
-  AliCodeTimerAuto("");
+  AliCodeTimerAuto("",0);
   
   static Int_t nphysics(0);
   static Int_t ngood(0);
@@ -335,12 +342,12 @@ Bool_t AliMUONTrackerDataMaker::ProcessEvent()
   /// duplicate this critical piece of calibration code !
   ///
   
-  AliCodeTimerAuto("");
+  AliCodeTimerAuto("",0);
   
   AliMUONRawStreamTrackerHP stream(fRawReader);
   
   stream.DisableWarnings();
-//  stream.EnabbleErrorLogger();
+  stream.EnabbleErrorLogger();
   
   const Int_t nddls = AliDAQ::NumberOfDdls("MUONTRK");
   TArrayI nevents(nddls);
@@ -381,7 +388,7 @@ Bool_t AliMUONTrackerDataMaker::ProcessEvent()
     {
       if ( fDigitCalibrator->IsValidDigit(detElemId, manuId, manuChannel) )
       {
-        charge = fDigitCalibrator->CalibrateDigit(detElemId, manuId, manuChannel,adc,3.0);
+        charge = fDigitCalibrator->CalibrateDigit(detElemId, manuId, manuChannel,adc);
       }
       else
       {