ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace 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
28
30 {
31 public:
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;
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
void setErrNoiseC(float theErrNoiseC)
void setParameter(RpcCondParType parType, T value)
void setErrRes1(float theErrRes1)
void setErrResX(float theErrResX)
void setErrEff(float theErrEff)
void setTime(float theTime)
void setResX(float theResX)
void setErrRes2(float theErrRes2)
void setEff(float theEff)
void setErrTime(float theErrTime)
void setRes1(float theRes1)
void setId(int stripId)
void setCs(float theCs)
void setNoise(float theNoise)
float getParameter(RpcCondParType parType) const
void setErrNoise(float theErrNoise)
void setErrCs(float theErrCs)
void setRes2(float theRes2)
void setNoiseC(float theNoiseC)
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.