Introduction of AliSurveyObj
[u/mrichter/AliRoot.git] / PHOS / AliPHOSCalibData.h
CommitLineData
52783dbc 1#ifndef ALIPHOSCALIBDATA_H
2#define ALIPHOSCALIBDATA_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9////////////////////////////////////////////////
fc6706cb 10// class for PHOS calibration //
52783dbc 11////////////////////////////////////////////////
12
13#include "TNamed.h"
fc6706cb 14#include "TString.h"
1fdb1c5e 15
16class AliPHOSEmcCalibData;
17class AliPHOSCpvCalibData;
81701069 18class AliPHOSEmcBadChannelsMap;
1fdb1c5e 19class AliCDBMetaData;
52783dbc 20
21class AliPHOSCalibData: public TNamed {
22
23 public:
24 AliPHOSCalibData();
fc6706cb 25 AliPHOSCalibData(Int_t runNumber);
1fdb1c5e 26 AliPHOSCalibData(AliPHOSCalibData & phosCDB);
52783dbc 27 virtual ~AliPHOSCalibData();
3f7dbdb7 28
29 AliPHOSCalibData & operator = (const AliPHOSCalibData & rhs);
30
52783dbc 31 void Reset();
32 virtual void Print(Option_t *option = "") const;
f36dfa9a 33
34 AliPHOSEmcCalibData *GetCalibDataEmc() const {return fCalibDataEmc;}
35 AliPHOSCpvCalibData *GetCalibDataCpv() const {return fCalibDataCpv;}
fc6706cb 36
37 void CreateNew();
e2e977c3 38 void RandomEmc(Float_t ccMin=0.5 , Float_t ccMax=1.5);
39 void RandomCpv(Float_t ccMin=0.0009, Float_t ccMax=0.0015);
fc6706cb 40
072de3a8 41 Float_t GetADCchannelEmc(Int_t module, Int_t column, Int_t row) const;
42 Float_t GetADCpedestalEmc(Int_t module, Int_t column, Int_t row) const;
fc6706cb 43
072de3a8 44 void SetADCchannelEmc(Int_t module, Int_t column, Int_t row, Float_t value);
45 void SetADCpedestalEmc(Int_t module, Int_t column, Int_t row, Float_t value);
52783dbc 46
fc6706cb 47 Float_t GetADCchannelCpv(Int_t module, Int_t column, Int_t row) const;
48 Float_t GetADCpedestalCpv(Int_t module, Int_t column, Int_t row) const;
49
50 void SetADCchannelCpv(Int_t module, Int_t column, Int_t row, Float_t value);
51 void SetADCpedestalCpv(Int_t module, Int_t column, Int_t row, Float_t value);
52
81701069 53 Int_t GetNumOfEmcBadChannels() const;
54 Bool_t IsBadChannelEmc(Int_t module, Int_t col, Int_t row) const;
d940eb29 55 void EmcBadChannelIds(Int_t *badIds=0);
81701069 56
fc6706cb 57 void SetEmcDataPath(const char* emcPath) {fEmcDataPath=emcPath;}
58 void SetCpvDataPath(const char* cpvPath) {fCpvDataPath=cpvPath;}
59
60 Bool_t WriteEmc(Int_t firstRun, Int_t lastRun, AliCDBMetaData *md);
61 Bool_t WriteCpv(Int_t firstRun, Int_t lastRun, AliCDBMetaData *md);
81701069 62 Bool_t WriteEmcBadChannelsMap(Int_t firstRun, Int_t lastRun, AliCDBMetaData *md);
fc6706cb 63
64 private:
65
66 AliPHOSEmcCalibData* fCalibDataEmc; // EMC calibration data
67 AliPHOSCpvCalibData* fCalibDataCpv; // CPV calibration data
81701069 68 AliPHOSEmcBadChannelsMap* fEmcBadChannelsMap; // EMC bad channels map
fc6706cb 69
fc6706cb 70 TString fEmcDataPath; // path to EMC calibration data
71 TString fCpvDataPath; // path to CPV calibration data
81701069 72 TString fEmcBadChannelsMapPath; // path to bad channels map
fc6706cb 73
d940eb29 74 ClassDef(AliPHOSCalibData,4) // PHOS Calibration data
52783dbc 75};
76
77#endif