]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONChamberCalibrationTask.cxx
protect against invoking MC Handler for AOD
[u/mrichter/AliRoot.git] / MUON / AliMUONChamberCalibrationTask.cxx
index 47db979fe965e0fd5389ee3bee2ca2f542da5f17..89e45e54667f5e88cc3a6eaeef0f1ee58ec052fa 100644 (file)
@@ -91,9 +91,6 @@ AliMUONChamberCalibrationTask::AliMUONChamberCalibrationTask():
   /// Default constructor
   //
 
-  fClusterInfo = new AliMUONClusterInfo();
-  fESDInterface = new AliMUONESDInterface();
-
 }
 
 //______________________________________________________________
@@ -116,8 +113,6 @@ AliMUONChamberCalibrationTask::AliMUONChamberCalibrationTask( const char* name,
   /// constructor
   //
 
-  fClusterInfo = new AliMUONClusterInfo();
-  fESDInterface = new AliMUONESDInterface();
   fOCDBPath = ocdbpath;
   if ( (my_calib_option >= ((Int_t)NOGAIN)) && (my_calib_option <= ((Int_t)INJECTIONGAIN)) ) 
     fCalibChoice = (Calibration_t)my_calib_option;
@@ -162,11 +157,17 @@ void AliMUONChamberCalibrationTask::LocalInit()
 {
   //
   /// Initialization
+  /// Initialize the cluster info and the ESD interface
   /// Set the magnetic field, the mapping and the reconstruction parameters
   //
 
   AliDebug( 1, "" );
 
+  // initialize the cluster info and the ESD interface
+
+  fClusterInfo = new AliMUONClusterInfo();
+  fESDInterface = new AliMUONESDInterface();
+
   gRandom->SetSeed(0);
   
   // set mag field
@@ -183,10 +184,9 @@ void AliMUONChamberCalibrationTask::LocalInit()
   AliCDBManager* man = AliCDBManager::Instance();
   man->SetDefaultStorage( fOCDBPath );
   man->SetSpecificStorage( "MUON/Calib/MappingData", fOCDBPath );
-  man->SetSpecificStorage( "MUON/Calib/Mapping", fOCDBPath );
-  man->SetSpecificStorage( "MUON/Calib/DDLStore", fOCDBPath );
-  man->Print();
+  man->SetSpecificStorage( "MUON/Calib/MappingRunData", fOCDBPath ); // for the manu serial numbers
   man->SetRun(0);
+  man->Print();
   if ( ! AliMpCDB::LoadDDLStore() ) {
     AliFatal( "Could not access mapping from OCDB !" );
     exit(-1); 
@@ -367,8 +367,8 @@ void AliMUONChamberCalibrationTask::Exec( Option_t* /*option*/ )
                             ped->ValueAsFloatFast(manuChannel,1) ); // sigma
        padInfo.SetGain( gain->ValueAsFloatFast(manuChannel,0), // a0
                         gain->ValueAsFloatFast(manuChannel,1), // a1
-                        gain->ValueAsFloatFast(manuChannel,2), // threshold
-                        gain->ValueAsFloatFast(manuChannel,3) ); // fit quality
+                        (Int_t)gain->ValueAsFloatFast(manuChannel,2), // threshold
+                        (Int_t)gain->ValueAsFloatFast(manuChannel,3) ); // fit quality
        
        fClusterInfo->AddPad( padInfo );
       }