]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONCalibrationData.h
Coding conventions
[u/mrichter/AliRoot.git] / MUON / AliMUONCalibrationData.h
CommitLineData
c5bdf179 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2* See cxx source for full Copyright notice */
3
4// $Id$
5
6/// \ingroup base
7/// \class AliMUONCalibrationData
c3ce65fd 8/// \brief Single entry point to access MUON calibration data.
9///
10/// For the moment, this class stores pedestals, gains and deadchannels
11/// that are fetched from the CDB.
c5bdf179 12///
13/// \author Laurent Aphecetche
14
15#ifndef ALIMUONCALIBRATIONDATA_H
16#define ALIMUONCALIBRATIONDATA_H
17
18#ifndef ROOT_TObject
19#include "TObject.h"
20#endif
21
22class AliCDBEntry;
c3ce65fd 23class AliMUONVCalibParam;
24class AliMUONV2DStore;
c5bdf179 25
26class AliMUONCalibrationData : public TObject
27{
28public:
c3ce65fd 29 /** Constructor.
30 * @param runNumber is used as a key to the CDB
31 * @param deferredInitialization if kFALSE, all the calibrations are fetched
32 * regardless of whether you'll use them or not.
33 */
c5bdf179 34 AliMUONCalibrationData(Int_t runNumber=-1, Bool_t deferredInitialization=kTRUE);
35 virtual ~AliMUONCalibrationData();
c3ce65fd 36
37 /// Get the DeadChannel calibration object for channels within (detElemId,manuId).
38 AliMUONVCalibParam* DeadChannel(Int_t detElemId, Int_t manuId) const;
c5bdf179 39
c3ce65fd 40 /// Get the Gain calibration object for channels within (detElemId,manuId).
41 AliMUONVCalibParam* Gain(Int_t detElemId, Int_t manuId) const;
42
43 /// Whether this object is valid or not (might be invalid if fetching from CDB failed).
44 Bool_t IsValid() const { return fIsValid; }
c5bdf179 45
c3ce65fd 46 /// Get the Pedestal calibration object for channels within (detElemId,manuId).
47 AliMUONVCalibParam* Pedestal(Int_t detElemId, Int_t manuId) const;
c5bdf179 48
c3ce65fd 49 /// Dump to screen.
c5bdf179 50 virtual void Print(Option_t* opt="") const;
51
c3ce65fd 52 /// The runnumber used by this object.
53 Int_t RunNumber() const { return fRunNumber; }
c5bdf179 54
884a73f1 55protected:
56 AliMUONCalibrationData(const AliMUONCalibrationData& right);
57 AliMUONCalibrationData& operator = (const AliMUONCalibrationData& right);
58
c5bdf179 59private:
60 AliCDBEntry* GetEntry(const char* path) const;
c3ce65fd 61 AliMUONV2DStore* Gains() const;
62 AliMUONV2DStore* Pedestals() const;
63 AliMUONV2DStore* DeadChannels() const;
64
c5bdf179 65private:
66 mutable Bool_t fIsValid;
67 Int_t fRunNumber;
c3ce65fd 68 mutable AliMUONV2DStore* fGains; //!
69 mutable AliMUONV2DStore* fPedestals; //!
70 mutable AliMUONV2DStore* fDeadChannels; //!
c5bdf179 71
c3ce65fd 72 ClassDef(AliMUONCalibrationData,2) // Storage for all MUON calibration data.
c5bdf179 73};
74
75#endif