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

#include <LArAutoCorrNoiseCondAlg.h>

Inheritance diagram for LArAutoCorrNoiseCondAlg:
Collaboration diagram for LArAutoCorrNoiseCondAlg:

Public Member Functions

 LArAutoCorrNoiseCondAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~LArAutoCorrNoiseCondAlg () override
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
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

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_LArOnOffIdMappingObjKey
 
SG::ReadCondHandleKey< LArMCSymm_LArMCSymObjKey
 
SG::ReadCondHandleKey< ILArAutoCorrm_LArAutoCorrObjKey
 
SG::WriteCondHandleKey< LArAutoCorrNoisem_LArAutoCorrNoiseObjKey
 
bool m_isSuperCell
 
bool m_MCsym
 
unsigned int m_nGains = 0U
 
int m_nSampl
 
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 21 of file LArAutoCorrNoiseCondAlg.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

◆ LArAutoCorrNoiseCondAlg()

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

Definition at line 14 of file LArAutoCorrNoiseCondAlg.cxx.

15  : ::AthAlgorithm( name, pSvcLocator )
16  , m_LArOnOffIdMappingObjKey( "LArOnOffIdMap" )
17  , m_LArMCSymObjKey( "LArMCSym" )
18  , m_LArAutoCorrObjKey( "LArAutoCorrSym" )
19  , m_LArAutoCorrNoiseObjKey( "LArAutoCorrNoise" )
20  , m_isSuperCell( false )
21  , m_MCsym( true )
22  , m_nSampl( 4 )
23 {
24  declareProperty( "LArOnOffIdMappingObjKey", m_LArOnOffIdMappingObjKey, "Key to read LArOnOffIdMapping object" );
25  declareProperty( "LArMCSymObjKey", m_LArMCSymObjKey, "Key to read LArMCSym object" );
26  declareProperty( "LArAutoCorrObjKey", m_LArAutoCorrObjKey, "Key to read LArAutoCorr object" );
27  declareProperty( "LArAutoCorrNoiseObjKey", m_LArAutoCorrNoiseObjKey, "Key to write LArAutoCorrNoise object" );
28  declareProperty( "isSuperCell", m_isSuperCell );
29  declareProperty( "MCsym", m_MCsym );
30  declareProperty( "nSampl", m_nSampl );
31 }

◆ ~LArAutoCorrNoiseCondAlg()

LArAutoCorrNoiseCondAlg::~LArAutoCorrNoiseCondAlg ( )
overridevirtual

Definition at line 33 of file LArAutoCorrNoiseCondAlg.cxx.

33 {}

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 LArAutoCorrNoiseCondAlg::execute ( )
overridevirtual

Definition at line 52 of file LArAutoCorrNoiseCondAlg.cxx.

53 {
54 
55  // WriteHandle setup
57  if ( writeHandle.isValid() ) {
58  ATH_MSG_DEBUG( "CondHandle " << writeHandle.fullKey() << " is already valid." );
59  return StatusCode::SUCCESS;
60  }
61 
62  // Identifier helper
63  const LArOnlineID_Base* larOnlineID = nullptr;
64  if ( m_isSuperCell ) {
65  const LArOnline_SuperCellID* scidhelper;
66  ATH_CHECK( detStore()->retrieve( scidhelper, "LArOnline_SuperCellID" ) );
67  larOnlineID = scidhelper; // cast to base-class
68  } else { // regular cells
69  const LArOnlineID* idhelper;
70  ATH_CHECK( detStore()->retrieve( idhelper, "LArOnlineID" ) );
71  larOnlineID = idhelper; // cast to base-class
72  }
73  // Mapping helper
74  const LArOnOffIdMapping* larOnOffIdMapping = nullptr;
76  larOnOffIdMapping = *larOnOffIdMappingHdl;
77  if ( larOnOffIdMapping == nullptr ) {
78  ATH_MSG_ERROR( "Failed to retrieve LArOnOffIdMapping object" );
79  }
80  // MC symmetrization helper
81  const LArMCSym* larMCsym = nullptr;
82  if ( !m_isSuperCell && m_MCsym ) {
84  larMCsym = *larMCsymHdl;
85  if ( larMCsym == nullptr ) {
86  ATH_MSG_ERROR( "Failed to retrieve LArMCSym object" );
87  return StatusCode::FAILURE;
88  }
89  }
90 
91  // Get pointers to inputs
92  // Retrieve validity ranges and determine their intersection
93  EventIDRange rangeAutoCorr;
94 
96  const ILArAutoCorr* larAutoCorr{*AutoCorrHdl};
97  if ( !AutoCorrHdl.range( rangeAutoCorr ) ) {
98  ATH_MSG_ERROR( "Failed to retrieve validity range for " << AutoCorrHdl.key() );
99  }
100 
101  std::vector<std::map<HWIdentifier, std::vector<float>>> terms( m_nGains );
102 
103  std::vector<HWIdentifier>::const_iterator it, it_e;
104  if ( !m_isSuperCell && m_MCsym ) {
105  it = larMCsym->symIds().begin();
106  it_e = larMCsym->symIds().end();
107  } else {
108  it = larOnlineID->channel_begin();
109  it_e = larOnlineID->channel_end();
110  }
111 
112  int count{0};
113 
114  for ( ; it != it_e; ++it ) {
115  count++;
116  const HWIdentifier id = *it;
117 
118  if ( larOnOffIdMapping->isOnlineConnected( id ) ) {
119  // the Shape is a function of gain
120  for ( unsigned int igain = 0; igain < m_nGains; igain++ ) {
121  const ILArAutoCorr::AutoCorrRef_t AC = larAutoCorr->autoCorr( id, igain );
122 
123  std::vector<float> vTerms;
124  const int size = m_nSampl * m_nSampl;
125  vTerms.resize( size );
126 
127  // compute sqrt to covariance matrix
128  for ( int j = 0; j < m_nSampl; j++ ) {
129  // a) diagonal terms
130  double ck = 0.;
131  for ( int k = 0; k <= j - 1; k++ ) {
132  int index = j * m_nSampl + k;
133  ck = ck + vTerms[index] * vTerms[index];
134  }
135  // diagonal term of autocorr matrix = 1
136  vTerms[j * m_nSampl + j] = sqrt( std::fabs( 1. - ck ) );
137  // b) off-diagonal terms
138  for ( int i = j + 1; i < m_nSampl; i++ ) {
139  double ck = 0;
140  for ( int k = 0; k <= j - 1; k++ ) {
141  int index1 = i * m_nSampl + k;
142  int index2 = j * m_nSampl + k;
143  ck = ck + vTerms[index1] * vTerms[index2];
144  }
145  int index = i * m_nSampl + j;
146  int index2 = j * m_nSampl + j;
147  unsigned int index3 = ( i - j ) - 1;
148  double AutoCorr = 0.;
149  if ( index3 < ( AC.size() ) ) AutoCorr = AC[index3];
150  vTerms[index] = ( AutoCorr - ck ) / vTerms[index2];
151  }
152  }
153 
154  terms[igain][id] = vTerms;
155 
156  } //(loop on gains)
157 
158  } else // unconnected
159  for ( unsigned int igain = 0; igain < m_nGains; igain++ ) {
160  terms[igain][id] = std::vector<float>( 1, 0. );
161  }
162  }
163 
164  ATH_MSG_INFO( "LArAutoCorrNoise: Ncell " << ( ( m_MCsym ) ? "w/ MCsym" : "w/o MCsym: " ) << count );
165  ATH_MSG_DEBUG( "LArAutoCorrNoise: end of loop over cells" );
166 
167  // Make output object
168  std::unique_ptr<LArAutoCorrNoise> larAutoCorrNoise =
169  std::make_unique<LArAutoCorrNoise>( std::move( terms ), larMCsym );
170 
171  // Write
172  ATH_CHECK( writeHandle.record( rangeAutoCorr, larAutoCorrNoise.release() ) );
173 
174  return StatusCode::SUCCESS;
175 }

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

◆ initialize()

StatusCode LArAutoCorrNoiseCondAlg::initialize ( )
overridevirtual

Definition at line 35 of file LArAutoCorrNoiseCondAlg.cxx.

36 {
37  ATH_MSG_DEBUG( "initialize " << name() );
38 
39  // ReadCondHandle initialization
43 
45 
46  // Number of gains
47  m_nGains = ( m_isSuperCell ) ? 1 : 3;
48 
49  return StatusCode::SUCCESS;
50 }

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

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

◆ 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_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_isSuperCell

bool LArAutoCorrNoiseCondAlg::m_isSuperCell
private

Definition at line 38 of file LArAutoCorrNoiseCondAlg.h.

◆ m_LArAutoCorrNoiseObjKey

SG::WriteCondHandleKey<LArAutoCorrNoise> LArAutoCorrNoiseCondAlg::m_LArAutoCorrNoiseObjKey
private

Definition at line 36 of file LArAutoCorrNoiseCondAlg.h.

◆ m_LArAutoCorrObjKey

SG::ReadCondHandleKey<ILArAutoCorr> LArAutoCorrNoiseCondAlg::m_LArAutoCorrObjKey
private

Definition at line 34 of file LArAutoCorrNoiseCondAlg.h.

◆ m_LArMCSymObjKey

SG::ReadCondHandleKey<LArMCSym> LArAutoCorrNoiseCondAlg::m_LArMCSymObjKey
private

Definition at line 32 of file LArAutoCorrNoiseCondAlg.h.

◆ m_LArOnOffIdMappingObjKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArAutoCorrNoiseCondAlg::m_LArOnOffIdMappingObjKey
private

Definition at line 31 of file LArAutoCorrNoiseCondAlg.h.

◆ m_MCsym

bool LArAutoCorrNoiseCondAlg::m_MCsym
private

Definition at line 39 of file LArAutoCorrNoiseCondAlg.h.

◆ m_nGains

unsigned int LArAutoCorrNoiseCondAlg::m_nGains = 0U
private

Definition at line 41 of file LArAutoCorrNoiseCondAlg.h.

◆ m_nSampl

int LArAutoCorrNoiseCondAlg::m_nSampl
private

Definition at line 42 of file LArAutoCorrNoiseCondAlg.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
LArAutoCorrNoiseCondAlg::m_LArMCSymObjKey
SG::ReadCondHandleKey< LArMCSym > m_LArMCSymObjKey
Definition: LArAutoCorrNoiseCondAlg.h:32
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
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArAutoCorrNoiseCondAlg::m_LArOnOffIdMappingObjKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_LArOnOffIdMappingObjKey
Definition: LArAutoCorrNoiseCondAlg.h:31
skel.it
it
Definition: skel.GENtoEVGEN.py:423
TRT_PAI_gasdata::AC
const float AC
Definition: TRT_PAI_gasdata.h:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArAutoCorrNoiseCondAlg::m_nSampl
int m_nSampl
Definition: LArAutoCorrNoiseCondAlg.h:42
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
HWIdentifier
Definition: HWIdentifier.h:13
LArOnlineID_Base::channel_end
id_iterator channel_end() const
Definition: LArOnlineID_Base.cxx:1931
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
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
ILArAutoCorr
This class defines the interface for accessing AutoCorrelation parameters for each channel @stereotyp...
Definition: ILArAutoCorr.h:29
MonDataType::AutoCorr
@ AutoCorr
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Trk::index3
@ index3
Definition: BoundarySurfaceFace.h:50
LArMCSym
Helper class to handle z-phi symmetry of calibration constants in MC.
Definition: LArMCSym.h:19
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
Trk::index1
@ index1
Definition: BoundarySurfaceFace.h:48
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:92
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
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
WriteCellNoiseToCool.igain
igain
Definition: WriteCellNoiseToCool.py:338
LArAutoCorrNoiseCondAlg::m_MCsym
bool m_MCsym
Definition: LArAutoCorrNoiseCondAlg.h:39
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
LArAutoCorrNoiseCondAlg::m_isSuperCell
bool m_isSuperCell
Definition: LArAutoCorrNoiseCondAlg.h:38
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArOnlineID
Definition: LArOnlineID.h:20
LArOnline_SuperCellID
Definition: LArOnline_SuperCellID.h:20
LArAutoCorrNoiseCondAlg::m_LArAutoCorrObjKey
SG::ReadCondHandleKey< ILArAutoCorr > m_LArAutoCorrObjKey
Definition: LArAutoCorrNoiseCondAlg.h:34
LArAutoCorrNoiseCondAlg::m_LArAutoCorrNoiseObjKey
SG::WriteCondHandleKey< LArAutoCorrNoise > m_LArAutoCorrNoiseObjKey
Definition: LArAutoCorrNoiseCondAlg.h:36
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
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
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LArMCSym::symIds
const std::vector< HWIdentifier > & symIds() const
Return the list of symmetric hashes.
Definition: LArMCSym.h:132
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
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
LArOnlineID_Base::channel_begin
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
Definition: LArOnlineID_Base.cxx:1926
LArOnOffIdMapping::isOnlineConnected
bool isOnlineConnected(const HWIdentifier &sid) const
Test whether a HWIdentifier is connected of not (inline)
Definition: LArOnOffIdMapping.h:121
fitman.k
k
Definition: fitman.py:528
LArVectorProxy
Proxy for accessing a range of float values like a vector.
Definition: LArVectorProxy.h:38
LArAutoCorrNoiseCondAlg::m_nGains
unsigned int m_nGains
Definition: LArAutoCorrNoiseCondAlg.h:41
ServiceHandle< ICondSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20