From 7f56b767504d138d104879531058e7923ebfcc74 Mon Sep 17 00:00:00 2001 From: ivana Date: Fri, 10 Jul 2009 09:02:08 +0000 Subject: [PATCH] In AliMUONChamberCalibrationTask: Creating of new objects moved from ctors in Init method (Andry) --- MUON/AliMUONChamberCalibrationTask.cxx | 20 ++++++++++---------- MUON/AliMUONChamberCalibrationTask.h | 5 +++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/MUON/AliMUONChamberCalibrationTask.cxx b/MUON/AliMUONChamberCalibrationTask.cxx index 47db979fe96..89e45e54667 100644 --- a/MUON/AliMUONChamberCalibrationTask.cxx +++ b/MUON/AliMUONChamberCalibrationTask.cxx @@ -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 ); } diff --git a/MUON/AliMUONChamberCalibrationTask.h b/MUON/AliMUONChamberCalibrationTask.h index cddb5296321..b531e87fd9a 100644 --- a/MUON/AliMUONChamberCalibrationTask.h +++ b/MUON/AliMUONChamberCalibrationTask.h @@ -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; //