ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 #include "GeoModelKernel/throwExcept.h"
19 
20 #include<ctime>
21 
22 // Initialize
25 
26  // retrievals
27  ATH_MSG_DEBUG( "initializing " << name() );
29  ATH_CHECK(m_idHelperSvc.retrieve());
30 
31  // initialize read keys
46 
49 
50  // write key for time/charge data
52 
53  // write key for threshold data
55 
57 
58  return StatusCode::SUCCESS;
59 }
60 
61 
62 // execute
64 NswCalibDbAlg::execute(const EventContext& ctx) const {
65 
66  ATH_MSG_DEBUG( "execute " << name() );
67 
68  if(processTdoPdoData(ctx).isFailure()) return StatusCode::FAILURE;
69  if(processThrData (ctx).isFailure()) return StatusCode::FAILURE;
71 
72  return StatusCode::SUCCESS;
73 
74 }
75 
76 // processTdoPdoData
78 NswCalibDbAlg::processTdoPdoData(const EventContext& ctx) const {
79 
80  // set up write handles for time/charge data
82  if (wrHdl.isValid()) {
83  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
84  << " In theory this should not be called, but may happen"
85  << " if multiple concurrent events are being processed out of order.");
86  return StatusCode::SUCCESS;
87  }
88  ATH_MSG_DEBUG("Range of time/charge output is " << wrHdl.getRange());
89  std::unique_ptr<NswCalibDbTimeChargeData> wrCdo{std::make_unique<NswCalibDbTimeChargeData>(m_idHelperSvc.get())};
90 
91  // MM
94  }
97  }
100  }
103  }
104 
105  // sTGC
108  }
111  }
114  }
117  }
118 
119  // insert/write data for time/charge data
120  if (wrHdl.record(std::move(wrCdo)).isFailure()) {
121  ATH_MSG_FATAL("Could not record " << wrHdl.key()
122  << " with EventRange " << wrHdl.getRange()
123  << " into Conditions Store");
124  return StatusCode::FAILURE;
125  }
126  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
127 
128  return StatusCode::SUCCESS; // nothing to do
129 
130 }
131 
132 
133 // processThrData
134 StatusCode
135 NswCalibDbAlg::processThrData(const EventContext& ctx) const {
136 
137  if(m_isData || !m_processThresholds) return StatusCode::SUCCESS; // nothing to do
138 
139  // set up write handles for threshold data
141  if (wrHdl.isValid()) {
142  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
143  << " In theory this should not be called, but may happen"
144  << " if multiple concurrent events are being processed out of order.");
145  return StatusCode::SUCCESS;
146  }
147  ATH_MSG_DEBUG("Range of threshold output is " << wrHdl.getRange());
148  std::unique_ptr<NswCalibDbThresholdData> wrCdo{std::make_unique<NswCalibDbThresholdData>(m_idHelperSvc.get())};
149 
152  }
155  }
158  }
161  }
162 
163  // insert/write data for threshold data
164  if (wrHdl.record(std::move(wrCdo)).isFailure()) {
165  ATH_MSG_FATAL("Could not record " << wrHdl.key()
166  << " with EventRange " << wrHdl.getRange()
167  << " into Conditions Store");
168  return StatusCode::FAILURE;
169  }
170  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
171 
172  return StatusCode::SUCCESS;
173 }
174 
175 // processMmT0Data
176 StatusCode
177 NswCalibDbAlg::processNSWT0Data(const EventContext& ctx) const {
178  // set up write handles for MmT0 data
179  writeHandleT0_t wrHdl{m_writeKey_nswT0, ctx};
180  if (wrHdl.isValid()) {
181  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
182  << " In theory this should not be called, but may happen"
183  << " if multiple concurrent events are being processed out of order.");
184  return StatusCode::SUCCESS;
185  }
186  ATH_MSG_DEBUG("Range of MmT0 output is " << wrHdl.getRange());
187  std::unique_ptr<NswT0Data> wrCdo{std::make_unique<NswT0Data>(m_idHelperSvc.get())};
188  if(m_loadMmT0Data){
189  if(!m_mmT0FilePath.empty() ){ // let's read the constants from a file
190  ATH_MSG_INFO("processing MM T0 from file " << m_mmT0FilePath);
191  wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteTime()));
192  std::unique_ptr<TFile> file (TFile::Open(m_mmT0FilePath.value().c_str()));
193  if(!file || file->IsZombie()){
194  ATH_MSG_FATAL("Failed to open file containing the MM T0Data. Filepath: "<<m_mmT0FilePath);
195  return StatusCode::FAILURE;
196  }
197  std::unique_ptr<TTree> tree{(TTree*)file->Get("tree_ch")};
198  if(!tree){
199  ATH_MSG_FATAL("Failed to load tree containing the NswT0Data.");
200  return StatusCode::FAILURE;
201  }
202  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::MM));
203 
204  } else if(!m_readKey_mm_t0.empty()){
205  ATH_MSG_DEBUG("LOAD NSW MM T0 FROM DB");
206  std::unique_ptr<TTree> tree;
208  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::MM));
209 
210  } else {
211  ATH_MSG_ERROR("Neither a database folder nor a file have been provided to read the MM T0 constants");
212  return StatusCode::FAILURE;
213  }
214  }
215  if(m_loadsTgcT0Data){
216  if(!m_stgcT0FilePath.empty() ){ // let's read the constants from a file
217  ATH_MSG_INFO("processing sTGC T0 from file " << m_stgcT0FilePath);
218  wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteTime()));
219  std::unique_ptr<TFile> file (TFile::Open(m_stgcT0FilePath.value().c_str()));
220  if(!file || file->IsZombie()){
221  ATH_MSG_FATAL("Failed to open file containing the sTGC T0Data. Filepath: "<<m_stgcT0FilePath);
222  return StatusCode::FAILURE;
223  }
224  std::unique_ptr<TTree> tree{(TTree*)file->Get("tree_ch")};
225  if(!tree){
226  ATH_MSG_FATAL("Failed to load tree containing the NswT0Data.");
227  return StatusCode::FAILURE;
228  }
229  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::STGC));
230 
231  } else if(!m_readKey_stgc_t0.empty()){
232  ATH_MSG_DEBUG("LOAD NSW sTGC T0 FROM DB");
233  std::unique_ptr<TTree> tree;
235  ATH_CHECK(loadT0Data(tree, wrCdo.get(), T0Tech::STGC));
236 
237  } else {
238  ATH_MSG_ERROR("Neither a database folder nor a file have been provided to read the sTGC T0 constants");
239  return StatusCode::FAILURE;
240  }
241  }
242 
243  // insert/write data for NswT0Data data
244  ATH_CHECK(wrHdl.record(std::move(wrCdo)));
245  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
246 
247  return StatusCode::SUCCESS;
248 }
249 
250 StatusCode NswCalibDbAlg::loadT0ToTree(const EventContext& ctx, const readKey_t& readKey, writeHandleT0_t& writeHandle, std::unique_ptr<TTree>& tree) const{
251  // set up read handle
252  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
253  const CondAttrListCollection* readCdo{*readHandle};
254  if(!readCdo){
255  ATH_MSG_ERROR("Null pointer to the read conditions object");
256  return StatusCode::FAILURE;
257  }
258  writeHandle.addDependency(readHandle);
259  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
260  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
261 
262  // iterate through data
264  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
265 
266  // retrieve blob
267  const coral::AttributeList& atr = itr->second;
268  if(atr["data"].specification().type() != typeid(coral::Blob)) {
269  ATH_MSG_FATAL( "Data column is not of type blob!" );
270  return StatusCode::FAILURE;
271  }
272  coral::Blob blob = atr["data"].data<coral::Blob>();
274  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
275  return StatusCode::FAILURE;
276  }
277  }
278  return StatusCode::SUCCESS;
279 }
280 
281 StatusCode NswCalibDbAlg::loadT0Data(const std::unique_ptr<TTree>& tree, NswT0Data* writeCdo, const T0Tech tech) const{
282  int sector{0}, layer{0}, channel{0}, channelType{0}, stationEta{0};
283  double time{0};
284  tree->SetBranchAddress("sector" , &sector );
285  tree->SetBranchAddress("layer" , &layer );
286  tree->SetBranchAddress("channel", &channel );
287  tree->SetBranchAddress("mean" , &time );
288  tree->SetBranchAddress("stationEta" , &stationEta);
289  tree->SetBranchAddress("channel_type", &channelType);
290  if (msgLvl(MSG::VERBOSE)) {
291  tree->Print();
292  }
293 
294  ATH_MSG_DEBUG("NSW t0 calibration tree has "<< tree->GetEntries() <<" entries for tech " << (tech==T0Tech::MM ? "MM" : "sTGC"));
295 
296  for(uint i_channel=0; i_channel<tree->GetEntries(); i_channel++){
297  tree->GetEntry(i_channel);
298 
299  int stationPhi = ((std::abs(sector)-1)/2)+1;
300  uint multilayer = (layer<4 ? 1:2); // multilayer 1 corresponds to layers 0-3, ML 2 to layers 4-7
301  uint gasGap = layer - (multilayer-1)*4 + 1;
302 
303  Identifier id{0};
304 
305  if(tech==T0Tech::MM){
306  std::string stationName = (sector%2==1 ? "MML" : "MMS");
307  bool isValid{true};
308  id = m_idHelperSvc->mmIdHelper().channelID(stationName, stationEta, stationPhi,multilayer,gasGap, channel
309  // checking the validity of the identifier in production code is too expensiv, therefore only check it in debug build
310  #ifndef NDEBUG
311  , isValid
312  #endif
313  );
314 
315  if(!isValid){
316  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);
317  ATH_MSG_ERROR("Failed to build identifier");
318  return StatusCode::FAILURE;
319  }
320  } else {
321  std::string stationName = (sector%2==1 ? "STL" : "STS");
322  bool isValid{true};
323  id = m_idHelperSvc->stgcIdHelper().channelID(stationName, stationEta, stationPhi, multilayer, gasGap, channelType, channel
324  // checking the validity of the identifier in production code is too expensiv, therefore only check it in debug build
325  #ifndef NDEBUG
326  , isValid
327  #endif
328  );
329  if(!isValid){
330  ATH_MSG_ERROR("Failed to build identifier");
331  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);
332  return StatusCode::FAILURE;
333  }
334  }
335 
336  writeCdo->setData(id, time);
337  }
338  return StatusCode::SUCCESS;
339 
340 }
341 
342 
343 // loadThresholdData
345 NswCalibDbAlg::loadThresholdData(const EventContext& ctx, const readKey_t& readKey, const ThresholdTech tech, writeHandleThr_t& writeHandle, NswCalibDbThresholdData* writeCdo) const {
346 
347  // set up read handle
348  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
349  const CondAttrListCollection* readCdo{*readHandle};
350  if(!readCdo){
351  ATH_MSG_ERROR("Null pointer to the read conditions object");
352  return StatusCode::FAILURE;
353  }
354  writeHandle.addDependency(readHandle);
355  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
356  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
357 
358  // iterate through data
360  unsigned int nObjs = 0;
361  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
362 
363  // retrieve blob
364  const coral::AttributeList& atr = itr->second;
365  if(atr["data"].specification().type() != typeid(coral::Blob)) {
366  ATH_MSG_FATAL( "Data column is not of type blob!" );
367  return StatusCode::FAILURE;
368  }
369  coral::Blob blob = atr["data"].data<coral::Blob>();
370  std::unique_ptr<TTree> tree;
372  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
373  return StatusCode::FAILURE;
374  }
375 
376  // parse tree
377  unsigned int elinkId{0}, vmm{0}, channel{0};
378  float threshold{0.};
379  tree->SetBranchAddress("vmm" , &vmm );
380  tree->SetBranchAddress("channel" , &channel );
381  tree->SetBranchAddress("elinkId" , &elinkId );
382  tree->SetBranchAddress("threshold" , &threshold );
383 
384  // loop over channels
385  unsigned int nChns = 0;
386  for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){
387  tree->GetEntry(iEvt);
389  if(!buildChannelId(channelId, elinkId, vmm, channel)){
390  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");
391  continue;
392  }
393  if(channelId.get_compact()==0){
394  writeCdo->setZero(tech, threshold);
395  ++nChns;
396  continue;
397  }
398  writeCdo->setData(channelId, threshold);
399  ++nChns;
400  }
401  ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels.");
402  ++nObjs;
403  }
404  ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects.");
405 
406  return StatusCode::SUCCESS;
407 }
408 
409 
410 
411 // loadTimeChargeData
413 NswCalibDbAlg::loadTimeChargeData(const EventContext& ctx, const readKey_t& readKey, const TimeChargeTech tech, const TimeChargeType type, writeHandleTdoPdo_t& writeHandle, NswCalibDbTimeChargeData* writeCdo) const {
414 
415  // set up read handle
416  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
417  const CondAttrListCollection* readCdo{*readHandle};
418  if(!readCdo){
419  ATH_MSG_ERROR("Null pointer to the read conditions object");
420  return StatusCode::FAILURE;
421  }
422  writeHandle.addDependency(readHandle);
423  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
424  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
425 
426  // iterate through data
428  unsigned int nObjs = 0;
429  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
430 
431  // retrieve blob
432  const coral::AttributeList& atr = itr->second;
433  if(atr["data"].specification().type() != typeid(coral::Blob)) {
434  ATH_MSG_FATAL( "Data column is not of type blob!" );
435  return StatusCode::FAILURE;
436  }
437  coral::Blob blob = atr["data"].data<coral::Blob>();
438  std::unique_ptr<TTree> tree;
440  ATH_MSG_FATAL( "Cannot retrieve data from coral blob!" );
441  return StatusCode::FAILURE;
442  }
443  // parse tree
444  unsigned int elinkId{0}, vmm{0}, channel{0};
445  float slope{0}, intercept{0};
446  //float slope{0}, slopeError{0}, intercept{0},interceptError{0};
447 
448  tree->SetBranchAddress("vmm" , &vmm );
449  tree->SetBranchAddress("channel" , &channel );
450  tree->SetBranchAddress("elinkId" , &elinkId );
451  tree->SetBranchAddress("slope" , &slope );
452  //tree->SetBranchAddress("slopeError" , &slopeError ); // keep for later
453  tree->SetBranchAddress("intercept" , &intercept );
454  //tree->SetBranchAddress("interceptError", &interceptError);
455 
456 
457  // loop over channels
458  unsigned int nChns = 0;
459  for(unsigned int iEvt=0; iEvt<tree->GetEntries(); ++iEvt){
460  tree->GetEntry(iEvt);
462  if(!buildChannelId(channelId, elinkId, vmm, channel)){
463  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");
464  continue;
465  }
466 
468  calib_data.slope = slope;
469  //calib_data.slopeError = slopeError; // keep for later
470  calib_data.intercept = intercept;
471  //calib_data.interceptError = interceptError;
472 
473  if(!channelId.get_compact()){
474  writeCdo->setZero(type, tech, calib_data);
475  ++nChns;
476  continue;
477  }
478 
479  writeCdo->setData(type, channelId, calib_data);
480  ++nChns;
481  }
482  ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels. "<<tree->GetName()<<" "<<tree->GetEntries());
483  ++nObjs;
484  }
485  ATH_MSG_VERBOSE("Retrieved data for "<<nObjs<<" objects.");
486 
487  return StatusCode::SUCCESS;
488 }
489 
490 
491 // buildChannelId
492 bool
493 NswCalibDbAlg::buildChannelId(Identifier& channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const {
494 
495  // return dummy Identifier
496  if(elinkId==0){
497  channelId = Identifier(0);
498  return true;
499  }
500 
501  // build NSWOfflineHelper
502  std::unique_ptr<Muon::nsw::NSWResourceId> resId = std::make_unique<Muon::nsw::NSWResourceId>((uint32_t) elinkId);
504 
505  std::string stationName;
506  if(resId->detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE) {
507  stationName = resId->is_large_station () ? "MML" : "MMS";
508  } else if(resId->detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_STGC_ENDCAP_C_SIDE) {
509  stationName = resId->is_large_station () ? "STL" : "STS";
510  } else {
511  ATH_MSG_ERROR("NSWResource Id "<< elinkId << " does not yield detID that is either sTGC or MMG");
512  THROW_EXCEPTION("NSWCalibDbAlg buildChannelId called with detID that is neither sTGC or MMG");
513  }
514 
515  int8_t stationEta = resId->station_eta ();
516  uint8_t stationPhi = resId->station_phi ();
517  uint8_t multiLayer = resId->multi_layer ();
518  uint8_t gasGap = resId->gas_gap ();
519 
520  uint8_t channelType = helper.channel_type ();
521  uint16_t channelNumber = helper.channel_number();
522 
523  ATH_MSG_VERBOSE("Station name=" << stationName
524  << " Station eta=" << static_cast <int> (stationEta)
525  << " Station phi=" << static_cast <unsigned int> (stationPhi)
526  << " Multilayer=" << static_cast <unsigned int> (multiLayer)
527  << " Gas gap=" << static_cast <unsigned int> (gasGap)
528  << " Channel type=" << static_cast <unsigned int> (channelType)
529  << " Channel Number=" << channelNumber );
530 
531 
532  // MM
533  if(resId->detId() == eformat::MUON_MMEGA_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_MMEGA_ENDCAP_C_SIDE){
534  bool isValid {false};
535  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);
536  if(!isValid){
537  ATH_MSG_DEBUG("Could not extract valid channelId for MM elink "<<elinkId);
538  return false;
539  }
540  channelId = chnlId;
541  }
542  // sTGC
543  else if(resId->detId() == eformat::MUON_STGC_ENDCAP_A_SIDE || resId->detId() == eformat::MUON_STGC_ENDCAP_C_SIDE){
544  bool isValid {false};
545  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);
546  if(!isValid){
547  ATH_MSG_DEBUG("Could not extract valid channelId for STGC elink "<<elinkId);
548  return false;
549  }
550  channelId = chnlId;
551  }
552 
553  return true;
554 }
555 
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:41
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
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:345
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
NswCalibDbThresholdData
Definition: NswCalibDbThresholdData.h:17
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:24
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
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
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:90
NswCalibDbAlg::initialize
virtual StatusCode initialize() override
Definition: NswCalibDbAlg.cxx:24
NswCalibDbAlg::processTdoPdoData
StatusCode processTdoPdoData(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:78
Muon::nsw::NSWResourceId::detId
uint8_t detId() const
Definition: NSWResourceId.h:71
SG::WriteCondHandle::getRange
const EventIDRange & getRange() const
Definition: WriteCondHandle.h:93
tree
TChain * tree
Definition: tile_monitor.h:30
NswCalibDbAlg::m_readKey_stgc_sidea_pdo
readKey_t m_readKey_stgc_sidea_pdo
Definition: NswCalibDbAlg.h:92
NswCalibDbThresholdData::ThrsldTechType
ThrsldTechType
Definition: NswCalibDbThresholdData.h:22
NswCalibDbAlg::m_stgcT0FilePath
Gaudi::Property< std::string > m_stgcT0FilePath
Definition: NswCalibDbAlg.h:102
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:78
NswCalibDbAlg::m_readKey_mm_sidec_tdo
readKey_t m_readKey_mm_sidec_tdo
Definition: NswCalibDbAlg.h:85
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
NswCalibDbAlg::m_loadsTgcT0Data
Gaudi::Property< bool > m_loadsTgcT0Data
Definition: NswCalibDbAlg.h:98
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)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:812
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
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
NswCalibDbAlg::buildChannelId
bool buildChannelId(Identifier &channelId, unsigned int elinkId, unsigned int vmm, unsigned int channel) const
Definition: NswCalibDbAlg.cxx:493
NswCalibDbTimeChargeData::setZero
void setZero(CalibDataType type, MuonCond::CalibTechType tech, CalibConstants constants)
Definition: NswCalibDbTimeChargeData.cxx:75
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
NswCalibDbAlg::m_readKey_stgc_t0
readKey_t m_readKey_stgc_t0
Definition: NswCalibDbAlg.h:100
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
NswCalibDbAlg::m_writeKey_nswT0
writeKeyMmT0_t m_writeKey_nswT0
Definition: NswCalibDbAlg.h:82
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
NswCalibDbThresholdData::setData
void setData(const Identifier &, const float)
Definition: NswCalibDbThresholdData.cxx:22
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
NswCalibDbAlg::loadT0ToTree
StatusCode loadT0ToTree(const EventContext &ctx, const readKey_t &readKey, writeHandleT0_t &writeHandle, std::unique_ptr< TTree > &tree) const
Definition: NswCalibDbAlg.cxx:250
NswCalibDbAlg::m_writeKey_thr
writeKeyThr_t m_writeKey_thr
Definition: NswCalibDbAlg.h:81
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:91
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:84
NswCalibDbAlg::m_readKey_mm_sidec_thr
readKey_t m_readKey_mm_sidec_thr
Definition: NswCalibDbAlg.h:89
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:93
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:413
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
NswCalibDbAlg::execute
virtual StatusCode execute(const EventContext &) const override
Definition: NswCalibDbAlg.cxx:64
threshold
Definition: chainparser.cxx:74
NswCalibDbAlg::m_loadMmT0Data
Gaudi::Property< bool > m_loadMmT0Data
Definition: NswCalibDbAlg.h:97
NswCalibDbAlg::m_processThresholds
Gaudi::Property< bool > m_processThresholds
Definition: NswCalibDbAlg.h:75
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
NswCalibDbAlg::m_mmT0FilePath
Gaudi::Property< std::string > m_mmT0FilePath
Definition: NswCalibDbAlg.h:101
NSWOfflineHelper.h
MuonCond::CalibTechType::STGC
@ STGC
NSWResourceId.h
NswCalibDbAlg::m_readKey_mm_t0
readKey_t m_readKey_mm_t0
Definition: NswCalibDbAlg.h:99
SG::ReadCondHandleKey< CondAttrListCollection >
NswCalibDbAlg::m_readKey_mm_sidea_pdo
readKey_t m_readKey_mm_sidea_pdo
Definition: NswCalibDbAlg.h:86
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:80
NswCalibDbAlg::m_readKey_stgc_sidec_thr
readKey_t m_readKey_stgc_sidec_thr
Definition: NswCalibDbAlg.h:95
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:39
NswCalibDbThresholdData::setZero
void setZero(ThrsldTechType, const float)
Definition: NswCalibDbThresholdData.cxx:31
NswCalibDbAlg::processNSWT0Data
StatusCode processNSWT0Data(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:177
NswCalibDbAlg::m_readKey_stgc_sidea_thr
readKey_t m_readKey_stgc_sidea_thr
Definition: NswCalibDbAlg.h:94
NswCalibDbAlg::processThrData
StatusCode processThrData(const EventContext &ctx) const
Definition: NswCalibDbAlg.cxx:135
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:13
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
NswCalibDbAlg::m_readKey_mm_sidea_thr
readKey_t m_readKey_mm_sidea_thr
Definition: NswCalibDbAlg.h:88
sTgcDigitEffiDump.multiLayer
int multiLayer
Definition: sTgcDigitEffiDump.py:36
NswCalibDbAlg::m_condSvc
ServiceHandle< ICondSvc > m_condSvc
Definition: NswCalibDbAlg.h:77
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:281
CoralUtilities::readBlobAsTTree
bool readBlobAsTTree(const coral::Blob &blob, std::unique_ptr< TTree > &tree, const std::string_view name="tree")
Interprets the coral::Blob as a TTree instance.
Definition: blobaccess.cxx:107
NswCalibDbAlg::m_readKey_mm_sidec_pdo
readKey_t m_readKey_mm_sidec_pdo
Definition: NswCalibDbAlg.h:87
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:279
Identifier
Definition: IdentifierFieldParser.cxx:14