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

#include <LArCaliWaveSelector.h>

Inheritance diagram for LArCaliWaveSelector:
Collaboration diagram for LArCaliWaveSelector:

Public Member Functions

 LArCaliWaveSelector (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~LArCaliWaveSelector ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode stop ()
 
StatusCode finalize ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void parseSelection ()
 
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

SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
 
const CaloCell_IDm_cellID
 
std::map< DetGain, int > m_mapDAC
 
unsigned short m_gmask
 
std::vector< std::string > m_keyList
 
std::vector< std::string > m_selectionList
 
std::string m_outputKey
 
std::string m_groupingType
 
DataObjIDColl m_extendedExtraObjects
 
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 28 of file LArCaliWaveSelector.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArCaliWaveSelector()

LArCaliWaveSelector::LArCaliWaveSelector ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 23 of file LArCaliWaveSelector.cxx.

24  : AthAlgorithm(name, pSvcLocator),
25  m_cellID(nullptr),
26  m_gmask(0),
27  m_groupingType("ExtendedFeedThrough")
28 {
29  declareProperty("SelectionList", m_selectionList); // Vector of strings of det/lay/gain/DAC -> "EMB/0/0/200"
30  // Known detectors EMB, EMEC, HEC, FCAL
31  // Available layers 0-3, gains 0-2, DAC 0-65000
32  declareProperty("KeyList", m_keyList);
33  declareProperty("KeyOutput", m_outputKey);
34  declareProperty("GroupingType", m_groupingType);
35 }

◆ ~LArCaliWaveSelector()

LArCaliWaveSelector::~LArCaliWaveSelector ( )
default

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< 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< 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< 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< 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< 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< 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< 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< 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< 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< 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< 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< 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< 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 LArCaliWaveSelector::execute ( )
inline

Definition at line 35 of file LArCaliWaveSelector.h.

35 { return StatusCode::SUCCESS;};

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode LArCaliWaveSelector::finalize ( )
inline

Definition at line 37 of file LArCaliWaveSelector.h.

37 { return StatusCode::SUCCESS;}

◆ initialize()

StatusCode LArCaliWaveSelector::initialize ( )

Definition at line 40 of file LArCaliWaveSelector.cxx.

41 {
42  ATH_MSG_INFO ( " in initialize.." );
43 
44  // Default list
45  if (m_keyList.empty()) { m_keyList.emplace_back("LArCaliWave"); }
47 
48  ATH_CHECK( detStore()->retrieve (m_cellID, "CaloCell_ID") );
49  if (!m_cellID) {
50  ATH_MSG_ERROR ( "Could not access CaloCell_ID helper" );
51  return StatusCode::FAILURE;
52  }
53 
55 
56  return StatusCode::SUCCESS;
57 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< 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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< 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< 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< 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.

◆ parseSelection()

void LArCaliWaveSelector::parseSelection ( )
private

Definition at line 141 of file LArCaliWaveSelector.cxx.

142 {
143  int det,lay,gain,DAC;
144  std::string selstr;
145  for(unsigned i=0; i<m_selectionList.size(); ++i) {
146  std::string::size_type det_delimiter( m_selectionList[i].find('/') );
147  if( std::string::npos == det_delimiter ){
148  ATH_MSG_WARNING ( "Bad selection string: "<< m_selectionList[i] << " skipped...." );
149  continue;
150  }
151  std::string det_string = m_selectionList[i].substr(0, det_delimiter);
152  if(det_string=="EMB") {
153  det = 0;
154  } else if (det_string == "EMEC") {
155  det = 1;
156  } else if (det_string == "HEC") {
157  det = 2;
158  } else if (det_string == "FCAL") {
159  det = 3;
160  } else {
161  ATH_MSG_WARNING ( "Bad detector substring: " << det_string << " skipped ... " );
162  continue;
163  }
164  std::string::size_type lay_delimiter( m_selectionList[i].find('/',det_delimiter+1) );
165  lay = atoi(m_selectionList[i].substr(det_delimiter+1, lay_delimiter).c_str());
166  if(lay < 0 || lay > 3) {
167  ATH_MSG_WARNING ( "Bad layer: " << lay << " skipped..." );
168  continue;
169  }
170  std::string::size_type gain_delimiter( m_selectionList[i].find('/',lay_delimiter+1) );
171  gain = atoi(m_selectionList[i].substr(lay_delimiter+1, gain_delimiter).c_str());
172  if(gain < 0 || gain > 2) {
173  ATH_MSG_WARNING ( "Bad gain: " << gain << " skipped..." );
174  continue;
175  }
176  DAC = atoi(m_selectionList[i].substr(gain_delimiter+1).c_str());
177  if(DAC < 0 || DAC > 65000) {
178  ATH_MSG_WARNING ( "Bad DAC: " << DAC << " skipped..." );
179  continue;
180  }
181 
182  // Now we have all numbers
183  m_mapDAC[std::make_pair( std::make_pair(det,lay), gain)] = DAC;
184  m_gmask |= (0x1<<gain);
185  }
186 }

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

◆ stop()

StatusCode LArCaliWaveSelector::stop ( )

Definition at line 60 of file LArCaliWaveSelector.cxx.

61 {
62  ATH_MSG_INFO ( " in stop.." );
63 
65  const LArOnOffIdMapping* cabling{*cablingHdl};
66  if(!cabling){
67  ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key() );
68  return StatusCode::FAILURE;
69  }
70 
71  // create empty LArCaliWaveContainer to store DAC selected LArCaliWave
72  // make it view container
73 // LArCaliWaveContainer* selectedCaliWaveContainer = new LArCaliWaveContainer(SG::VIEW_ELEMENTS);
74  auto selectedCaliWaveContainer = std::make_unique<LArCaliWaveContainer>();
75  CHECK( selectedCaliWaveContainer->setGroupingType(m_groupingType,msg()));
76  CHECK( selectedCaliWaveContainer->initialize());
77 
78  std::vector<std::string>::const_iterator key_it = m_keyList.begin();
79  std::vector<std::string>::const_iterator key_it_e = m_keyList.end();
80 
81  for (;key_it!=key_it_e; ++key_it) {
82  const LArCaliWaveContainer* larCaliWaveContainer;
83  StatusCode sc = detStore()->retrieve(larCaliWaveContainer,*key_it);
84  if (sc.isFailure()) {
85  ATH_MSG_WARNING ( "No LArCaliWaveContainer in StoreGate with key = " << *key_it );
86  continue;
87  } else {
88  ATH_MSG_INFO ( "Reading LArCaliWaveContainer with key = " << *key_it );
89  }
90 
91  int det, lay;
92  for ( unsigned gain = CaloGain::LARHIGHGAIN ; gain < CaloGain::LARNGAIN ; ++gain ) {
93  if(!( (0x1<<gain) & m_gmask) ) continue;
94 
95  CaliMapIt cali_it = larCaliWaveContainer->begin(gain) ;
96  CaliMapIt cali_it_e = larCaliWaveContainer->end(gain) ;
97 
98  if ( cali_it == cali_it_e ) {
99  ATH_MSG_DEBUG ( "No wave with gain = " << gain << " in container with key = " << *key_it );
100  continue;
101  } else {
102  ATH_MSG_DEBUG ( "processing gain = " << gain );
103  }
104  for ( ; cali_it != cali_it_e; ++cali_it) {
105 
106  CaliWaveIt wave_it = cali_it->begin();
107  CaliWaveIt wave_it_e = cali_it->end();
108  if ( wave_it == wave_it_e ) {
109  ATH_MSG_DEBUG ( "Empty channel found..." );
110  continue;
111  }
112 
113  HWIdentifier chid = cali_it.channelId();
114  Identifier cell_id = cabling->cnvToIdentifier(chid);
115  if(m_cellID->is_em_barrel(cell_id)){ det = 0;
116  } else if(m_cellID->is_em_endcap(cell_id)) { det = 1;
117  } else if(m_cellID->is_hec(cell_id)) { det = 2;
118  } else if(m_cellID->is_fcal(cell_id)) { det = 3;
119  } else {
120  ATH_MSG_ERROR ( "Wrong ID in LArCaliWaveContainer: "<<m_cellID->print_to_string(cell_id));
121  continue;
122  }
123  lay = m_cellID->sampling(cell_id);
124  DetGain dg = std::make_pair( std::make_pair(det,lay), gain);
125  if( m_mapDAC.find(dg) == m_mapDAC.end() ) continue;
126 
127  for ( ; wave_it != wave_it_e; ++wave_it) {
128  if(wave_it->getDAC() == m_mapDAC[dg]) {
129  (selectedCaliWaveContainer->get(chid,gain)).push_back(*wave_it);
130  break;
131  }
132  }
133  }
134  }
135  }
136 
137  ATH_CHECK( detStore()->record(std::move(selectedCaliWaveContainer),m_outputKey) );
138  return StatusCode::SUCCESS;
139 }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArCaliWaveSelector::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
private

Definition at line 41 of file LArCaliWaveSelector.h.

◆ m_cellID

const CaloCell_ID* LArCaliWaveSelector::m_cellID
private

Definition at line 45 of file LArCaliWaveSelector.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< 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< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_gmask

unsigned short LArCaliWaveSelector::m_gmask
private

Definition at line 48 of file LArCaliWaveSelector.h.

◆ m_groupingType

std::string LArCaliWaveSelector::m_groupingType
private

Definition at line 53 of file LArCaliWaveSelector.h.

◆ m_keyList

std::vector<std::string> LArCaliWaveSelector::m_keyList
private

Definition at line 50 of file LArCaliWaveSelector.h.

◆ m_mapDAC

std::map<DetGain, int> LArCaliWaveSelector::m_mapDAC
private

Definition at line 47 of file LArCaliWaveSelector.h.

◆ m_outputKey

std::string LArCaliWaveSelector::m_outputKey
private

Definition at line 52 of file LArCaliWaveSelector.h.

◆ m_selectionList

std::vector<std::string> LArCaliWaveSelector::m_selectionList
private

Definition at line 51 of file LArCaliWaveSelector.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LArConditionsContainerDB::iteratorT::channelId
HWIdentifier channelId() const
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
checkCoolLatestUpdate.dg
dg
Definition: checkCoolLatestUpdate.py:9
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
LArCaliWaveSelector::m_selectionList
std::vector< std::string > m_selectionList
Definition: LArCaliWaveSelector.h:51
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloCell_Base_ID::is_em_endcap
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
LArConditionsContainerDB::iteratorT
Declaration of const iterator.
Definition: LArConditionsContainerDB.h:72
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
LArCaliWaveSelector::m_outputKey
std::string m_outputKey
Definition: LArCaliWaveSelector.h:52
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArCaliWaveSelector::m_groupingType
std::string m_groupingType
Definition: LArCaliWaveSelector.h:53
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
HWIdentifier
Definition: HWIdentifier.h:13
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
CaloCell_Base_ID::is_hec
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArCaliWaveContainer
Liquid Argon Cumulative Wave Container.
Definition: LArCaliWaveContainer.h:33
AthCommonDataStore< AthCommonMsg< 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
LArCaliWaveSelector::m_cellID
const CaloCell_ID * m_cellID
Definition: LArCaliWaveSelector.h:45
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LArConditionsContainer::end
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloCell_Base_ID::is_fcal
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
CaloCell_Base_ID::sampling
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
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
WritePulseShapeToCool.det
det
Definition: WritePulseShapeToCool.py:204
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< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CaliWaveIt
LArCaliWaveContainer::LArCaliWaves::const_iterator CaliWaveIt
Definition: LArCaliWaveSelector.cxx:21
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
CaloCell_Base_ID::is_em_barrel
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
AtlasDetectorID::print_to_string
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:655
LArCaliWaveSelector::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArCaliWaveSelector.h:41
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArCaliWaveSelector::m_gmask
unsigned short m_gmask
Definition: LArCaliWaveSelector.h:48
LArCaliWaveSelector::m_mapDAC
std::map< DetGain, int > m_mapDAC
Definition: LArCaliWaveSelector.h:47
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
DetGain
std::pair< std::pair< int, int >, int > DetGain
Definition: LArCaliWaveSelector.h:23
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArConditionsContainer::begin
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LArCaliWaveSelector::m_keyList
std::vector< std::string > m_keyList
Definition: LArCaliWaveSelector.h:50
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
LArCaliWaveSelector::parseSelection
void parseSelection()
Definition: LArCaliWaveSelector.cxx:141
ServiceHandle< ICondSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20