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"}
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_muonManagerKey
 
const MuonGM::MuonDetectorManagerm_detManager {nullptr}
 
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 483 of file NswDcsDbAlg.cxx.

483  {
484 
485  // prepare regex
486  std::regex re("^(A|C)_([0-9]{2})_L([0-9])_B([0-9]{2})");
487 
488 
489  // match regex
490  if(!std::regex_match(chanName, re)) {
491  ATH_MSG_WARNING("Could not identify channel with name "<<chanName);
492  isOK = false;
493  return false;
494  }
495 
496  // build channel Id
497  bool isValid{false};
498  std::smatch m;
499  std::regex_match(chanName, m, re);
500 
501  // copy to vec of strings
502  std::vector<std::string> res;
503  for(unsigned int i=0; i<m.size(); ++i) res.push_back(m[i].str());
504 
505  //extract field common to MM and stgc
506  int wheel = res[1]=="A"? 1 : -1;
507  int sector = std::stoi(res[2])+1;
508  int board = std::stoi(res[4]);
509  int layer = std::stoi(res[3]);
510  int stationPhi = (sector-1)/2+1;
511  int multiLayer = layer< 5 ? 1 : 2; // layers 1-4 are on multilayer 1 and layers 5-8 are on multilayer 2
512  int gasGap = ((layer-1)%4) + 1; // identifies layer within multilayer
513 
514 
515  // MMG Channel
516  if(tech==DcsTechType::MMG){
517  int stationName = sector%2==0 ? 56 : 55;
518 
519  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
520  int radius{0};
521  if(board%4==0){
522  radius = 2*(board/4);
523  } else if (board%4==3) {
524  radius = 2*(board/4) + 1;
525  } else { // not a readout board
526  isOK = true;
527  return false;
528  }
529 
530  int stationEta = wheel*(radius<10? 1 : 2); // boards 0-9 are on the first quad, boards 10-15 on the second one
532  if(!isValid){
533  ATH_MSG_WARNING("Could not extract valid channelId for MMG channel "<<chanName);
534  ATH_MSG_WARNING("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << board);
535  isOK = false;
536  return false;
537  }
538  channelId = chnlId;
539  } else if(tech==DcsTechType::STG){
540  int stationName = sector%2==0 ? 58 : 57;
541  board -= 1; // count from 0 while input counts from one
542  uint radius = board/2;
543  int stationEta = wheel*(radius+1);
544  uint channelType{0};
545  if(board>=6){ // not a STG readout board
546  isOK = true;
547  return false;
548  }
549  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
550  if(board%2==0){
551  channelType=sTgcIdHelper::sTgcChannelTypes::Strip;
552  } else {
553  channelType=sTgcIdHelper::sTgcChannelTypes::Pad;
554  }
555  } 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
556  if(board%2==0){
557  channelType=sTgcIdHelper::sTgcChannelTypes::Pad;
558  } else {
559  channelType=sTgcIdHelper::sTgcChannelTypes::Strip;
560  }
561  }
562  Identifier chnlId = m_idHelperSvc->stgcIdHelper().febID(stationName, stationEta, stationPhi, multiLayer, gasGap, channelType ,isValid);
563  if(!isValid){
564  ATH_MSG_WARNING("Could not extract valid channelId for STG channel "<<chanName);
565  ATH_MSG_WARNING("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << board << " " << channelType);
566  isOK = false;
567  return false;
568  }
569  channelId = chnlId;
570  }
571  return true;
572 }

◆ buildChannelIdForHv()

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

Definition at line 264 of file NswDcsDbAlg.cxx.

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

◆ buildChannelIdForTDaq()

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

Definition at line 378 of file NswDcsDbAlg.cxx.

378  {
379 
380  // prepare regex
381  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})");
382  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})");
383  std::regex reSTGTrigProc("^ELink-sTGC-A/V0/L1A/TrigProc/");
384  std::regex reSTGPadTrig("^ELink-sTGC-A/V0/L1A/PadTrig/");
385 
386  std::regex re;
388 
389  // match regex
390  if(std::regex_match(chanName, reMMG)) {
391  re = reMMG;
392  tech = DcsTechType::MMG;
393  }
394  else if(std::regex_match(chanName, reSTG)) {
395  re = reSTG;
396  tech = DcsTechType::STG;
397  } else if(std::regex_match(chanName, reSTGPadTrig) || std::regex_match(chanName, reSTGTrigProc)){ // those are trigger elinks that are not needed in athena
398  isOK = true;
399  return false;
400  }
401  else {
402  ATH_MSG_DEBUG("Could not identify channel with name "<<chanName);
403  isOK = false;
404  return false;
405  }
406 
407  // sanity check
408  if(tech0!=tech) {
409  isOK = true; // need to distinguish error in parsing and simple difference between required technologies
410  return false;
411  }
412 
413  // build channel Id
414  bool isValid{false};
415  std::smatch m;
416  std::regex_match(chanName, m, re);
417 
418  // copy to vec of strings
419  std::vector<std::string> res;
420  for(unsigned int i=0; i<m.size(); ++i) res.push_back(m[i].str());
421 
422  // MMG Channel
423  if(tech==DcsTechType::MMG){
424  int wheel = res[1]=="A"? 1 : -1;
425  int sector = std::stoi(res[3])+1; // elx counts from 0 athena from 1 -->need a +1
426  int stationName = sector%2==0 ? 55 : 56;
427  /*
428  res[4] -> L
429  res[5] -> R
430  res[6] -> E
431  */
432  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
433  int stationPhi = (sector-1)/2+1;
434  int multiLayer = std::stoi(res[4])< 4 ? 1 : 2; // layers 0-3 are on multilayer 1 and layers 4-7 are on multilayer 2
435  int gasGap = (std::stoi(res[4])%4) + 1; // identifies layer within multilayer --> counts from 0-3; +1 because athena counts from 1-4
436  int radius = std::stoi(res[5]);
438  elink = std::stoi(res[6]);
439  if(!isValid){
440  ATH_MSG_DEBUG("Could not extract valid channelId for MMG channel "<<chanName);
441  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << elink);
442  isOK = false;
443  return false;
444  }
445  channelId = chnlId;
446  }
447 
448  // STG
449  else if(tech==DcsTechType::STG){
450  int wheel = res[1]=="A"? 1 : -1;
451  int sector = std::stoi(res[4]) + 1;
452  std::string stationName = sector%2==0 ? "STS" : "STL";
453 
454  /*
455  res[3] -> Strip/Pad
456  res[5] -> L
457  res[6] -> R
458  res[7] -> E
459  */
460 
461  int radius = std::stoi(res[6]);
462  int stationEta = wheel*(radius+1);
463  int stationPhi = (sector-1)/2+1;
464  int multiLayer = (std::stoi(res[5]) < 4 ? 1 : 2);
465  int gasGap = ((std::stoi(res[5]))%4)+1;
466  uint channelType = (res[3] == "Pad" ? sTgcIdHelper::sTgcChannelTypes::Pad : sTgcIdHelper::sTgcChannelTypes::Strip);
467  Identifier chnlId = m_idHelperSvc->stgcIdHelper().febID(stationName, stationEta, stationPhi, multiLayer, gasGap, channelType, isValid);
468  if(!isValid){
469  ATH_MSG_DEBUG("Could not extract valid channelId for STG channel "<<chanName);
470  ATH_MSG_DEBUG("Fields: "<< wheel << " "<<sector<<" " << stationName<< " " << stationEta<<" "<<stationPhi<<" "<<multiLayer<<" " << gasGap<<" " << radius<<" " << elink);
471  isOK = false;
472  return false;
473  }
474  channelId = chnlId;
475  elink = std::stoi(res[7]);
476  }
477 
478  return true;
479 }

◆ 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 44 of file NswDcsDbAlg.cxx.

44  {
45 
46  ATH_MSG_DEBUG( "execute " << name() );
47 
48  // set up write handles
50  if (wrHdl.isValid()) {
51  ATH_MSG_DEBUG("CondHandle " << wrHdl.fullKey() << " is already valid."
52  << " In theory this should not be called, but may happen"
53  << " if multiple concurrent events are being processed out of order.");
54  return StatusCode::SUCCESS;
55  }
56  wrHdl.addDependency(EventIDRange(IOVInfiniteRange::infiniteMixed()));
57  ATH_MSG_DEBUG("Range of time/charge output is " << wrHdl.getRange());
58 
60  if (!detMgr.isValid()) {
62  "Failed to retrieve the detector manager from the conditions store "
63  << m_muonManagerKey.fullKey());
64  return StatusCode::FAILURE;
65  }
66  wrHdl.addDependency(detMgr);
67  std::unique_ptr<NswDcsDbData> wrCdo{std::make_unique<NswDcsDbData>(m_idHelperSvc.get(), detMgr.cptr())};
68 
69  // load HV data
70  if(!m_readKey_mmg_hv.empty()){
71  ATH_CHECK(loadHvData(ctx, m_readKey_mmg_hv, DcsTechType::MMG, wrHdl, wrCdo.get()));
72  ATH_CHECK(loadHvData(ctx, m_readKey_mmg_hv, DcsTechType::MMD, wrHdl, wrCdo.get()));
73  }
74  if(!m_readKey_stg_hv.empty()){
75  ATH_CHECK(loadHvData(ctx, m_readKey_stg_hv, DcsTechType::STG, wrHdl, wrCdo.get()));
76  }
77 
78  // load TDAQ data
79  if(m_loadTdaq){
80  if(!m_readKey_mmg_tdaq.empty()) {
81  ATH_CHECK(loadTDaqData(ctx, m_readKey_mmg_tdaq, DcsTechType::MMG, wrHdl, wrCdo.get()));
82  }
83  if(!m_readKey_stg_tdaq.empty()) {
84  ATH_CHECK(loadTDaqData(ctx, m_readKey_stg_tdaq, DcsTechType::STG, wrHdl, wrCdo.get()));
85  }
86  }
87  if(m_loadEltx){
88  if(!m_readKey_mmg_eltx.empty()) {
89  ATH_CHECK(loadELTXData(ctx, m_readKey_mmg_eltx, DcsTechType::MMG, wrHdl, wrCdo.get()));
90  }
91  if(!m_readKey_stg_eltx.empty()) {
92  ATH_CHECK(loadELTXData(ctx, m_readKey_stg_eltx, DcsTechType::STG, wrHdl, wrCdo.get()));
93  }
94  }
95 
96  // insert/write data
97  if (wrHdl.record(std::move(wrCdo)).isFailure()) {
98  ATH_MSG_FATAL("Could not record " << wrHdl.key()
99  << " with EventRange " << wrHdl.getRange()
100  << " into Conditions Store");
101  return StatusCode::FAILURE;
102  }
103  ATH_MSG_DEBUG("Recorded new " << wrHdl.key() << " with range " << wrHdl.getRange() << " into Conditions Store");
104 
105  return StatusCode::SUCCESS;
106 
107 }

◆ 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 17 of file NswDcsDbAlg.cxx.

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

◆ 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 217 of file NswDcsDbAlg.cxx.

217  {
218 
219  // set up read handle
220  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
221  const CondAttrListCollection* readCdo{*readHandle};
222  if(!readCdo){
223  ATH_MSG_ERROR("Null pointer to the read conditions object");
224  return StatusCode::FAILURE;
225  }
226  writeHandle.addDependency(readHandle);
227  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
228  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
229 
230  // This code is under development so lets mute unused variable warnings for now
231  (void) writeCdo;
232  (void) tech;
233 
234  // iterate through data
236  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
237 
238  // channel ID and name
239  const unsigned int chanNum = itr->first;
240  const std::string& chanName = readCdo->chanName(chanNum);
241  if(chanName.empty()){
242  ATH_MSG_DEBUG("Channel number "<< chanNum <<"has empty name");
243  continue;
244  }
245  const coral::AttributeList& atr = itr->second;
246  bool online = *(static_cast<const bool*>((atr["online"]).addressOfData()));
247  ATH_MSG_DEBUG("found SCA " << chanName << " with status " << atr["online"] << " " << online);
248  if(online) continue; // we only want to record things that are dead
250  bool isOk{false};
251  if(!buildChannelIdForEltx(channelId, tech, chanName, isOk)){
252  continue;
253  }
254  ATH_MSG_DEBUG(__FILE__<<":"<<__LINE__<<" "<<m_idHelperSvc->toString(channelId));
255  writeCdo->setDataEltx(tech, channelId);
256  }
257  return StatusCode::SUCCESS;
258 
259 }

◆ loadHvData()

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

Definition at line 111 of file NswDcsDbAlg.cxx.

111  {
112 
113  // set up read handle
114  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
115  const CondAttrListCollection* readCdo{*readHandle};
116  if(!readCdo){
117  ATH_MSG_ERROR("Null pointer to the read conditions object");
118  return StatusCode::FAILURE;
119  }
120  writeHandle.addDependency(readHandle);
121  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
122  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
123 
124  // iterate through data
126  unsigned int nChns = 0;
127  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
128 
129  // channel ID and name
130  const unsigned int chanNum = itr->first;
131  const std::string& chanName = readCdo->chanName(chanNum);
132  if(chanName.empty()){
133  ATH_MSG_DEBUG("Channel number "<< chanNum <<"has empty name");
134  continue;
135  }
137  bool isOK = false;
138  bool found = buildChannelIdForHv(channelId, tech, chanName, isOK);
139  if(!found){
140  if(!isOK){
141  ATH_MSG_ERROR("Could not identify valid channelId for channel "<<chanNum<<" with name "<< chanName<<"!");
142  THROW_EXCEPTION("NswDcsDbAlg: Could not identify valid channelId for HV channel");
143  }
144  continue;
145  }
146 
147  // payload
148  const coral::AttributeList& atr = itr->second;
149 
150  NswDcsDbData::DcsConstants dcs_data{};
151  dcs_data.standbyVolt = *(static_cast<const float*>((atr["v0Set"]).addressOfData()));
152  dcs_data.readyVolt = *(static_cast<const float*>((atr["v1Set"]).addressOfData()));
153  dcs_data.fsmState = MuonCond::getFsmStateEnum(*(static_cast<const std::string*>((atr["fsmCurrentState"]).addressOfData())));
154  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())));
155 
156  writeCdo->setDataHv(tech, channelId, dcs_data);
157  ++nChns;
158  }
159  ATH_MSG_VERBOSE("Retrieved data for "<<nChns<<" channels.");
160 
161  return StatusCode::SUCCESS;
162 }

◆ loadTDaqData()

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

Definition at line 167 of file NswDcsDbAlg.cxx.

167  {
168  // set up read handle
169  SG::ReadCondHandle<CondAttrListCollection> readHandle{readKey, ctx};
170  const CondAttrListCollection* readCdo{*readHandle};
171  if(!readCdo){
172  ATH_MSG_ERROR("Null pointer to the read conditions object");
173  return StatusCode::FAILURE;
174  }
175  writeHandle.addDependency(readHandle);
176  ATH_MSG_DEBUG("Size of CondAttrListCollection " << readHandle.fullKey() << " readCdo->size()= " << readCdo->size());
177  ATH_MSG_DEBUG("Range of input is " << readHandle.getRange() << ", range of output is " << writeHandle.getRange());
178 
179  // iterate through data
181  for(itr = readCdo->begin(); itr != readCdo->end(); ++itr) {
182 
183  // retrieve data
184  const coral::AttributeList& atr = itr->second;
185  std::string data = *(static_cast<const std::string *>((atr["data_array"]).addressOfData()));
186 
187  // unwrap the json and process the data
189  unsigned int nLB = 0;
190 
191  // loop over lumi blocks and channels
192  for (auto &yy : jx["holes"].items()) {
193  nlohmann::json jt = yy.value();
194 
195  // channel ID and name
197  bool isOK = false;
198  uint elink{0};
199  bool found = buildChannelIdForTDaq(channelId, elink, tech, jt["channelName"], isOK);
200  if(!found){
201  if(!isOK)
202  ATH_MSG_DEBUG("Could not identify valid channelId for channel "<<jt["channelId"]<<" with name "<< jt["channelName"]<<"! Skipping...");
203  continue;
204  }
205  // write data
206  int channelDead = jt["channelDead"];
207  writeCdo->setDataTDaq(tech, channelId, jt["hole_iovSince"], jt["hole_iovUntil"], elink, channelDead );
208  ATH_MSG_VERBOSE(m_idHelperSvc->toString(channelId)<<" " << jt["channelName"] << " " << jt["hole_iovSince"]<<" " <<jt["hole_iovUntil"]<<" " << elink<<" "<<channelDead );
209  ++nLB;
210  }
211  ATH_MSG_VERBOSE("Retrieved data for "<<nLB<<" entries (combinations of lumi block and channel).");
212  }
213 
214  return StatusCode::SUCCESS;
215 }

◆ 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_detManager

const MuonGM::MuonDetectorManager* NswDcsDbAlg::m_detManager {nullptr}
private

Definition at line 84 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_muonManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> NswDcsDbAlg::m_muonManagerKey
private
Initial value:
{
this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}

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:483
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:158
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:100
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
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:1054
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::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:225
NswDcsDbAlg::buildChannelIdForTDaq
bool buildChannelIdForTDaq(Identifier &channelId, uint &elink, const DcsTechType tech0, const std::string &chanName, bool &isOK) const
Definition: NswDcsDbAlg.cxx:378
THROW_EXCEPTION
#define THROW_EXCEPTION(MSG)
Definition: MMReadoutElement.cxx:48
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
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonCond::DcsConstants::standbyVolt
float standbyVolt
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:32
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
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:264
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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:85
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:217
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
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:111
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:221
NswDcsDbData::setDataHv
void setDataHv(const DcsTechType tech, const Identifier &chnlId, DcsConstants constants)
Definition: NswDcsDbData.cxx:50
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:167
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
NswDcsDbData::setDataTDaq
void setDataTDaq(const DcsTechType tech, const Identifier &chnlId, uint64_t timeSince, uint64_t timeUntil, unsigned int elink, bool permanentlyDisabled)
Definition: NswDcsDbData.cxx:87
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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:156
NswDcsDbAlg::m_muonManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muonManagerKey
Definition: NswDcsDbAlg.h:81
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 >
Identifier
Definition: IdentifierFieldParser.cxx:14