ATLAS Offline Software
RpcCalibData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef RPCCALIBDATA_H
6 #define RPCCALIBDATA_H
7 
8 #include <string>
9 #include <iostream>
11 
12 namespace MuonCalib{
13 
14  //This is a satus flag that would never naturally exist, and thus will be the default
15  //value. If you get this, the database value wasn't ever retrieved for the strip you
16  //are requesting.
17 
18  #define RPC_COND_STATUS_ERROR_CODE 0xFF
19 
30  {
31  public:
32  RpcCalibData();
34 
35  //Set functions
36  void setId(int stripId);
37  void setEff(float theEff);
38  void setErrEff(float theErrEff);
39  void setRes1(float theRes1);
40  void setRes2(float theRes2);
41  void setResX(float theResX);
42  void setErrRes1(float theErrRes1);
43  void setErrRes2(float theErrRes2);
44  void setErrResX(float theErrResX);
45  void setTime(float theTime);
46  void setErrTime(float theErrTime);
47  void setNoise(float theNoise);
48  void setNoiseC(float theNoiseC);
49  void setErrNoise(float theErrNoise);
50  void setErrNoiseC(float theErrNoiseC);
51  void setCs(float theCs);
52  void setErrCs(float theErrCs);
53 
54  template <class T>
55  void setParameter(RpcCondParType parType, T value); //generic parameter type function.
56 
57  //Get a parameter
58 
59  int getId() const;
60 
61  float getEff() const;
62  float getErrEff() const;
63  float getRes1() const;
64  float getRes2() const;
65  float getResX() const;
66  float getErrRes1() const;
67  float getErrRes2() const;
68  float getErrResX() const;
69  float getTime() const;
70  float getErrTime() const;
71  float getNoise() const;
72  float getNoiseC() const;
73  float getErrNoise() const;
74  float getErrNoiseC() const;
75  float getCs() const;
76  float getErrCs() const;
77 
78  //For access to parameter's via one function. Accepts enum parType
79  float getParameter(RpcCondParType parType) const;
80 
81  private:
82  int m_id = 0;
83  float m_eff = 0.0F, m_errEff = 0.0F, m_res1 = 0.0F, m_res2 = 0.0F, m_resX = 0.0F, m_errRes1 = 0.0F, m_errRes2 = 0.0F, m_errResX = 0.0F, m_time = 0.0F, m_errTime = 0.0F, m_noise = 0.0F, m_errNoise = 0.0F, m_noiseC = 0.0F, m_errNoiseC = 0.0F, m_cs = 0.0F, m_errCs = 0.0F;
84 
85  };
86 
87 
88  //or use general set function
89  template <class T>
90  void RpcCalibData::setParameter(RpcCondParType parType,T value) //generic parameter type function.
91  {
92 
93  switch(parType)
94  {
96  m_eff = value;
97  break;
99  m_errEff = value;
100  break;
102  m_res1 = value;
103  break;
105  m_errRes1 = value;
106  break;
108  m_res2 = value;
109  break;
111  m_errRes2 = value;
112  break;
114  m_resX = value;
115  break;
117  m_errResX = value;
118  break;
120  m_time = value;
121  break;
123  m_errTime = value;
124  break;
126  m_noise = value;
127  break;
129  m_noiseC = value;
130  break;
132  m_errNoise = value;
133  break;
135  m_errNoiseC = value;
136  break;
137  case RpcCondParType::CS:
138  m_cs = value;
139  break;
141  m_errCs = value;
142  break;
143  default:
144  std::cout << "RpcCalibData ERROR: Invalid parameter type specified for setParameter."
145  << std::endl;
146  }
147  }
148 
149 }
150 
151 #endif
MuonCalib::RpcCalibData::getErrNoiseC
float getErrNoiseC() const
Definition: RpcCalibData.cxx:73
MuonCalib::RpcCalibData::setRes1
void setRes1(float theRes1)
Definition: RpcCalibData.cxx:40
MuonCalib::RpcCalibData::getRes2
float getRes2() const
Definition: RpcCalibData.cxx:63
MuonCalib::RpcCalibData::m_errTime
float m_errTime
Definition: RpcCalibData.h:83
MuonCalib::RpcCondParType::RES2
@ RES2
Definition: RpcCondParType.h:14
MuonCalib::RpcCalibData::setErrEff
void setErrEff(float theErrEff)
Definition: RpcCalibData.cxx:39
MuonCalib::RpcCalibData::setNoiseC
void setNoiseC(float theNoiseC)
Definition: RpcCalibData.cxx:49
MuonCalib::RpcCalibData::getErrResX
float getErrResX() const
Definition: RpcCalibData.cxx:67
MuonCalib::RpcCalibData::getErrRes1
float getErrRes1() const
Definition: RpcCalibData.cxx:65
MuonCalib::RpcCondParType::NOISE
@ NOISE
Definition: RpcCondParType.h:17
MuonCalib::RpcCalibData::setErrTime
void setErrTime(float theErrTime)
Definition: RpcCalibData.cxx:47
MuonCalib::RpcCalibData::setEff
void setEff(float theEff)
Definition: RpcCalibData.cxx:38
MuonCalib::RpcCalibData::getErrRes2
float getErrRes2() const
Definition: RpcCalibData.cxx:66
MuonCalib::RpcCalibData::getTime
float getTime() const
Definition: RpcCalibData.cxx:68
MuonCalib::RpcCalibData::m_errNoise
float m_errNoise
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::getNoise
float getNoise() const
Definition: RpcCalibData.cxx:70
MuonCalib::RpcCalibData::RpcCalibData
RpcCalibData()
Definition: RpcCalibData.cxx:13
MuonCalib::RpcCondParType
Definition: RpcCondParType.h:9
athena.value
value
Definition: athena.py:124
MuonCalib::RpcCalibData::setTime
void setTime(float theTime)
Definition: RpcCalibData.cxx:46
MuonCalib::RpcCondParType::ERRNOISE
@ ERRNOISE
Definition: RpcCondParType.h:17
MuonCalib::RpcCalibData::getParameter
float getParameter(RpcCondParType parType) const
Definition: RpcCalibData.cxx:77
MuonCalib::RpcCalibData::getErrEff
float getErrEff() const
Definition: RpcCalibData.cxx:61
MuonCalib::RpcCalibData::setNoise
void setNoise(float theNoise)
Definition: RpcCalibData.cxx:48
MuonCalib::RpcCalibData::m_res2
float m_res2
Definition: RpcCalibData.h:83
MuonCalib::RpcCondParType::RESX
@ RESX
Definition: RpcCondParType.h:15
MuonCalib::RpcCalibData::m_eff
float m_eff
Definition: RpcCalibData.h:83
MuonCalib::RpcCondParType::CS
@ CS
Definition: RpcCondParType.h:19
MuonCalib::RpcCalibData::getId
int getId() const
Definition: RpcCalibData.cxx:59
MuonCalib::RpcCalibData::m_errRes2
float m_errRes2
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::setResX
void setResX(float theResX)
Definition: RpcCalibData.cxx:42
MuonCalib::RpcCalibData::getRes1
float getRes1() const
Definition: RpcCalibData.cxx:62
MuonCalib::RpcCondParType::NOISEC
@ NOISEC
Definition: RpcCondParType.h:18
MuonCalib::RpcCalibData::setParameter
void setParameter(RpcCondParType parType, T value)
Definition: RpcCalibData.h:90
MuonCalib::RpcCalibData
holds all conditions data for rpc strip.
Definition: RpcCalibData.h:30
MuonCalib::RpcCalibData::m_time
float m_time
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::setErrNoise
void setErrNoise(float theErrNoise)
Definition: RpcCalibData.cxx:50
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::RpcCalibData::m_errResX
float m_errResX
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::m_errCs
float m_errCs
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::m_errRes1
float m_errRes1
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::getEff
float getEff() const
Definition: RpcCalibData.cxx:60
RpcCondParType.h
MuonCalib::RpcCondParType::ERRNOISEC
@ ERRNOISEC
Definition: RpcCondParType.h:18
MuonCalib::RpcCondParType::ERRRES2
@ ERRRES2
Definition: RpcCondParType.h:14
MuonCalib::RpcCalibData::m_noiseC
float m_noiseC
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::m_cs
float m_cs
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::getResX
float getResX() const
Definition: RpcCalibData.cxx:64
MuonCalib::RpcCalibData::getErrCs
float getErrCs() const
Definition: RpcCalibData.cxx:75
MuonCalib::RpcCalibData::m_errNoiseC
float m_errNoiseC
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::m_id
int m_id
Definition: RpcCalibData.h:82
MuonCalib::RpcCalibData::setRes2
void setRes2(float theRes2)
Definition: RpcCalibData.cxx:41
MuonCalib::RpcCalibData::getErrNoise
float getErrNoise() const
Definition: RpcCalibData.cxx:72
MuonCalib::RpcCondParType::TIME
@ TIME
Definition: RpcCondParType.h:16
MuonCalib::RpcCalibData::setErrRes2
void setErrRes2(float theErrRes2)
Definition: RpcCalibData.cxx:44
MuonCalib::RpcCalibData::getCs
float getCs() const
Definition: RpcCalibData.cxx:74
MuonCalib::RpcCalibData::setErrResX
void setErrResX(float theErrResX)
Definition: RpcCalibData.cxx:45
MuonCalib::RpcCalibData::setErrNoiseC
void setErrNoiseC(float theErrNoiseC)
Definition: RpcCalibData.cxx:51
MuonCalib::RpcCondParType::ERRRESX
@ ERRRESX
Definition: RpcCondParType.h:15
MuonCalib::RpcCondParType::ERRCS
@ ERRCS
Definition: RpcCondParType.h:19
MuonCalib::RpcCalibData::getNoiseC
float getNoiseC() const
Definition: RpcCalibData.cxx:71
MuonCalib::RpcCondParType::ERREFF
@ ERREFF
Definition: RpcCondParType.h:12
MuonCalib::RpcCondParType::EFF
@ EFF
Definition: RpcCondParType.h:12
MuonCalib::RpcCalibData::m_resX
float m_resX
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::setCs
void setCs(float theCs)
Definition: RpcCalibData.cxx:52
MuonCalib::RpcCalibData::m_errEff
float m_errEff
Definition: RpcCalibData.h:83
MuonCalib::RpcCondParType::ERRTIME
@ ERRTIME
Definition: RpcCondParType.h:16
MuonCalib::RpcCalibData::~RpcCalibData
~RpcCalibData()
Definition: RpcCalibData.h:33
MuonCalib::RpcCalibData::setErrRes1
void setErrRes1(float theErrRes1)
Definition: RpcCalibData.cxx:43
MuonCalib::RpcCalibData::setId
void setId(int stripId)
Definition: RpcCalibData.cxx:37
MuonCalib::RpcCalibData::getErrTime
float getErrTime() const
Definition: RpcCalibData.cxx:69
MuonCalib::RpcCondParType::ERRRES1
@ ERRRES1
Definition: RpcCondParType.h:13
MuonCalib::RpcCalibData::m_res1
float m_res1
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::m_noise
float m_noise
Definition: RpcCalibData.h:83
MuonCalib::RpcCalibData::setErrCs
void setErrCs(float theErrCs)
Definition: RpcCalibData.cxx:53
MuonCalib::RpcCondParType::RES1
@ RES1
Definition: RpcCondParType.h:13