ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MuonCalib::RpcCalibDBEntry Class Reference

representation of a db entry in rpc cond db. More...

#include <RpcCalibDBEntry.h>

Collaboration diagram for MuonCalib::RpcCalibDBEntry:

Public Member Functions

 RpcCalibDBEntry ()
 
 RpcCalibDBEntry (Identifier gapID, const std::string &etaRec, const std::string &etaDet, const std::string &phiRec1, const std::string &phiRec2, const std::string &phiDet1, const std::string &phiDet2)
 
 RpcCalibDBEntry (Identifier gapID, std::string_view payload)
 
void getColumns (std::string &recEta, std::string &detEta, std::string &recPhi1, std::string &recPhi2, std::string &detPhi1, std::string &detPhi2) const
 
 ~RpcCalibDBEntry ()
 
RpcCalibDatagetData (int measPhi, int strip) const
 
const Identifier getGapID () const
 
int getNEtaStrips () const
 
int getNPhiStrips () const
 

Private Member Functions

void initData (std::string etaRec, std::string etaDet, std::string phiRec1, std::string phiRec2, std::string phiDet1, std::string phiDet2)
 

Private Attributes

int m_nRecEta
 
int m_nDetEta
 
int m_nRecPhi1
 
int m_nRecPhi2
 
int m_nDetPhi1
 
int m_nDetPhi2
 
Identifier m_theGap
 
std::vector< RpcCalibData * > m_thePhiData
 
std::vector< RpcCalibData * > m_theEtaData
 

Detailed Description

representation of a db entry in rpc cond db.

Author
andre.nosp@m.a.di.nosp@m..simo.nosp@m.ne@c.nosp@m.ern.c.nosp@m.h

RPC calib db entry

Definition at line 26 of file RpcCalibDBEntry.h.

Constructor & Destructor Documentation

◆ RpcCalibDBEntry() [1/3]

MuonCalib::RpcCalibDBEntry::RpcCalibDBEntry ( )
inline

Definition at line 29 of file RpcCalibDBEntry.h.

29 {};

◆ RpcCalibDBEntry() [2/3]

MuonCalib::RpcCalibDBEntry::RpcCalibDBEntry ( Identifier  gapID,
const std::string &  etaRec,
const std::string &  etaDet,
const std::string &  phiRec1,
const std::string &  phiRec2,
const std::string &  phiDet1,
const std::string &  phiDet2 
)

Definition at line 166 of file RpcCalibDBEntry.cxx.

167  {
168 
169  this->initData(etaRec, etaDet,phiRec1,phiRec2,phiDet1,phiDet2);
170 
171 
172  }

◆ RpcCalibDBEntry() [3/3]

MuonCalib::RpcCalibDBEntry::RpcCalibDBEntry ( Identifier  gapID,
std::string_view  payload 
)

Definition at line 22 of file RpcCalibDBEntry.cxx.

23 
24 
25  std::string::size_type end=payLoad.find("END ");
26  std::string_view etaRec=payLoad.substr(0,end);
27  payLoad=payLoad.substr(end+4,payLoad.size()-end-4);
28 
29  end=payLoad.find("END ");
30  std::string_view etaDet=payLoad.substr(0,end);
31  payLoad=payLoad.substr(end+4,payLoad.size()-end-4);
32 
33  end=payLoad.find("END ");
34  std::string_view phiRec1=payLoad.substr(0,end);
35  payLoad=payLoad.substr(end+4,payLoad.size()-end-4);
36 
37  end=payLoad.find("END ");
38  std::string_view phiRec2=payLoad.substr(0,end);
39  payLoad=payLoad.substr(end+4,payLoad.size()-end-4);
40 
41  end=payLoad.find("END ");
42  std::string_view phiDet1=payLoad.substr(0,end);
43  payLoad=payLoad.substr(end+4,payLoad.size()-end-4);
44 
45  end=payLoad.find("END ");
46  std::string_view phiDet2=payLoad.substr(0,end);
47 
48  this->initData(std::string(etaRec), std::string(etaDet),std::string(phiRec1),std::string(phiRec2),std::string(phiDet1),std::string(phiDet2));
49 
50  }

◆ ~RpcCalibDBEntry()

MuonCalib::RpcCalibDBEntry::~RpcCalibDBEntry ( )

Definition at line 16 of file RpcCalibDBEntry.cxx.

16  {
17  // free nmemory used for data
18  for(unsigned int k=0;k<m_theEtaData.size();k++) delete m_theEtaData[k];
19  for(unsigned int k=0;k<m_thePhiData.size();k++) delete m_thePhiData[k];
20  }

Member Function Documentation

◆ getColumns()

void MuonCalib::RpcCalibDBEntry::getColumns ( std::string &  recEta,
std::string &  detEta,
std::string &  recPhi1,
std::string &  recPhi2,
std::string &  detPhi1,
std::string &  detPhi2 
) const

Definition at line 181 of file RpcCalibDBEntry.cxx.

181  {
182 
183 
184  std::ostringstream recEta_str,detEta_str,recPhi1_str,recPhi2_str,detPhi1_str,detPhi2_str;
185 
186  float eff, errEff, res1, res2, resX, errRes1, errRes2, errResX, time, errTime, noise, errNoise, noiseC, errNoiseC, cs, errCs;
187 
188  recEta_str<<m_nRecEta<<' ';
189  detEta_str<<m_nDetEta<<' ';
190 
191  recPhi1_str<<m_nRecPhi1<<' ';
192  detPhi1_str<<m_nDetPhi1<<' ';
193 
194  recPhi2_str<<m_nRecPhi2<<' ';
195  detPhi2_str<<m_nDetPhi2<<' ';
196 
197 
198 
199  for(int k=0;k<m_nRecEta;k++){
200 
201  const RpcCalibData * theData=m_theEtaData[k];
202 
203  eff=theData->getEff();
204  errEff=theData->getErrEff();
205  res1=theData->getRes1();
206  res2=theData->getRes2();
207  resX=theData->getResX();
208  errRes1=theData->getErrRes1();
209  errRes2=theData->getErrRes2();
210  errResX=theData->getErrResX();
211  time=theData->getTime();
212  errTime=theData->getErrTime();
213  noise=theData->getNoise();
214  noiseC=theData->getNoiseC();
215  errNoise=theData->getErrNoise();
216  errNoiseC=theData->getErrNoiseC();
217  cs=theData->getCs();
218  errCs=theData->getErrCs();
219 
220  recEta_str<< eff<< ' '<<errEff<< ' '<<res1<< ' '<<errRes1<< ' '<<res2<< ' '<<errRes2<< ' '<<resX<< ' '<<errResX<< ' '<<time<< ' '<<errTime<< ' ';
221  detEta_str<<noise<< ' '<<errNoise<< ' '<<noiseC<< ' '<<errNoiseC<< ' '<<cs<< ' '<<errCs<< ' ';
222 
223 
224  }
225 
226  for(int k=0;k<m_nRecPhi1;k++){
227 
228  const RpcCalibData * theData=m_thePhiData[k];
229 
230  eff=theData->getEff();
231  errEff=theData->getErrEff();
232  res1=theData->getRes1();
233  res2=theData->getRes2();
234  resX=theData->getResX();
235  errRes1=theData->getErrRes1();
236  errRes2=theData->getErrRes2();
237  errResX=theData->getErrResX();
238  time=theData->getTime();
239  errTime=theData->getErrTime();
240  noise=theData->getNoise();
241  noiseC=theData->getNoiseC();
242  errNoise=theData->getErrNoise();
243  errNoiseC=theData->getErrNoiseC();
244  cs=theData->getCs();
245  errCs=theData->getErrCs();
246 
247  recPhi1_str<<eff<<' ' <<res1<<' ' <<res2<<' ' <<resX<<' ' <<time<< ' ';
248  recPhi2_str<<errEff<<' ' <<errRes1<<' ' <<errRes2<<' ' <<errResX<<' ' <<errTime<< ' ';
249  detPhi1_str<<noise<<' ' <<errNoise<<' ' <<noiseC<<' ' <<errNoiseC<<' ' <<cs<<' ' <<errCs<< ' ';
250 
251 
252  }
253 
254  // give back strings
255 
256  recEta=recEta_str.str();
257  detEta=detEta_str.str();
258  recPhi1=recPhi1_str.str();
259  recPhi2=recPhi2_str.str();
260  detPhi1=detPhi1_str.str();
261  detPhi2=detPhi2_str.str();
262 
263  }

◆ getData()

RpcCalibData* MuonCalib::RpcCalibDBEntry::getData ( int  measPhi,
int  strip 
) const

◆ getGapID()

const Identifier MuonCalib::RpcCalibDBEntry::getGapID ( ) const

Definition at line 175 of file RpcCalibDBEntry.cxx.

175  {
176 
177  return m_theGap;
178 
179  }

◆ getNEtaStrips()

int MuonCalib::RpcCalibDBEntry::getNEtaStrips ( ) const
inline

Definition at line 39 of file RpcCalibDBEntry.h.

39 {return m_nRecEta;}

◆ getNPhiStrips()

int MuonCalib::RpcCalibDBEntry::getNPhiStrips ( ) const
inline

Definition at line 40 of file RpcCalibDBEntry.h.

40 {return m_nRecPhi1;}

◆ initData()

void MuonCalib::RpcCalibDBEntry::initData ( std::string  etaRec,
std::string  etaDet,
std::string  phiRec1,
std::string  phiRec2,
std::string  phiDet1,
std::string  phiDet2 
)
private

Definition at line 52 of file RpcCalibDBEntry.cxx.

52  {
53 
54 
55  unsigned long int pos = 0;
56  std::string::size_type start = etaRec.find_first_not_of(' ',pos);
57  if(start == std::string::npos) {
58  std::cout << "RpcCalibDBEntry::initData -- problems extracting m_nRecEta -- crashing." << std::endl;
59  std::abort();
60  }
61  std::string::size_type stop = etaRec.find_first_of(' ',start+1);
62  if (stop == std::string::npos) stop = etaRec.size();
63  m_nRecEta = std::stoi(etaRec.substr(start,stop-start),nullptr);
64  etaRec.erase(pos,stop-pos);
65 
66  pos = 0;
67  start = phiRec1.find_first_not_of(' ',pos);
68  if(start == std::string::npos) {
69  std::cout << "RpcCalibDBEntry::initData -- problems extracting m_nRecPhi1 -- crashing." << std::endl;
70  std::abort();
71  }
72  stop = phiRec1.find_first_of(' ',start+1);
73  if (stop == std::string::npos) stop = phiRec1.size();
74  m_nRecPhi1 = std::stoi(phiRec1.substr(start,stop-start),nullptr);
75  phiRec1.erase(pos,stop-pos);
76 
77  std::istringstream etaRec_str;
78  std::istringstream etaDet_str;
79  std::istringstream phiRec1_str;
80  std::istringstream phiRec2_str;
81  std::istringstream phiDet1_str;
82  std::istringstream phiDet2_str;
83 
84  etaRec_str.str(etaRec);
85  etaDet_str.str(etaDet);
86  phiRec1_str.str(phiRec1);
87  phiRec2_str.str(phiRec2);
88  phiDet1_str.str(phiDet1);
89  phiDet2_str.str(phiDet2);
90 
91  etaDet_str>>m_nDetEta;
92  phiRec2_str>>m_nRecPhi2;
93  phiDet1_str>>m_nDetPhi1;
94  phiDet2_str>>m_nDetPhi2;
95 
96  float eff, errEff, res1, res2, resX, errRes1, errRes2, errResX, time, errTime, noise, errNoise, noiseC, errNoiseC, cs, errCs;
97 
98  // start with eta processing, 41 strips
99 
100  for(int k=0;k<m_nRecEta;k++){
101 
102  etaRec_str>>eff>>errEff>>res1>>errRes1>>res2>>errRes2>>resX>>errResX>>time>>errTime;
103  etaDet_str>>noise>>errNoise>>noiseC>>errNoiseC>>cs>>errCs;
104 
105  RpcCalibData * etaData=new RpcCalibData;
106 
107  etaData->setId(k);
108  etaData->setEff(eff);
109  etaData->setErrEff(errEff);
110  etaData->setRes1(res1);
111  etaData->setRes2(res2);
112  etaData->setResX(resX);
113  etaData->setErrRes1(errRes1);
114  etaData->setErrRes2(errRes2);
115  etaData->setErrResX(errResX);
116  etaData->setTime(time);
117  etaData->setErrTime(errTime);
118  etaData->setNoise(noise);
119  etaData->setNoiseC(noiseC);
120  etaData->setErrNoise(errNoise);
121  etaData->setErrNoiseC(errNoiseC);
122  etaData->setCs(cs);
123  etaData->setErrCs(errCs);
124 
125  m_theEtaData.push_back(etaData);
126 
127  }
128 
129  // now phi
130 
131  for(int k=0;k<m_nRecPhi1;k++){
132 
133  phiRec1_str>>eff>>res1>>res2>>resX>>time;
134  phiRec2_str>>errEff>>errRes1>>errRes2>>errResX>>errTime;
135  phiDet1_str>>noise>>errNoise>>noiseC>>errNoiseC>>cs>>errCs;
136 
137  RpcCalibData * phiData=new RpcCalibData;
138 
139  phiData->setId(k);
140  phiData->setEff(eff);
141  phiData->setErrEff(errEff);
142  phiData->setRes1(res1);
143  phiData->setRes2(res2);
144  phiData->setResX(resX);
145  phiData->setErrRes1(errRes1);
146  phiData->setErrRes2(errRes2);
147  phiData->setErrResX(errResX);
148  phiData->setTime(time);
149  phiData->setErrTime(errTime);
150  phiData->setNoise(noise);
151  phiData->setNoiseC(noiseC);
152  phiData->setErrNoise(errNoise);
153  phiData->setErrNoiseC(errNoiseC);
154  phiData->setCs(cs);
155  phiData->setErrCs(errCs);
156 
157  m_thePhiData.push_back(phiData);
158 
159  }
160 
161 
162  }

Member Data Documentation

◆ m_nDetEta

int MuonCalib::RpcCalibDBEntry::m_nDetEta
private

Definition at line 44 of file RpcCalibDBEntry.h.

◆ m_nDetPhi1

int MuonCalib::RpcCalibDBEntry::m_nDetPhi1
private

Definition at line 44 of file RpcCalibDBEntry.h.

◆ m_nDetPhi2

int MuonCalib::RpcCalibDBEntry::m_nDetPhi2
private

Definition at line 44 of file RpcCalibDBEntry.h.

◆ m_nRecEta

int MuonCalib::RpcCalibDBEntry::m_nRecEta
private

Definition at line 44 of file RpcCalibDBEntry.h.

◆ m_nRecPhi1

int MuonCalib::RpcCalibDBEntry::m_nRecPhi1
private

Definition at line 44 of file RpcCalibDBEntry.h.

◆ m_nRecPhi2

int MuonCalib::RpcCalibDBEntry::m_nRecPhi2
private

Definition at line 44 of file RpcCalibDBEntry.h.

◆ m_theEtaData

std::vector<RpcCalibData*> MuonCalib::RpcCalibDBEntry::m_theEtaData
private

Definition at line 47 of file RpcCalibDBEntry.h.

◆ m_theGap

Identifier MuonCalib::RpcCalibDBEntry::m_theGap
private

Definition at line 45 of file RpcCalibDBEntry.h.

◆ m_thePhiData

std::vector<RpcCalibData*> MuonCalib::RpcCalibDBEntry::m_thePhiData
private

Definition at line 46 of file RpcCalibDBEntry.h.


The documentation for this class was generated from the following files:
MuonCalib::RpcCalibDBEntry::m_thePhiData
std::vector< RpcCalibData * > m_thePhiData
Definition: RpcCalibDBEntry.h:46
MuonCalib::RpcCalibDBEntry::m_theEtaData
std::vector< RpcCalibData * > m_theEtaData
Definition: RpcCalibDBEntry.h:47
MuonCalib::RpcCalibDBEntry::m_nRecPhi2
int m_nRecPhi2
Definition: RpcCalibDBEntry.h:44
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
MuonCalib::RpcCalibDBEntry::m_nDetPhi1
int m_nDetPhi1
Definition: RpcCalibDBEntry.h:44
MuonCalib::RpcCalibDBEntry::m_nDetPhi2
int m_nDetPhi2
Definition: RpcCalibDBEntry.h:44
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
MuonCalib::RpcCalibDBEntry::m_nDetEta
int m_nDetEta
Definition: RpcCalibDBEntry.h:44
MuonCalib::RpcCalibDBEntry::initData
void initData(std::string etaRec, std::string etaDet, std::string phiRec1, std::string phiRec2, std::string phiDet1, std::string phiDet2)
Definition: RpcCalibDBEntry.cxx:52
MuonCalib::RpcCalibDBEntry::m_theGap
Identifier m_theGap
Definition: RpcCalibDBEntry.h:45
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
MuonCalib::RpcCalibDBEntry::m_nRecPhi1
int m_nRecPhi1
Definition: RpcCalibDBEntry.h:44
dqt_zlumi_alleff_HIST.eff
int eff
Definition: dqt_zlumi_alleff_HIST.py:113
MuonCalib::RpcCalibDBEntry::m_nRecEta
int m_nRecEta
Definition: RpcCalibDBEntry.h:44
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
fitman.k
k
Definition: fitman.py:528