From: schutz Date: Tue, 28 Feb 2006 10:11:01 +0000 (+0000) Subject: New Alignment class and methods to Loader X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=bcdecbbec5d5c7beaf078d1d103199a56a79a230;p=u%2Fmrichter%2FAliRoot.git New Alignment class and methods to Loader --- diff --git a/EMCAL/AliEMCALAlignData.cxx b/EMCAL/AliEMCALAlignData.cxx new file mode 100644 index 00000000000..e5d0cabac58 --- /dev/null +++ b/EMCAL/AliEMCALAlignData.cxx @@ -0,0 +1,110 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id$ */ + +//////////////////////////////////////////////// +// class for EMCAL alignment parameters // +//////////////////////////////////////////////// + +#include "AliEMCALAlignData.h" + +ClassImp(AliEMCALAlignData) + +//________________________________________________________________ +AliEMCALAlignData::AliEMCALAlignData() +{ + // Default constructor + Reset(); +} + +//________________________________________________________________ +AliEMCALAlignData::AliEMCALAlignData(const char* name) +{ + // Constructor + TString namst = "Align_"; + namst += name; + SetName(namst.Data()); + SetTitle(namst.Data()); + Reset(); +} + +//________________________________________________________________ +AliEMCALAlignData::AliEMCALAlignData(const AliEMCALAlignData& alignda) : + TNamed(alignda) +{ + // copy constructor + SetName(alignda.GetName()); + SetTitle(alignda.GetName()); + Reset(); + fNSuperModules = alignda.GetNSuperModules(); + for(Int_t module=0; moduleIsDefaultStorageSet()) ) + fAlignData=0x0; + return fAlignData; +} + //____________________________________________________________________________ AliEMCALCalibData* AliEMCALLoader::CalibData() { - //Get the Calibration data list + // Check if the instance of AliEMCALCalibData exists, and return it if( !(AliCDBManager::Instance()->IsDefaultStorageSet()) ) { fCalibData=0x0; - Warning("CalibData","Calibration DB is not initiated!"); return fCalibData; } diff --git a/EMCAL/AliEMCALLoader.h b/EMCAL/AliEMCALLoader.h index 79b43822211..9bfe567a69f 100644 --- a/EMCAL/AliEMCALLoader.h +++ b/EMCAL/AliEMCALLoader.h @@ -27,6 +27,7 @@ class TTask ; // --- AliRoot header files --- #include "AliLoader.h" #include "AliEMCALCalibData.h" +#include "AliEMCALAlignData.h" class AliLoader ; class AliEMCAL ; @@ -103,10 +104,11 @@ class AliEMCALLoader : public AliLoader { //Calibration Int_t CalibrateRaw (Double_t energy, Int_t module, Int_t column, Int_t row);//take real calibration coefficients - - void SetCalibData(AliEMCALCalibData* calibda) { fCalibData = calibda; } - - AliEMCALCalibData * CalibData(); // to get the CDB object + + void SetAlignData(AliEMCALAlignData* alignda) { fAlignData = alignda; } + void SetCalibData(AliEMCALCalibData* calibda) { fCalibData = calibda; } + AliEMCALAlignData * AlignData(); // to get the alignment CDB object + AliEMCALCalibData * CalibData(); // to get the calibration CDB object private: @@ -120,7 +122,9 @@ private: TClonesArray *fHits; //! TClonesArray of hits (for tree reading) TClonesArray *fDigits; //! TClonesArray of digits (for tree reading) TClonesArray *fSDigits; //! TClonesArray of sdigits (for tree reading) - TObjArray *fRecPoints; //! TClonesArray of recpoints (for tree reading) + TObjArray *fRecPoints; //! TClonesArray of recpoints (for tree reading) + + static AliEMCALAlignData * fAlignData; static AliEMCALCalibData * fCalibData; // calibration data ClassDef(AliEMCALLoader,0) // Algorithm class that provides methods to retrieve objects from a list knowing the index