ATLAS Offline Software
NswCalibDbAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "TTree.h"
8 #include "TFile.h"
10 #include "CoralBase/Blob.h"
18 
19 #include<ctime>
20 
21 // Initialize
24 
25  // retrievals
26  ATH_MSG_DEBUG( "initializing " << name() );
28  ATH_CHECK(m_idHelperSvc.retrieve());
29 
30  // initialize read keys
45 
46  // write key for time/charge data
48 
49  // write key for threshold data
51 
53 
54  return StatusCode::SUCCESS;
55 }
56 
57 
58 // execute
60 NswCalibDbAlg::execute(const EventContext& ctx) const {
61 
62  ATH_MSG_DEBUG( "execute " << name() );
63 
64  if(processTdoPdoData(ctx).isFailure()) return StatusCode::FAILURE;
65  if(processThrData (ctx).isFailure()) return StatusCode::FAILURE;
67 
68  return StatusCode::SUCCESS;
69 
70 }
71 
72 // processTdoPdoData
74 NswCalibDbAlg::processTdoPdoData(const EventContext& ctx) const {
75 
76  // set up write handles for time/charge data
78  if (wrHdl.isValid()) {
79  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
80  << " In theory this should not be called, but may happen"
81  << " if multiple concurrent events are being processed out of order.");
82  return StatusCode::SUCCESS;
83  }
84  ATH_MSG_DEBUG("Range of time/charge output is " << wrHdl.getRange());
85  std::unique_ptr<NswCalibDbTimeChargeData> wrCdo{std::make_unique<NswCalibDbTimeChargeData>(m_idHelperSvc.get())};
86 
87  // MM
92 
93  // sTGC
98 
99  // insert/write data for time/charge data
100  if (wrHdl.record(std::move(wrCdo)).isFailure()) {
101  ATH_MSG_FATAL("Could not record " << wrHdl.key()
102  << " with EventRange " << wrHdl.getRange()
103  << " into Conditions Store");
104  return StatusCode::FAILURE;
105  }
106  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
107 
108  return StatusCode::SUCCESS; // nothing to do
109 
110 }
111 
112 
113 // processThrData
114 StatusCode
115 NswCalibDbAlg::processThrData(const EventContext& ctx) const {
116 
117  if(m_isData) return StatusCode::SUCCESS; // nothing to do
118 
119  // set up write handles for threshold data
121  if (wrHdl.isValid()) {
122  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
123  << " In theory this should not be called, but may happen"
124  << " if multiple concurrent events are being processed out of order.");
125  return StatusCode::SUCCESS;
126  }
127  ATH_MSG_DEBUG("Range of threshold output is " << wrHdl.getRange());
128  std::unique_ptr<NswCalibDbThresholdData> wrCdo{std::make_unique<NswCalibDbThresholdData>(m_idHelperSvc->mmIdHelper(), m_idHelperSvc->stgcIdHelper())};
129 
134 
135  // insert/write data for threshold data
136  if (wrHdl.record(std::move(wrCdo)).isFailure()) {
137  ATH_MSG_FATAL("Could not record " << wrHdl.key()
138  << " with EventRange " << wrHdl.getRange()
139  << " into Conditions Store");
140  return StatusCode::FAILURE;
141  }
142  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
143 
144  return StatusCode::SUCCESS;
145 }
146 
147 // processMmT0Data
148 StatusCode
149 NswCalibDbAlg::processNSWT0Data(const EventContext& ctx) const {
150  // set up write handles for MmT0 data
151  writeHandleT0_t wrHdl{m_writeKey_nswT0, ctx};
152  if (wrHdl.isValid()) {
153  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
154  << " In theory this should not be called, but may happen"
155  << " if multiple concurrent events are being processed out of order.");
156  return StatusCode::SUCCESS;
157  }
158  ATH_MSG_DEBUG("Range of MmT0 output is " << wrHdl.getRange());
159  std::unique_ptr<NswT0Data> wrCdo{std::make_unique<NswT0Data>(m_idHelperSvc.get())};
160  if(m_loadMmT0Data){
161  if(!m_mmT0FilePath.empty() ){ // let's read the constants from a file
162  wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteTime()));
163  std::unique_ptr<TFile> file (TFile::Open(m_mmT0FilePath.value().c_str()));
164  if(!file || file->IsZombie()){
165  ATH_MSG_FATAL("Failed to open file containing the MM T0Data. Filepath: "<<m_mmT0FilePath);
166  return StatusCode::FAILURE;
167  }
168  std::unique_ptr<TTree> tree{(TTree*)file->Get("tree_ch")};
169  if(!tree){
170  ATH_MSG_FATAL("Failed to load tree containing the NswT0Data.");
171  return StatusCode::FAILURE;
172  }
173  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::MM));
174 
175  } else if(!m_readKey_mm_t0.empty()){
176  ATH_MSG_DEBUG("LOAD NSW MM T0 FROM DB");
177  std::unique_ptr<TTree> tree;
179  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::MM));
180 
181  } else {
182  ATH_MSG_ERROR("Neither a database folder nor a file have been provided to read the MM T0 constants");
183  return StatusCode::FAILURE;
184  }
185  }
186  if(m_loadsTgcT0Data){
187  if(!m_stgcT0FilePath.empty() ){ // let's read the constants from a file
188  wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteTime()));
189  std::unique_ptr<TFile> file (TFile::Open(m_stgcT0FilePath.value().c_str()));
190  if(!file || file->IsZombie()){
191  ATH_MSG_FATAL("Failed to open file containing the MM T0Data. Filepath: "<<m_stgcT0FilePath);
192  return StatusCode::FAILURE;
193  }
194  std::unique_ptr<TTree> tree{(TTree*)file->Get("tree_ch")};
195  if(!tree){
196  ATH_MSG_FATAL("Failed to load tree containing the NswT0Data.");
197  return StatusCode::FAILURE;
198  }
199  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::STGC));
200 
201  } else if(!m_readKey_stgc_t0.empty()){
202  ATH_MSG_DEBUG("LOAD NSW sTGC T0 FROM DB");
203  std::unique_ptr<TTree> tree;
205  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::STGC));
206 
207  } else {
208  ATH_MSG_ERROR("Neither a database folder nor a file have been provided to read the sTGC T0 constants");
209  return StatusCode::FAILURE;
210  }
211  }
212 
213  // insert/write data for NswT0Data data
214  ATH_CHECK(wrHdl.record(std::move(wrCdo)));
215  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
216 
217  return StatusCode::SUCCESS;
218 }
219 
220 StatusCode NswCalibDbAlg::loadT0ToTree(const EventContext& ctx, const readKey_t& readKey, writeHandleT0_t& writeHandle, std::unique_ptr<TTree>& tree) const{
221  // set up read handle
222  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
223  const CondAttrListCollection* readCdo{*readHandle};
224  if(!readCdo){
225  ATH_MSG_ERROR("Null pointer to the read conditions object");
226  return StatusCode::FAILURE;
227  }
228  writeHandle.addDependency(readHandle);
229  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
230  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
231 
232  // iterate through data
234  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
235 
236  // retrieve blob
237  const coral::AttributeList& atr = itr->second;
238  if(atr["data"].specification().type() != typeid(coral::Blob)) {
239  ATH_MSG_FATAL( "Data column is not of type blob!" );
240  return StatusCode::FAILURE;
241  }
242  coral::Blob blob = atr["data"].data<coral::Blob>();
244  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
245  return StatusCode::FAILURE;
246  }
247  }
248  return StatusCode::SUCCESS;
249 }
250 
251 StatusCode NswCalibDbAlg::loadT0Data(const std::unique_ptr<TTree>& tree, NswT0Data* writeCdo, const T0Tech tech) const{
252  int sector{0}, layer{0}, channel{0}, channelType{0}, stationEta{0};
253  double time{0};
254  tree->SetBranchAddress("sector" , &sector );
255  tree->SetBranchAddress("layer" , &layer );
256  tree->SetBranchAddress("channel", &channel );
257  tree->SetBranchAddress("mean" , &time );
258  tree->SetBranchAddress("stationEta" , &stationEta);
259  tree->SetBranchAddress("channel_type", &channelType);
260  if (msgLvl(MSG::VERBOSE)) {
261  tree->Print();
262  }
263 
264  ATH_MSG_DEBUG("NSW t0 calibration tree has "<< tree->GetEntries() <<" entries for tech " << (tech==T0Tech::MM ? "MM" : "sTGC"));
265 
266  for(uint i_channel=0; i_channel<tree->GetEntries(); i_channel++){
267  tree->GetEntry(i_channel);
268 
269  int stationPhi = ((std::abs(sector)-1)/2)+1;
270  uint multilayer = (layer<4 ? 1:2); // multilayer 1 corresponds to layers 0-3, ML 2 to layers 4-7
271  uint gasGap = layer - (multilayer-1)*4 + 1;
272 
273  Identifier id{0};
274 
275  if(tech==T0Tech::MM){
276  std::string stationName = (sector%2==1 ? "MML" : "MMS");
277  bool isValid{true};
278  id = m_idHelperSvc->mmIdHelper().channelID(stationName, stationEta, stationPhi,multilayer,gasGap, channel
279  // checking the validity of the identifier in production code is too expensiv, therefore only check it in debug build
280  #ifndef NDEBUG
281  , isValid
282  #endif
283  );
284 
285  if(!isValid){
286  ATH_MSG_ERROR("MM sector "<< sector <<" layer " << layer<< " channel "<< channel << " mean "<< time << " stationEta " << stationEta << " stationPhi " << stationPhi <<" stationName "<< stationName << " multilayer " << multilayer << " gas gap "<< gasGap << " channel " << channel);
287  ATH_MSG_ERROR("Failed to build identifier");
288  return StatusCode::FAILURE;
289  }
290  } else {
291  std::string stationName = (sector%2==1 ? "STL" : "STS");
292  bool isValid{true};
293  id = m_idHelperSvc->stgcIdHelper().channelID(stationName, stationEta, stationPhi, multilayer, gasGap, channelType, channel
294  // checking the validity of the identifier in production code is too expensiv, therefore only check it in debug build
295  #ifndef NDEBUG
296  , isValid
297  #endif
298  );
299  if(!isValid){
300  ATH_MSG_ERROR("Failed to build identifier");
301  ATH_MSG_DEBUG("STG sector "<< sector <<" layer " << layer<< " channel "<< channel << " mean "<< time << " stationEta " << stationEta << " stationPhi " << stationPhi <<" stationName "<< stationName << " multilayer " << multilayer << " gas gap "<< gasGap << " channel " << channel << " channel type" << channelType);
302  return StatusCode::FAILURE;
303  }
304  }
305 
306  writeCdo->setData(id, time);
307  }
308  return StatusCode::SUCCESS;
309 
310 }
311 
312 
313 // loadThresholdData
315 NswCalibDbAlg::loadThresholdData(const EventContext& ctx, const readKey_t& readKey, const ThresholdTech tech, writeHandleThr_t& writeHandle, NswCalibDbThresholdData* writeCdo) const {
316 
317  // set up read handle
318  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
319  const CondAttrListCollection* readCdo{*readHandle};
320  if(!readCdo){
321  ATH_MSG_ERROR("Null pointer to the read conditions object");
322  return StatusCode::FAILURE;
323  }
324  writeHandle.addDependency(readHandle);
325  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
326  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
327 
328  // iterate through data
330  unsigned int nObjs = 0;
331  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
332 
333  // retrieve blob
334  const coral::AttributeList& atr = itr->second;
335  if(atr["data"].specification().type() != typeid(coral::Blob)) {
336  ATH_MSG_FATAL( "Data column is not of type blob!" );
337  return StatusCode::FAILURE;
338  }
339  coral::Blob blob = atr["data"].data<coral::Blob>();
340  std::unique_ptr<TTree> tree;
342  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
343  return StatusCode::FAILURE;
344  }
345 
346  // parse tree
347  unsigned int elinkId{0}, vmm{0}, channel{0};
348  float threshold{0.};
349  tree->SetBranchAddress("vmm" , &vmm );
350  tree->SetBranchAddress("channel" , &channel );
351  tree->SetBranchAddress("elinkId" , &elinkId );
352  tree->SetBranchAddress("threshold" , &threshold );
353 
354  // loop over channels
355  unsigned int nChns = 0;
356  for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){
357  tree->GetEntry(iEvt);
359  if(!buildChannelId(channelId, elinkId, vmm, channel)){
360  ATH_MSG_DEBUG("Could not find valid channelId for elink "<<elinkId<<" This is either caused by calibration data of a channel that is known to be not connected to the detector or might point to some issues in the identifier used for the calibration constants");
361  continue;
362  }
363  if(channelId.get_compact()==0){
364  writeCdo->setZero(tech, threshold);
365  ++nChns;
366  continue;
367  }
368  writeCdo->setData(channelId, threshold);
369  ++nChns;
370  }
371  ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels.");
372  ++nObjs;
373  }
374  ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects.");
375 
376  return StatusCode::SUCCESS;
377 }
378 
379 
380 
381 // loadTimeChargeData
383 NswCalibDbAlg::loadTimeChargeData(const EventContext& ctx, const readKey_t& readKey, const TimeChargeTech tech, const TimeChargeType type, writeHandleTdoPdo_t& writeHandle, NswCalibDbTimeChargeData* writeCdo) const {
384 
385  // set up read handle
386  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
387  const CondAttrListCollection* readCdo{*readHandle};
388  if(!readCdo){
389  ATH_MSG_ERROR("Null pointer to the read conditions object");
390  return StatusCode::FAILURE;
391  }
392  writeHandle.addDependency(readHandle);
393  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
394  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
395 
396  // iterate through data
398  unsigned int nObjs = 0;
399  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
400 
401  // retrieve blob
402  const coral::AttributeList& atr = itr->second;
403  if(atr["data"].specification().type() != typeid(coral::Blob)) {
404  ATH_MSG_FATAL( "Data column is not of type blob!" );
405  return StatusCode::FAILURE;
406  }
407  coral::Blob blob = atr["data"].data<coral::Blob>();
408  std::unique_ptr<TTree> tree;
410  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
411  return StatusCode::FAILURE;
412  }
413  // parse tree
414  unsigned int elinkId{0}, vmm{0}, channel{0};
415  float slope{0}, intercept{0};
416  //float slope{0}, slopeError{0}, intercept{0},interceptError{0};
417 
418  tree->SetBranchAddress("vmm" , &vmm );
419  tree->SetBranchAddress("channel" , &channel );
420  tree->SetBranchAddress("elinkId" , &elinkId );
421  tree->SetBranchAddress("slope" , &slope );
422  //tree->SetBranchAddress("slopeError" , &slopeError ); // keep for later
423  tree->SetBranchAddress("intercept" , &intercept );
424  //tree->SetBranchAddress("interceptError", &interceptError);
425 
426 
427  // loop over channels
428  unsigned int nChns = 0;
429  for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){
430  tree->GetEntry(iEvt);
432  if(!buildChannelId(channelId, elinkId, vmm, channel)){
433  ATH_MSG_DEBUG("Could not find valid channelId for elink "<<elinkId<<" This is either caused by calibration data of a channel that is known to be not connected to the detector or might point to some issues in the identifier used for the calibration constants");
434  continue;
435  }
436 
438  calib_data.slope = slope;
439  //calib_data.slopeError = slopeError; // keep for later
440  calib_data.intercept = intercept;
441  //calib_data.interceptError = interceptError;
442 
443  if(!channelId.get_compact()){
444  writeCdo->setZero(type, tech, calib_data);
445  ++nChns;
446  continue;
447  }
448 
449  writeCdo->setData(type, channelId, calib_data);
450  ++nChns;
451  }
452  ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels. "<<tree->GetName()<<" "<<tree->GetEntries());
453  ++nObjs;
454  }
455  ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects.");
456 
457  return StatusCode::SUCCESS;
458 }
459 
460 
461 // buildChannelId
462 bool
463 NswCalibDbAlg::buildChannelId(Identifier& channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const {
464 
465  // return dummy Identifier
466  if(elinkId==0){
467  channelId = Identifier(0);
468  return true;
469  }
470 
471  // build NSWOfflineHelper
472  std::unique_ptr<Muon::nsw::NSWResourceId> resId = std::make_unique<Muon::nsw::NSWResourceId>((uint32_t) elinkId);
474 
475  std::string stationName;
476  if(resId->detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE) {
477  stationName = resId->is_large_station () ? "MML" : "MMS";
478  } else if(resId->detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_STGC_ENDCAP_C_SIDE) {
479  stationName = resId->is_large_station () ? "STL" : "STS";
480  } else {
481  ATH_MSG_ERROR("NSWResource Id "<< elinkId << " does not yield detID that is either sTGC or MMG");
482  throw std::runtime_error("NSWCalibDbAlg buildChannelId called with detID that is neither sTGC or MMG");
483  }
484 
485  int8_t stationEta = resId->station_eta ();
486  uint8_t stationPhi = resId->station_phi ();
487  uint8_t multiLayer = resId->multi_layer ();
488  uint8_t gasGap = resId->gas_gap ();
489 
490  uint8_t channelType = helper.channel_type ();
491  uint16_t channelNumber = helper.channel_number();
492 
493  ATH_MSG_VERBOSE("Station name=" << stationName
494  << " Station eta=" << static_cast <int> (stationEta)
495  << " Station phi=" << static_cast <unsigned int> (stationPhi)
496  << " Multilayer=" << static_cast <unsigned int> (multiLayer)
497  << " Gas gap=" << static_cast <unsigned int> (gasGap)
498  << " Channel type=" << static_cast <unsigned int> (channelType)
499  << " Channel Number=" << channelNumber );
500 
501 
502  // MM
503  if(resId->detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE){
504  bool isValid {false};
505  Identifier chnlId = m_idHelperSvc->mmIdHelper().channelID(stationName, static_cast<int>(stationEta), static_cast<int>(stationPhi), static_cast<int>(multiLayer), static_cast<int>(gasGap), static_cast<int>(channelNumber), isValid);
506  if(!isValid){
507  ATH_MSG_DEBUG("Could not extract valid channelId for MM elink "<<elinkId);
508  return false;
509  }
510  channelId = chnlId;
511  }
512  // sTGC
513  else if(resId->detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_STGC_ENDCAP_C_SIDE){
514  bool isValid {false};
515  Identifier chnlId = m_idHelperSvc->stgcIdHelper().channelID(stationName, static_cast<int>(stationEta), static_cast<int>(stationPhi), static_cast<int>(multiLayer), static_cast<int>(gasGap), static_cast<int>(channelType), static_cast<int>(channelNumber), isValid);
516  if(!isValid){
517  ATH_MSG_DEBUG("Could not extract valid channelId for STGC elink "<<elinkId);
518  return false;
519  }
520  channelId = chnlId;
521  }
522 
523  return true;
524 }
525 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
NswCalibDbTimeChargeData::setData
void setData(CalibDataType type, const Identifier &chnlId, CalibConstants constants)
Definition: NswCalibDbTimeChargeData.cxx:39
checkFileSG.nObjs
nObjs
Definition: checkFileSG.py:90
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:129
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
NswCalibDbAlg::loadThresholdData
StatusCode loadThresholdData(const EventContext &, const readKey_t &, const ThresholdTech, writeHandleThr_t &, NswCalibDbThresholdData *) const
Definition: NswCalibDbAlg.cxx:315
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
NswCalibDbThresholdData
Definition: NswCalibDbThresholdData.h:21
NswCalibDbTimeChargeData::CalibConstants
Helper struct to cache all calibration constants in a common place of the memory.
Definition: NswCalibDbTimeChargeData.h:28
Muon::nsw::NSWResourceId::multi_layer
uint8_t multi_layer() const
Definition: NSWResourceId.h:120
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
NswCalibDbTimeChargeData.h
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
NswCalibDbTimeChargeData::CalibDataType::PDO
@ PDO
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
NswCalibDbAlg::m_readKey_stgc_sidea_tdo
readKey_t m_readKey_stgc_sidea_tdo
Definition: NswCalibDbAlg.h:89
NswCalibDbAlg::initialize
virtual StatusCode initialize() override
Definition: NswCalibDbAlg.cxx:23
NswCalibDbAlg::processTdoPdoData
StatusCode processTdoPdoData(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:74
Muon::nsw::NSWResourceId::detId
uint8_t detId() const
Definition: NSWResourceId.h:71
SG::WriteCondHandle::getRange
const EventIDRange & getRange() const
Definition: WriteCondHandle.h:89
tree
TChain * tree
Definition: tile_monitor.h:30
NswCalibDbAlg::m_readKey_stgc_sidea_pdo
readKey_t m_readKey_stgc_sidea_pdo
Definition: NswCalibDbAlg.h:91
NswCalibDbThresholdData::ThrsldTechType
ThrsldTechType
Definition: NswCalibDbThresholdData.h:26
NswCalibDbAlg::m_stgcT0FilePath
Gaudi::Property< std::string > m_stgcT0FilePath
Definition: NswCalibDbAlg.h:101
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
NswCalibDbAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: NswCalibDbAlg.h:77
NswCalibDbAlg::m_readKey_mm_sidec_tdo
readKey_t m_readKey_mm_sidec_tdo
Definition: NswCalibDbAlg.h:84
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
NswCalibDbAlg::m_loadsTgcT0Data
Gaudi::Property< bool > m_loadsTgcT0Data
Definition: NswCalibDbAlg.h:97
Muon::nsw::NSWResourceId::station_eta
int8_t station_eta() const
Definition: NSWResourceId.h:99
NswCalibDbThresholdData::ThrsldTechType::STGC
@ STGC
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
NswCalibDbAlg.h
Muon::nsw::helper::NSWOfflineHelper
Definition: NSWOfflineHelper.h:19
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
NswCalibDbTimeChargeData::CalibDataType
CalibDataType
Definition: NswCalibDbTimeChargeData.h:22
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
NswCalibDbAlg::buildChannelId
bool buildChannelId(Identifier &channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const
Definition: NswCalibDbAlg.cxx:463
NswCalibDbTimeChargeData::setZero
void setZero(CalibDataType type, MuonCond::CalibTechType tech, CalibConstants constants)
Definition: NswCalibDbTimeChargeData.cxx:67
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
NswCalibDbAlg::m_readKey_stgc_t0
readKey_t m_readKey_stgc_t0
Definition: NswCalibDbAlg.h:99
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
NswCalibDbAlg::m_writeKey_nswT0
writeKeyMmT0_t m_writeKey_nswT0
Definition: NswCalibDbAlg.h:81
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
NswCalibDbThresholdData::setData
void setData(const Identifier &, const float)
Definition: NswCalibDbThresholdData.cxx:23
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
NswCalibDbAlg::loadT0ToTree
StatusCode loadT0ToTree(const EventContext &ctx, const readKey_t &readKey, writeHandleT0_t &writeHandle, std::unique_ptr< TTree > &tree) const
Definition: NswCalibDbAlg.cxx:220
NswCalibDbAlg::m_writeKey_thr
writeKeyThr_t m_writeKey_thr
Definition: NswCalibDbAlg.h:80
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::nsw::NSWResourceId::is_large_station
bool is_large_station() const
Definition: NSWResourceId.h:93
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
NswCalibDbThresholdData::ThrsldTechType::MM
@ MM
Muon::nsw::NSWResourceId::station_phi
uint8_t station_phi() const
Definition: NSWResourceId.h:114
NswCalibDbAlg::m_readKey_stgc_sidec_tdo
readKey_t m_readKey_stgc_sidec_tdo
Definition: NswCalibDbAlg.h:90
file
TFile * file
Definition: tile_monitor.h:29
NswT0Data
Definition: NswT0Data.h:16
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
NswCalibDbTimeChargeData::CalibDataType::TDO
@ TDO
NswCalibDbAlg::m_readKey_mm_sidea_tdo
readKey_t m_readKey_mm_sidea_tdo
Definition: NswCalibDbAlg.h:83
NswCalibDbAlg::m_readKey_mm_sidec_thr
readKey_t m_readKey_mm_sidec_thr
Definition: NswCalibDbAlg.h:88
CoralUtilities::readBlobAsTTree
bool readBlobAsTTree(const coral::Blob &, std::unique_ptr< TTree > &)
Definition: blobaccess.cxx:107
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
NswCalibDbAlg::m_readKey_stgc_sidec_pdo
readKey_t m_readKey_stgc_sidec_pdo
Definition: NswCalibDbAlg.h:92
NswCalibDbTimeChargeData::CalibConstants::slope
float slope
Definition: NswCalibDbTimeChargeData.h:29
NswCalibDbAlg::m_isData
Gaudi::Property< bool > m_isData
Definition: NswCalibDbAlg.h:74
IOVInfiniteRange.h
NswCalibDbAlg::loadTimeChargeData
StatusCode loadTimeChargeData(const EventContext &ctx, const readKey_t &readKey, const TimeChargeTech, const TimeChargeType type, writeHandleTdoPdo_t &writeHandle, NswCalibDbTimeChargeData *writeCdo) const
Definition: NswCalibDbAlg.cxx:383
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
NswCalibDbAlg::execute
virtual StatusCode execute(const EventContext &) const override
Definition: NswCalibDbAlg.cxx:60
threshold
Definition: chainparser.cxx:74
NswCalibDbAlg::m_loadMmT0Data
Gaudi::Property< bool > m_loadMmT0Data
Definition: NswCalibDbAlg.h:96
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
NswCalibDbAlg::m_mmT0FilePath
Gaudi::Property< std::string > m_mmT0FilePath
Definition: NswCalibDbAlg.h:100
NSWOfflineHelper.h
MuonCond::CalibTechType::STGC
@ STGC
NSWResourceId.h
NswCalibDbAlg::m_readKey_mm_t0
readKey_t m_readKey_mm_t0
Definition: NswCalibDbAlg.h:98
SG::ReadCondHandleKey< CondAttrListCollection >
NswCalibDbAlg::m_readKey_mm_sidea_pdo
readKey_t m_readKey_mm_sidea_pdo
Definition: NswCalibDbAlg.h:85
blobaccess.h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
NswCalibDbAlg::m_writeKey_tdopdo
writeKeyTdoPdo_t m_writeKey_tdopdo
Definition: NswCalibDbAlg.h:79
NswCalibDbAlg::m_readKey_stgc_sidec_thr
readKey_t m_readKey_stgc_sidec_thr
Definition: NswCalibDbAlg.h:94
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
MuonCond::CalibTechType
CalibTechType
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:37
NswT0Data::setData
void setData(const Identifier &channelId, const float channelT0)
Definition: NswT0Data.cxx:38
NswCalibDbThresholdData::setZero
void setZero(ThrsldTechType, const float)
Definition: NswCalibDbThresholdData.cxx:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
NswCalibDbAlg::processNSWT0Data
StatusCode processNSWT0Data(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:149
NswCalibDbAlg::m_readKey_stgc_sidea_thr
readKey_t m_readKey_stgc_sidea_thr
Definition: NswCalibDbAlg.h:93
NswCalibDbAlg::processThrData
StatusCode processThrData(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:115
NswCalibDbTimeChargeData
Definition: NswCalibDbTimeChargeData.h:19
IOVInfiniteRange::infiniteTime
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.
Definition: IOVInfiniteRange.h:47
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
NswCalibDbAlg::m_readKey_mm_sidea_thr
readKey_t m_readKey_mm_sidea_thr
Definition: NswCalibDbAlg.h:87
sTgcDigitEffiDump.multiLayer
int multiLayer
Definition: sTgcDigitEffiDump.py:36
NswCalibDbAlg::m_condSvc
ServiceHandle< ICondSvc > m_condSvc
Definition: NswCalibDbAlg.h:76
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
NswCalibDbAlg::loadT0Data
StatusCode loadT0Data(const std::unique_ptr< TTree > &tree, NswT0Data *writeCdo, const T0Tech tech) const
Definition: NswCalibDbAlg.cxx:251
NswCalibDbAlg::m_readKey_mm_sidec_pdo
readKey_t m_readKey_mm_sidec_pdo
Definition: NswCalibDbAlg.h:86
MuonCond::CalibTechType::MM
@ MM
NswCalibDbThresholdData.h
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
Muon::nsw::NSWResourceId::gas_gap
uint8_t gas_gap() const
Definition: NSWResourceId.h:126
SG::WriteCondHandle::addDependency
void addDependency(const EventIDRange &range)
Definition: WriteCondHandle.h:275