]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In AliMUONChamberCalibrationTask:
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Jul 2009 09:02:08 +0000 (09:02 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Jul 2009 09:02:08 +0000 (09:02 +0000)
Creating of new objects moved from ctors in Init method
(Andry)

MUON/AliMUONChamberCalibrationTask.cxx
MUON/AliMUONChamberCalibrationTask.h

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 );
       }
index cddb52963213fcd91a9e61fff48f88c73cedf91a..b531e87fd9a87eb7ec04f8f336abb3778815216d 100644 (file)
@@ -26,6 +26,7 @@ class AliESDEvent;
 
 #include "AliAnalysisTaskSE.h"
 #include "TTree.h" 
+#include "TString.h" 
 
 class AliMUONChamberCalibrationTask : public AliAnalysisTaskSE
 {
@@ -63,14 +64,14 @@ class AliMUONChamberCalibrationTask : public AliAnalysisTaskSE
   /// Not implemented
   AliMUONChamberCalibrationTask&  operator = (const AliMUONChamberCalibrationTask& right);
 
-  char* fOCDBPath;                      //!< default path to the condition database
+  TString fOCDBPath;                    //!< default path to the condition database
   Calibration_t fCalibChoice;           //!< calibration option
   TTree* fClusterInfoTree;              //!< TTree filled with the cluster information
   AliMUONRecoParam* fMuonRecoParam;     //!< reconstruction parameters for track refitting
   AliMUONClusterInfo* fClusterInfo;     //!< cluster info used to fill the output TTree
   AliMUONCalibrationData* fCalibData;   //!< needed to access to the calibration data for each pad within each cluster
   AliMUONESDInterface* fESDInterface;   //!< interface to easily access to the ESD content
-  AliMUONVDigitStore* fDigitStore;      //<! pointer to the digit stored for the current input ESD event 
+  AliMUONVDigitStore* fDigitStore;      //!< pointer to the digit stored for the current input ESD event 
   AliESDInputHandler* fESDInputHandler; //!< ESD input handler
   AliESDEvent* fESDInputEvent;          //!< pointer to the current input ESD event