ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
NswDcsDbAlg Class Reference

#include <NswDcsDbAlg.h>

Inheritance diagram for NswDcsDbAlg:
Collaboration diagram for NswDcsDbAlg:

Public Member Functions

virtual ~NswDcsDbAlg ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &) const override
 
virtual bool isReEntrant () const override
 
 AthReentrantAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters: More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

using writeKey_t = SG::WriteCondHandleKey< NswDcsDbData >
 
using readKey_t = SG::ReadCondHandleKey< CondAttrListCollection >
 
using writeHandleDcs_t = SG::WriteCondHandle< NswDcsDbData >
 
using DcsTechType = NswDcsDbData::DcsTechType
 
using DcsDataType = NswDcsDbData::DcsDataType
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode processHvData (const EventContext &ctx) const
 
StatusCode loadHvData (const EventContext &ctx, const readKey_t &readKey, const DcsTechType tech, writeHandleDcs_t &writeHandle, NswDcsDbData *writeCdo) const
 
StatusCode loadTDaqData (const EventContext &ctx, const readKey_t &readKey, const DcsTechType tech, writeHandleDcs_t &writeHandle, NswDcsDbData *writeCdo) const
 
StatusCode loadELTXData (const EventContext &ctx, const readKey_t &readKey, const DcsTechType tech, writeHandleDcs_t &writeHandle, NswDcsDbData *writeCdo) const
 
bool buildChannelIdForHv (Identifier &channelId, const DcsTechType tech0, const std::string &chanName, bool &isOK) const
 
bool buildChannelIdForTDaq (Identifier &channelId, uint &elink, const DcsTechType tech0, const std::string &chanName, bool &isOK) const
 
bool buildChannelIdForEltx (Identifier &channelId, const DcsTechType tech0, const std::string &chanName, bool &isOK) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< ICondSvc > m_condSvc {this, "CondSvc", "CondSvc"}
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
writeKey_t m_writeKey {this, "WriteKey", "NswDcsDbData", "Key of output data object" }
 
readKey_t m_readKey_mmg_hv {this, "ReadKey_MMG_HV", "/MMG/DCS/HV", "Key of input MMG condition data for HV"}
 
readKey_t m_readKey_stg_hv {this, "ReadKey_STG_HV", "/STG/DCS/HV", "Key of input STG condition data for HV"}
 
readKey_t m_readKey_mmg_tdaq {this, "ReadKey_MMG_TDAQ", "", "Key of input MMG condition data for TDAQ"}
 
readKey_t m_readKey_stg_tdaq {this, "ReadKey_STG_TDAQ", "", "Key of input STG condition data for TDAQ"}
 
readKey_t m_readKey_mmg_eltx {this, "ReadKey_MMG_ELTX", "", "Key of input MMG condition data for SCA status"}
 
readKey_t m_readKey_stg_eltx {this, "ReadKey_STG_ELTX", "", "Key of input STG condition data for SCA status"}
 
Gaudi::Property< bool > m_loadTdaq {this, "LoadTdaq",false,"enable the processing of Elinks in the NswDcsDbAlg"}
 
Gaudi::Property< bool > m_loadEltx {this, "LoadEltx",false,"enable the processing of SCAs in the NswDcsDbAlg"}
 
const MuonGM::MuonDetectorManagerm_muDetMgrFromDetStore
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 31 of file NswDcsDbAlg.h.

Member Typedef Documentation

◆ DcsDataType

Definition at line 52 of file NswDcsDbAlg.h.

◆ DcsTechType

Definition at line 51 of file NswDcsDbAlg.h.

◆ readKey_t

Definition at line 45 of file NswDcsDbAlg.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ writeHandleDcs_t

Definition at line 47 of file NswDcsDbAlg.h.

◆ writeKey_t

Definition at line 44 of file NswDcsDbAlg.h.

Constructor & Destructor Documentation

◆ ~NswDcsDbAlg()

virtual NswDcsDbAlg::~NswDcsDbAlg ( )
virtualdefault

Member Function Documentation

◆ AthReentrantAlgorithm()

AthReentrantAlgorithm::AthReentrantAlgorithm

Constructor with parameters:

Definition at line 90 of file AthReentrantAlgorithm.cxx.

22  :
24 {
25 
26  // Set up to run AthAlgorithmDHUpdate in sysInitialize before
27  // merging depedency lists. This extends the output dependency
28  // list with any symlinks implied by inheritance relations.
29  m_updateDataHandles =
30  std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
32  std::move (m_updateDataHandles));
33 }

◆ buildChannelIdForEltx()

bool NswDcsDbAlg::buildChannelIdForEltx ( Identifier channelId,
const DcsTechType  tech0,
const std::string &  chanName,
bool &  isOK 
) const
private

Definition at line 461 of file NswDcsDbAlg.cxx.

461  {
462 
463  // prepare regex
464  std::regex re("^(A|C)_([0-9]{2})_L([0-9])_B([0-9]{2})");
465 
466 
467  // match regex
468  if(!std::regex_match(chanName, re)) {
469  ATH_MSG_WARNING("Could not identify channel with name "<<chanName);
470  isOK = false;
471  return false;
472  }
473 
474  // build channel Id
475  bool isValid{false};
476  std::smatch m;
477  std::regex_match(chanName, m, re);
478 
479  // copy to vec of strings
480  std::vector<std::string> res;
481  for(unsigned int i=0; i<m.size(); ++i) res.push_back(m[i].str());
482 
483  //extract field common to MM and stgc
484  int wheel = res[1]=="A"? 1 : -1;
485  int sector = std::stoi(res[2])+1;
486  int board = std::stoi(res[4]);
487  int layer = std::stoi(res[3]);
488  int stationPhi = (sector-1)/2+1;
489  int multiLayer = layer< 5 ? 1 : 2; // layers 1-4 are on multilayer 1 and layers 5-8 are on multilayer 2
490  int gasGap = ((layer-1)%4) + 1; // identifies layer within multilayer
491 
492 
493  // MMG Channel
494  if(tech==DcsTechType::MMG){
495  int stationName = sector%2==0 ? 56 : 55;
496 
497  board -= (layer%2==1 ? 1 : 2); // for odd layers (counting 1-8 here) the first board is on position 1 for even ones on position 2. https://mattermost.web.cern.ch/files/i84ghkjsfbrzje7c3kr5h7ccdy/public?h=xs3cQQ38yZJDrct75eY73G9d1deOaEtJCHmk2Qcni4s
498  int radius{0};
499  if(board%4==0){
500  radius = 2*(board/4);
501  } else if (board%4==3) {
502  radius = 2*(board/4) + 1;
503  } else { // not a readout board
504  isOK = true;
505  return false;
506  }
507 
508  int stationEta = wheel*(radius<10? 1 : 2); // boards 0-9 are on the first quad, boards 10-15 on the second one
510  if(!isValid){
511  ATH_MSG_WARNING("Could not extract valid channelId for MMG channel "<<chanName);
512  ATH_MSG_WARNING("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << board);
513  isOK = false;
514  return false;
515  }
516  channelId = chnlId;
517  } else if(tech==DcsTechType::STG){
518  int stationName = sector%2==0 ? 58 : 57;
519  board -= 1; // count from 0 while input counts from one
520  uint radius = board/2;
521  int stationEta = wheel*(radius+1);
522  uint channelType{0};
523  if(board>=6){ // not a STG readout board
524  isOK = true;
525  return false;
526  }
527  else if((layer&1)==1){// for odd layers (counting 1-8 here) the boards on even positions are reading the strips. https://mattermost.web.cern.ch/files/bdh8wwjzf7yiiggtad3u8bttrr/public?h=2fFnVki1EUefrMEa3tb8AZkTiC-tF3L11qdq43dBbJc
528  if(board%2==0){
529  channelType=sTgcIdHelper::sTgcChannelTypes::Strip;
530  } else {
531  channelType=sTgcIdHelper::sTgcChannelTypes::Pad;
532  }
533  } else if(layer%1==0){// for even layers (counting 1-8 here) the boards on even positions are reading the pads and wires. https://mattermost.web.cern.ch/files/taro34muwpb18pqgiufhwf5a5c/public?h=3YlA-w0NfEuCV2JIGUjiWwpnpDlxvIaEkzrTXWfo71M
534  if(board%2==0){
535  channelType=sTgcIdHelper::sTgcChannelTypes::Pad;
536  } else {
537  channelType=sTgcIdHelper::sTgcChannelTypes::Strip;
538  }
539  }
540  Identifier chnlId = m_idHelperSvc->stgcIdHelper().febID(stationName, stationEta, stationPhi, multiLayer, gasGap, channelType ,isValid);
541  if(!isValid){
542  ATH_MSG_WARNING("Could not extract valid channelId for STG channel "<<chanName);
543  ATH_MSG_WARNING("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << board << " " << channelType);
544  isOK = false;
545  return false;
546  }
547  channelId = chnlId;
548  }
549  return true;
550 }

◆ buildChannelIdForHv()

bool NswDcsDbAlg::buildChannelIdForHv ( Identifier channelId,
const DcsTechType  tech0,
const std::string &  chanName,
bool &  isOK 
) const
private

Definition at line 242 of file NswDcsDbAlg.cxx.

242  {
243 
244  // prepare regex
245  std::regex reMMG("^([A-Za-z]{1})([0-9]{2})_ML([0-9])P([0-9])_(IP|HO)R([0-9])__HV");
246  std::regex reMMD("^([A-Za-z]{1})([0-9]{2})_DRIFT_(IP|HO)R([0-9])__HV");
247  std::regex reSTG("^([A-Za-z]{1})([0-9]{2})_ML([0-9])_(IP|HO)R([0-9])__HV");
248  std::regex re;
250 
251  // match regex
252  if(std::regex_match(chanName, reMMG)) {
253  re = reMMG;
254  tech = DcsTechType::MMG;
255  }
256  else if(std::regex_match(chanName, reMMD)) {
257  re = reMMD;
258  tech = DcsTechType::MMD;
259  }
260  else if(std::regex_match(chanName, reSTG)) {
261  re = reSTG;
262  tech = DcsTechType::STG;
263  }
264  else {
265  ATH_MSG_ERROR("Could not identify channel with name "<<chanName);
266  isOK = false;
267  return false;
268  }
269 
270  // sanity check
271  if(tech0!=tech) {
272  isOK = true; // need to distinguish error in parsing and simple difference between required technologies
273  return false;
274  }
275 
276  // build channel Id
277  bool isValid{false};
278  std::smatch m;
279  std::regex_match(chanName, m, re);
280 
281  // copy to vec of strings
282  std::vector<std::string> res;
283  for(unsigned int i=0; i<m.size(); ++i) res.push_back(m[i].str());
284 
285  // MMG Channel
286  if(tech==DcsTechType::MMG){
287  int wheel = res[1]=="A"? 1 : -1;
288  int sector = std::stoi(res[2]);
289  const std::string stationName = sector%2==0 ? "MMS" : "MML";
290  int stationEta = wheel*std::stoi(res[6]);
291  int stationPhi = (sector-1)/2+1;
292  int multiLayer = res[5]=="IP" ? 1 : 2;
293  int gasGap = std::stoi(res[3]);
294  int pcb = std::stoi(res[4]);
295  Identifier chnlId = m_idHelperSvc->mmIdHelper().pcbID(stationName, stationEta, stationPhi, multiLayer, gasGap, pcb, isValid);
296  if(!isValid){
297  ATH_MSG_DEBUG("Could not extract valid channelId for MMG channel "<<chanName);
298  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer);
299  isOK = false;
300  return false;
301  }
302  channelId = chnlId;
303  }
304 
305  // MMG Drift Channel
306  else if(tech==DcsTechType::MMD){
307  int wheel = res[1]=="A"? 1 : -1;
308  int sector = std::stoi(res[2]);
309  const std::string stationName = sector%2==0 ? "MMS" : "MML";
310  int stationEta = wheel*std::stoi(res[4]);
311  int stationPhi = (sector-1)/2+1;
312  int multiLayer = res[3]=="IP" ? 1 : 2;
313  Identifier modId = m_idHelperSvc->mmIdHelper().elementID(stationName, stationEta, stationPhi, isValid);
314  if(!isValid){
315  ATH_MSG_DEBUG("Could not extract valid elementId for MMGD channel "<<chanName);
316  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer);
317  isOK = false;
318  return false;
319  }
320  Identifier chnlId = m_idHelperSvc->mmIdHelper().multilayerID(modId, multiLayer, isValid);
321  if(!isValid){
322  ATH_MSG_DEBUG("Could not extract valid multilayerId for MMG channel "<<chanName);
323  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer);
324  isOK = false;
325  //return false;
326  }
327  channelId = chnlId;
328  }
329 
330  // STG
331  else if(tech==DcsTechType::STG){
332  int wheel = res[1]=="A"? 1 : -1;
333  int sector = std::stoi(res[2]);
334  const std::string stationName = sector%2==0 ? "STS" : "STL";
335  int radius = std::stoi(res[5]);
336  int stationEta = wheel*(radius<=2 ? 1 : radius-1);
337  int stationPhi = (sector-1)/2+1;
338  int multiLayer = res[4]=="IP" ? 1 : 2;
339  int gasGap = std::stoi(res[3]);
340  Identifier chnlId = m_idHelperSvc->stgcIdHelper().hvID(stationName, stationEta, stationPhi, multiLayer, gasGap, radius == 1 /*radius 1 is the inner hv section*/ , isValid);
341  if(!isValid){
342  ATH_MSG_DEBUG("Could not extract valid channelId for STG channel "<<chanName);
343  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer);
344  isOK = false;
345  return false;
346  }
347  channelId = chnlId;
348  }
349 
350  return true;
351 }

◆ buildChannelIdForTDaq()

bool NswDcsDbAlg::buildChannelIdForTDaq ( Identifier channelId,
uint elink,
const DcsTechType  tech0,
const std::string &  chanName,
bool &  isOK 
) const
private

Definition at line 356 of file NswDcsDbAlg.cxx.

356  {
357 
358  // prepare regex
359  std::regex reMMG("^ELink-MM-(A|C)/V([0-9]{1})/L1A/Strip/S([0-9]{1,2})/L([0-9]{1})/R([0-9]{1,2})/E([0-9]{1})");
360  std::regex reSTG("^ELink-sTGC-(A|C)/V([0-9]{1})/L1A/(Strip|Pad)/S([0-9]{1,2})/L([0-9]{1})/R([0-9]{1})/E([0-9]{1})");
361  std::regex reSTGTrigProc("^ELink-sTGC-A/V0/L1A/TrigProc/");
362  std::regex reSTGPadTrig("^ELink-sTGC-A/V0/L1A/PadTrig/");
363 
364  std::regex re;
366 
367  // match regex
368  if(std::regex_match(chanName, reMMG)) {
369  re = reMMG;
370  tech = DcsTechType::MMG;
371  }
372  else if(std::regex_match(chanName, reSTG)) {
373  re = reSTG;
374  tech = DcsTechType::STG;
375  } else if(std::regex_match(chanName, reSTGPadTrig) || std::regex_match(chanName, reSTGTrigProc)){ // those are trigger elinks that are not needed in athena
376  isOK = true;
377  return false;
378  }
379  else {
380  ATH_MSG_DEBUG("Could not identify channel with name "<<chanName);
381  isOK = false;
382  return false;
383  }
384 
385  // sanity check
386  if(tech0!=tech) {
387  isOK = true; // need to distinguish error in parsing and simple difference between required technologies
388  return false;
389  }
390 
391  // build channel Id
392  bool isValid{false};
393  std::smatch m;
394  std::regex_match(chanName, m, re);
395 
396  // copy to vec of strings
397  std::vector<std::string> res;
398  for(unsigned int i=0; i<m.size(); ++i) res.push_back(m[i].str());
399 
400  // MMG Channel
401  if(tech==DcsTechType::MMG){
402  int wheel = res[1]=="A"? 1 : -1;
403  int sector = std::stoi(res[3])+1; // elx counts from 0 athena from 1 -->need a +1
404  int stationName = sector%2==0 ? 55 : 56;
405  /*
406  res[4] -> L
407  res[5] -> R
408  res[6] -> E
409  */
410  int stationEta = wheel*(std::stoi(res[5])<10? 1 : 2); // boards 0-9 are und the first quad, boards 10-15 und the second one
411  int stationPhi = (sector-1)/2+1;
412  int multiLayer = std::stoi(res[4])< 4 ? 1 : 2; // layers 0-3 are on multilayer 1 and layers 4-7 are on multilayer 2
413  int gasGap = (std::stoi(res[4])%4) + 1; // identifies layer within multilayer --> counts from 0-3; +1 because athena counts from 1-4
414  int radius = std::stoi(res[5]);
416  elink = std::stoi(res[6]);
417  if(!isValid){
418  ATH_MSG_DEBUG("Could not extract valid channelId for MMG channel "<<chanName);
419  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << elink);
420  isOK = false;
421  return false;
422  }
423  channelId = chnlId;
424  }
425 
426  // STG
427  else if(tech==DcsTechType::STG){
428  int wheel = res[1]=="A"? 1 : -1;
429  int sector = std::stoi(res[4]) + 1;
430  std::string stationName = sector%2==0 ? "STS" : "STL";
431 
432  /*
433  res[3] -> Strip/Pad
434  res[5] -> L
435  res[6] -> R
436  res[7] -> E
437  */
438 
439  int radius = std::stoi(res[6]);
440  int stationEta = wheel*(radius+1);
441  int stationPhi = (sector-1)/2+1;
442  int multiLayer = (std::stoi(res[5]) < 4 ? 1 : 2);
443  int gasGap = ((std::stoi(res[5]))%4)+1;
444  uint channelType = (res[3] == "Pad" ? sTgcIdHelper::sTgcChannelTypes::Pad : sTgcIdHelper::sTgcChannelTypes::Strip);
445  Identifier chnlId = m_idHelperSvc->stgcIdHelper().febID(stationName, stationEta, stationPhi, multiLayer, gasGap, channelType, isValid);
446  if(!isValid){
447  ATH_MSG_DEBUG("Could not extract valid channelId for STG channel "<<chanName);
448  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << elink);
449  isOK = false;
450  return false;
451  }
452  channelId = chnlId;
453  elink = std::stoi(res[7]);
454  }
455 
456  return true;
457 }

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode NswDcsDbAlg::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 43 of file NswDcsDbAlg.cxx.

43  {
44 
45  ATH_MSG_DEBUG( "execute " << name() );
46 
47  // set up write handles
49  if (wrHdl.isValid()) {
50  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
51  << " In theory this should not be called, but may happen"
52  << " if multiple concurrent events are being processed out of order.");
53  return StatusCode::SUCCESS;
54  }
55  wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteMixed()));
56  ATH_MSG_DEBUG("Range of time/charge output is " << wrHdl.getRange());
57  std::unique_ptr<NswDcsDbData> wrCdo{std::make_unique<NswDcsDbData>(m_idHelperSvc->mmIdHelper(), m_idHelperSvc->stgcIdHelper(), m_muDetMgrFromDetStore)};
58 
59  // load HV data
60  ATH_CHECK(loadHvData(ctx, m_readKey_mmg_hv, DcsTechType::MMG, wrHdl, wrCdo.get()));
61  ATH_CHECK(loadHvData(ctx, m_readKey_mmg_hv, DcsTechType::MMD, wrHdl, wrCdo.get()));
62  ATH_CHECK(loadHvData(ctx, m_readKey_stg_hv, DcsTechType::STG, wrHdl, wrCdo.get()));
63 
64  // load TDAQ data
65  if(m_loadTdaq){
66  ATH_CHECK(loadTDaqData(ctx, m_readKey_mmg_tdaq, DcsTechType::MMG, wrHdl, wrCdo.get()));
67  ATH_CHECK(loadTDaqData(ctx, m_readKey_stg_tdaq, DcsTechType::STG, wrHdl, wrCdo.get()));
68  }
69  if(m_loadEltx){
70  ATH_CHECK(loadELTXData(ctx, m_readKey_mmg_eltx, DcsTechType::MMG, wrHdl, wrCdo.get()));
71  ATH_CHECK(loadELTXData(ctx, m_readKey_stg_eltx, DcsTechType::STG, wrHdl, wrCdo.get()));
72  }
73 
74  // insert/write data
75  if (wrHdl.record(std::move(wrCdo)).isFailure()) {
76  ATH_MSG_FATAL("Could not record " << wrHdl.key()
77  << " with EventRange " << wrHdl.getRange()
78  << " into Conditions Store");
79  return StatusCode::FAILURE;
80  }
81  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
82 
83  return StatusCode::SUCCESS;
84 
85 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode NswDcsDbAlg::initialize ( )
overridevirtual

Definition at line 16 of file NswDcsDbAlg.cxx.

16  {
17 
18  // retrievals
19  ATH_MSG_DEBUG( "initializing " << name() );
21  ATH_CHECK(m_idHelperSvc.retrieve());
22 
23  // initialize read keys
30 
31  // write key for time/charge data
33 
35 
36  ATH_MSG_INFO("NswDcsAlg is using tdaq "<< m_loadTdaq << " and eltx " << m_loadEltx);
37 
38  return StatusCode::SUCCESS;
39 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ isReEntrant()

virtual bool NswDcsDbAlg::isReEntrant ( ) const
inlineoverridevirtual

Definition at line 39 of file NswDcsDbAlg.h.

39 { return false; }

◆ loadELTXData()

StatusCode NswDcsDbAlg::loadELTXData ( const EventContext &  ctx,
const readKey_t readKey,
const DcsTechType  tech,
writeHandleDcs_t writeHandle,
NswDcsDbData writeCdo 
) const
private

Definition at line 195 of file NswDcsDbAlg.cxx.

195  {
196 
197  // set up read handle
198  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
199  const CondAttrListCollection* readCdo{*readHandle};
200  if(!readCdo){
201  ATH_MSG_ERROR("Null pointer to the read conditions object");
202  return StatusCode::FAILURE;
203  }
204  writeHandle.addDependency(readHandle);
205  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
206  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
207 
208  // This code is under development so lets mute unused variable warnings for now
209  (void) writeCdo;
210  (void) tech;
211 
212  // iterate through data
214  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
215 
216  // channel ID and name
217  const unsigned int chanNum = itr->first;
218  const std::string& chanName = readCdo->chanName(chanNum);
219  if(chanName.empty()){
220  ATH_MSG_DEBUG("Channel number "<< chanNum <<"has empty name");
221  continue;
222  }
223  const coral::AttributeList& atr = itr->second;
224  bool online = *(static_cast<const bool*>((atr["online"]).addressOfData()));
225  ATH_MSG_DEBUG("found SCA " << chanName << " with status " << atr["online"] << " " << online);
226  if(online) continue; // we only want to record things that are dead
228  bool isOk{false};
229  if(!buildChannelIdForEltx(channelId, tech, chanName, isOk)){
230  continue;
231  }
232  ATH_MSG_DEBUG(__FILE__<<":"<<__LINE__<<" "<<m_idHelperSvc->toString(channelId));
233  writeCdo->setDataEltx(tech, channelId);
234  }
235  return StatusCode::SUCCESS;
236 
237 }

◆ loadHvData()

StatusCode NswDcsDbAlg::loadHvData ( const EventContext &  ctx,
const readKey_t readKey,
const DcsTechType  tech,
writeHandleDcs_t writeHandle,
NswDcsDbData writeCdo 
) const
private

Definition at line 89 of file NswDcsDbAlg.cxx.

89  {
90 
91  // set up read handle
92  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
93  const CondAttrListCollection* readCdo{*readHandle};
94  if(!readCdo){
95  ATH_MSG_ERROR("Null pointer to the read conditions object");
96  return StatusCode::FAILURE;
97  }
98  writeHandle.addDependency(readHandle);
99  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
100  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
101 
102  // iterate through data
104  unsigned int nChns = 0;
105  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
106 
107  // channel ID and name
108  const unsigned int chanNum = itr->first;
109  const std::string& chanName = readCdo->chanName(chanNum);
110  if(chanName.empty()){
111  ATH_MSG_DEBUG("Channel number "<< chanNum <<"has empty name");
112  continue;
113  }
115  bool isOK = false;
116  bool found = buildChannelIdForHv(channelId, tech, chanName, isOK);
117  if(!found){
118  if(!isOK){
119  ATH_MSG_ERROR("Could not identify valid channelId for channel "<<chanNum<<" with name "<< chanName<<"!");
120  throw std::runtime_error("NswDcsDbAlg: Could not identify valid channelId for HV channel");
121  }
122  continue;
123  }
124 
125  // payload
126  const coral::AttributeList& atr = itr->second;
127 
128  NswDcsDbData::DcsConstants dcs_data{};
129  dcs_data.standbyVolt = *(static_cast<const float*>((atr["v0Set"]).addressOfData()));
130  dcs_data.readyVolt = *(static_cast<const float*>((atr["v1Set"]).addressOfData()));
131  dcs_data.fsmState = MuonCond::getFsmStateEnum(*(static_cast<const std::string*>((atr["fsmCurrentState"]).addressOfData())));
132  ATH_MSG_DEBUG("channel " << chanName << " has fsm state " << *(static_cast<const std::string*>((atr["fsmCurrentState"]).addressOfData()))<< " has v0 state " << *(static_cast<const float*>( (atr["v0Set"]).addressOfData()))<< " has v1 " << *(static_cast<const float*>((atr["v1Set"]).addressOfData())));
133 
134  writeCdo->setDataHv(tech, channelId, dcs_data);
135  ++nChns;
136  }
137  ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels.");
138 
139  return StatusCode::SUCCESS;
140 }

◆ loadTDaqData()

StatusCode NswDcsDbAlg::loadTDaqData ( const EventContext &  ctx,
const readKey_t readKey,
const DcsTechType  tech,
writeHandleDcs_t writeHandle,
NswDcsDbData writeCdo 
) const
private

Definition at line 145 of file NswDcsDbAlg.cxx.

145  {
146  // set up read handle
147  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
148  const CondAttrListCollection* readCdo{*readHandle};
149  if(!readCdo){
150  ATH_MSG_ERROR("Null pointer to the read conditions object");
151  return StatusCode::FAILURE;
152  }
153  writeHandle.addDependency(readHandle);
154  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
155  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
156 
157  // iterate through data
159  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
160 
161  // retrieve data
162  const coral::AttributeList& atr = itr->second;
163  std::string data = *(static_cast<const std::string *>((atr["data_array"]).addressOfData()));
164 
165  // unwrap the json and process the data
167  unsigned int nLB = 0;
168 
169  // loop over lumi blocks and channels
170  for (auto &yy : jx["holes"].items()) {
171  nlohmann::json jt = yy.value();
172 
173  // channel ID and name
175  bool isOK = false;
176  uint elink{0};
177  bool found = buildChannelIdForTDaq(channelId, elink, tech, jt["channelName"], isOK);
178  if(!found){
179  if(!isOK)
180  ATH_MSG_DEBUG("Could not identify valid channelId for channel "<<jt["channelId"]<<" with name "<< jt["channelName"]<<"! Skipping...");
181  continue;
182  }
183  // write data
184  int channelDead = jt["channelDead"];
185  writeCdo->setDataTDaq(tech, channelId, jt["hole_iovSince"], jt["hole_iovUntil"], elink, channelDead );
186  ATH_MSG_VERBOSE(m_idHelperSvc->toString(channelId)<<" " << jt["channelName"] << " " << jt["hole_iovSince"]<<" " <<jt["hole_iovUntil"]<<" " << elink<<" "<<channelDead );
187  ++nLB;
188  }
189  ATH_MSG_VERBOSE("Retrieved data for "<<nLB<<" entries (combinations of lumi block and channel).");
190  }
191 
192  return StatusCode::SUCCESS;
193 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ processHvData()

StatusCode NswDcsDbAlg::processHvData ( const EventContext &  ctx) const
private

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_condSvc

ServiceHandle<ICondSvc> NswDcsDbAlg::m_condSvc {this, "CondSvc", "CondSvc"}
private

Definition at line 64 of file NswDcsDbAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> NswDcsDbAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 65 of file NswDcsDbAlg.h.

◆ m_loadEltx

Gaudi::Property<bool> NswDcsDbAlg::m_loadEltx {this, "LoadEltx",false,"enable the processing of SCAs in the NswDcsDbAlg"}
private

Definition at line 79 of file NswDcsDbAlg.h.

◆ m_loadTdaq

Gaudi::Property<bool> NswDcsDbAlg::m_loadTdaq {this, "LoadTdaq",false,"enable the processing of Elinks in the NswDcsDbAlg"}
private

Definition at line 78 of file NswDcsDbAlg.h.

◆ m_muDetMgrFromDetStore

const MuonGM::MuonDetectorManager* NswDcsDbAlg::m_muDetMgrFromDetStore
private

Definition at line 81 of file NswDcsDbAlg.h.

◆ m_readKey_mmg_eltx

readKey_t NswDcsDbAlg::m_readKey_mmg_eltx {this, "ReadKey_MMG_ELTX", "", "Key of input MMG condition data for SCA status"}
private

Definition at line 75 of file NswDcsDbAlg.h.

◆ m_readKey_mmg_hv

readKey_t NswDcsDbAlg::m_readKey_mmg_hv {this, "ReadKey_MMG_HV", "/MMG/DCS/HV", "Key of input MMG condition data for HV"}
private

Definition at line 69 of file NswDcsDbAlg.h.

◆ m_readKey_mmg_tdaq

readKey_t NswDcsDbAlg::m_readKey_mmg_tdaq {this, "ReadKey_MMG_TDAQ", "", "Key of input MMG condition data for TDAQ"}
private

Definition at line 72 of file NswDcsDbAlg.h.

◆ m_readKey_stg_eltx

readKey_t NswDcsDbAlg::m_readKey_stg_eltx {this, "ReadKey_STG_ELTX", "", "Key of input STG condition data for SCA status"}
private

Definition at line 76 of file NswDcsDbAlg.h.

◆ m_readKey_stg_hv

readKey_t NswDcsDbAlg::m_readKey_stg_hv {this, "ReadKey_STG_HV", "/STG/DCS/HV", "Key of input STG condition data for HV"}
private

Definition at line 70 of file NswDcsDbAlg.h.

◆ m_readKey_stg_tdaq

readKey_t NswDcsDbAlg::m_readKey_stg_tdaq {this, "ReadKey_STG_TDAQ", "", "Key of input STG condition data for TDAQ"}
private

Definition at line 73 of file NswDcsDbAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

writeKey_t NswDcsDbAlg::m_writeKey {this, "WriteKey", "NswDcsDbData", "Key of output data object" }
private

Definition at line 67 of file NswDcsDbAlg.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
NswDcsDbAlg::buildChannelIdForEltx
bool buildChannelIdForEltx(Identifier &channelId, const DcsTechType tech0, const std::string &chanName, bool &isOK) const
Definition: NswDcsDbAlg.cxx:461
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
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
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
NswDcsDbData::DcsTechType::STG
@ STG
NswDcsDbData::setDataEltx
void setDataEltx(const DcsTechType tech, const Identifier &chnlId)
Definition: NswDcsDbData.cxx:104
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PlotCalibFromCool.yy
yy
Definition: PlotCalibFromCool.py:714
json
nlohmann::json json
Definition: HistogramDef.cxx:9
dumpTgcDigiDeadChambers.stationName
dictionary stationName
Definition: dumpTgcDigiDeadChambers.py:30
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1040
NswDcsDbAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: NswDcsDbAlg.h:65
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
IOVInfiniteRange::infiniteMixed
static EventIDRange infiniteMixed()
Produces an mixed EventIDRange that is infinite in Time and RunLumi.
Definition: IOVInfiniteRange.h:55
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
NswDcsDbAlg::m_muDetMgrFromDetStore
const MuonGM::MuonDetectorManager * m_muDetMgrFromDetStore
Definition: NswDcsDbAlg.h:81
NswDcsDbAlg::DcsTechType
NswDcsDbData::DcsTechType DcsTechType
Definition: NswDcsDbAlg.h:51
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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
NswDcsDbAlg::buildChannelIdForTDaq
bool buildChannelIdForTDaq(Identifier &channelId, uint &elink, const DcsTechType tech0, const std::string &chanName, bool &isOK) const
Definition: NswDcsDbAlg.cxx:356
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
NswDcsDbAlg::m_readKey_stg_tdaq
readKey_t m_readKey_stg_tdaq
Definition: NswDcsDbAlg.h:73
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonCond::DcsConstants::standbyVolt
float standbyVolt
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:32
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
NswDcsDbAlg::buildChannelIdForHv
bool buildChannelIdForHv(Identifier &channelId, const DcsTechType tech0, const std::string &chanName, bool &isOK) const
Definition: NswDcsDbAlg.cxx:242
NswDcsDbAlg::m_writeKey
writeKey_t m_writeKey
Definition: NswDcsDbAlg.h:67
TileSynchronizeBch.online
online
Definition: TileSynchronizeBch.py:88
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
checkCoolLatestUpdate.chanNum
chanNum
Definition: checkCoolLatestUpdate.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
NswDcsDbData::DcsTechType::MMD
@ MMD
lumiFormat.i
int i
Definition: lumiFormat.py:92
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
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
MuonCond::DcsConstants
Helper struct to cache all dcs constants in a common place of the memory.
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:31
NswDcsDbAlg::loadELTXData
StatusCode loadELTXData(const EventContext &ctx, const readKey_t &readKey, const DcsTechType tech, writeHandleDcs_t &writeHandle, NswDcsDbData *writeCdo) const
Definition: NswDcsDbAlg.cxx:195
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
NswDcsDbAlg::loadHvData
StatusCode loadHvData(const EventContext &ctx, const readKey_t &readKey, const DcsTechType tech, writeHandleDcs_t &writeHandle, NswDcsDbData *writeCdo) const
Definition: NswDcsDbAlg.cxx:89
checkCorrelInHIST.nLB
int nLB
Definition: checkCorrelInHIST.py:21
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
NswDcsDbData::DcsTechType::MMG
@ MMG
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
NswDcsDbAlg::m_loadEltx
Gaudi::Property< bool > m_loadEltx
Definition: NswDcsDbAlg.h:79
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
NswDcsDbData::setDataHv
void setDataHv(const DcsTechType tech, const Identifier &chnlId, DcsConstants constants)
Definition: NswDcsDbData.cxx:56
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
NswDcsDbAlg::m_readKey_mmg_tdaq
readKey_t m_readKey_mmg_tdaq
Definition: NswDcsDbAlg.h:72
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
NswDcsDbAlg::m_readKey_mmg_eltx
readKey_t m_readKey_mmg_eltx
Definition: NswDcsDbAlg.h:75
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
NswDcsDbAlg::m_readKey_stg_eltx
readKey_t m_readKey_stg_eltx
Definition: NswDcsDbAlg.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
re
const boost::regex re(r_e)
NswDcsDbAlg::m_loadTdaq
Gaudi::Property< bool > m_loadTdaq
Definition: NswDcsDbAlg.h:78
NswDcsDbAlg::m_readKey_mmg_hv
readKey_t m_readKey_mmg_hv
Definition: NswDcsDbAlg.h:69
MuonCond::getFsmStateEnum
DcsFsmState getFsmStateEnum(const std::string &fsmState)
Definition: Defs.cxx:8
NswDcsDbAlg::loadTDaqData
StatusCode loadTDaqData(const EventContext &ctx, const readKey_t &readKey, const DcsTechType tech, writeHandleDcs_t &writeHandle, NswDcsDbData *writeCdo) const
Definition: NswDcsDbAlg.cxx:145
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
NswDcsDbData::setDataTDaq
void setDataTDaq(const DcsTechType tech, const Identifier &chnlId, uint64_t timeSince, uint64_t timeUntil, unsigned int elink, bool permanentlyDisabled)
Definition: NswDcsDbData.cxx:91
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
NswDcsDbAlg::m_condSvc
ServiceHandle< ICondSvc > m_condSvc
Definition: NswDcsDbAlg.h:64
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
sTgcDigitEffiDump.multiLayer
int multiLayer
Definition: sTgcDigitEffiDump.py:36
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
NswDcsDbAlg::m_readKey_stg_hv
readKey_t m_readKey_stg_hv
Definition: NswDcsDbAlg.h:70
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >