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

Athena algorithm used for testing LAr conditions data access. More...

#include <LArConditionsTestAlg.h>

Inheritance diagram for LArConditionsTestAlg:
Collaboration diagram for LArConditionsTestAlg:

Public Member Functions

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

StatusCode createCompareObjects ()
 
StatusCode testCondObjects ()
 
StatusCode testEachCondObject ATLAS_NOT_THREAD_SAFE (const LArRampMC *ramps)
 
StatusCode testChannelSet ()
 
StatusCode printCondObjects ()
 
StatusCode streamOutCondObjects ()
 
StatusCode registerCondObjects ()
 
StatusCode testFillIOVDb ()
 
StatusCode testDbObjectRead ()
 
StatusCode testDCS_Objects ()
 
void printTable (const GenericDbTable *t)
 
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

std::vector< LArRampPTmpm_rampCache
 
std::vector< LArRampPTmpm_rampCorrections
 
const LArOnlineIDm_onlineID
 
BooleanProperty m_testFill
 
BooleanProperty m_testCondObjs
 
BooleanProperty m_readCondObjs
 
BooleanProperty m_writeCondObjs
 
BooleanProperty m_writeCorrections
 
BooleanProperty m_applyCorrections
 
BooleanProperty m_testReadDB
 
BooleanProperty m_TB
 
int m_tbin
 
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

Athena algorithm used for testing LAr conditions data access.

Definition at line 40 of file LArConditionsTestAlg.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

◆ LArConditionsTestAlg()

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

Definition at line 32 of file LArConditionsTestAlg.cxx.

32  :
33  AthAlgorithm(name,pSvcLocator),
34  m_onlineID(0),
35  m_testFill(false),
36  m_testCondObjs(false),
37  m_readCondObjs(false),
38  m_writeCondObjs(false),
39  m_writeCorrections(false),
40  m_applyCorrections(false),
41  m_testReadDB(false),
42  m_TB(false),
43  m_tbin(0)
44 {
45  // switch for testing Filling IOV.
46  declareProperty("TestCondObjs", m_testCondObjs);
47  declareProperty("ReadCondObjs", m_readCondObjs);
48  declareProperty("WriteCondObjs", m_writeCondObjs);
49  declareProperty("WriteCorrections", m_writeCorrections);
50  declareProperty("ApplyCorrections", m_applyCorrections);
51  declareProperty("TestFill", m_testFill);
52  declareProperty("TestReadDBDirect", m_testReadDB) ;
53  declareProperty("Testbeam", m_TB) ;
54  declareProperty("Tbin", m_tbin) ;
55 }

◆ ~LArConditionsTestAlg()

LArConditionsTestAlg::~LArConditionsTestAlg ( )
virtual

Definition at line 61 of file LArConditionsTestAlg.cxx.

62 { }

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode testEachCondObject LArConditionsTestAlg::ATLAS_NOT_THREAD_SAFE ( const LArRampMC ramps)
private

◆ createCompareObjects()

StatusCode LArConditionsTestAlg::createCompareObjects ( )
private

Definition at line 162 of file LArConditionsTestAlg.cxx.

163 {
164  // StatusCode sc;
165  ATH_MSG_INFO ("in createCompareObjects()" );
166 
167  // Create set of ids, LArRampComplete::LArCondObj
168 
169  std::vector<HWIdentifier>::const_iterator chanIt = m_onlineID->channel_begin();
170  std::vector<HWIdentifier>::const_iterator chanEnd = m_onlineID->channel_end();
171  int ichan = -1;
172  int icorr = 0;
173  float vramp = 0;
174  int gain = 0;
175  for (; chanIt != chanEnd; ++chanIt, ++ichan) {
176  // add channels with downscale factor
177  if (ichan % 1000 != 5) continue;
178 
179  // Create ramp with 3 vRamp elements
180  LArRampPTmp ramp((*chanIt), gain);
181  ramp.m_vRamp.push_back(vramp);
182  vramp += 1.0;
183  ramp.m_vRamp.push_back(vramp);
184  vramp += 1.0;
185  ramp.m_vRamp.push_back(vramp);
186  vramp += 1.0;
187  // add to cache
188  m_rampCache.push_back(ramp);
189 
190  // Change gain each time
191  gain = (gain == 2) ? 0 : gain + 1;
192 
194  // Create downscaled corrections
195  ++icorr;
196  if (icorr % 10 != 5) continue;
197  // Just change sign of ramp values
198  for (unsigned int i = 0; i < 3; ++i)ramp.m_vRamp[i] = -ramp.m_vRamp[i];
199  m_rampCorrections.push_back(ramp);
200  }
201  }
202 
203  // Print out cache and corrections
204  for (unsigned int i = 0; i < m_rampCache.size(); ++i) {
205  ATH_MSG_DEBUG ("Cache: chan, gain, ramps "
206  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) << " "
207  << m_rampCache[i].m_gain << " "
208  << m_rampCache[i].m_vRamp[0] << " "
209  << m_rampCache[i].m_vRamp[1] << " "
210  << m_rampCache[i].m_vRamp[2] << " " );
211  }
212  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
213  ATH_MSG_DEBUG ("Corrections: chan, gain, ramps "
214  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
215  << m_rampCorrections[i].m_gain << " "
216  << m_rampCorrections[i].m_vRamp[0] << " "
217  << m_rampCorrections[i].m_vRamp[1] << " "
218  << m_rampCorrections[i].m_vRamp[2] << " " );
219  }
220 
221  ATH_MSG_DEBUG ( "End of create comparison objects " );
222  return StatusCode::SUCCESS;
223 }

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

Definition at line 96 of file LArConditionsTestAlg.cxx.

97 {
98  ATH_MSG_DEBUG ( " retrieve DataHandle<ILArRamp> in execute " );
99 
100  if(m_testCondObjs){
101 
102  // create cache
104 // StatusCode sc = testDbObjectRead();
105 // if(sc.isFailure()) {
106 // log << MSG::ERROR << "Failed testDbObjectRead " << endmsg;
107 // return StatusCode::FAILURE;
108 // }
109 
110  }
111 
112 
113 // if(m_testCondObject){
114 // std::string key = "LArRamp";
115 // const ILArRamp* ramp = 0 ;
116 // detStore()->retrieve(ramp, key);
117 // if(!ramp) {
118 // log<< MSG::ERROR<<" Failed to get LArRamp in execute " << endmsg;
119 // return StatusCode::FAILURE ;
120 // }
121 // }
122 
123  if(m_TB){
124  const ILArOFC* ofc = nullptr;
125  ATH_CHECK( detStore()->retrieve(ofc, "LArOFC") );
126 
127  const ILArRamp* ramp = nullptr;
128  ATH_CHECK( detStore()->retrieve(ramp, "LArRamp") );
129  }
130 
131 /*
132  log << MSG::DEBUG << " retrieve DataHandle<ExampleData> in execute " <<endmsg;
133  const ExampleData* example = 0 ;
134  detStore()->retrieve( example );
135  if(!example) {
136  log<< MSG::ERROR<<" Failed to get ExampleData in execute " << endmsg;
137  }
138 */
139 
140 
141  return StatusCode::SUCCESS;
142 }

◆ 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 LArConditionsTestAlg::finalize ( )
overridevirtual

Definition at line 151 of file LArConditionsTestAlg.cxx.

152 {
155  return StatusCode::SUCCESS;
156 }

◆ initialize()

StatusCode LArConditionsTestAlg::initialize ( )
overridevirtual

Definition at line 68 of file LArConditionsTestAlg.cxx.

69 {
70  ATH_MSG_DEBUG ( " TestCondObjs flag = " << m_testCondObjs );
71  ATH_MSG_DEBUG ( " ReadCondObjs flag = " << m_readCondObjs );
72  ATH_MSG_DEBUG ( " WriteCondObjs flag = " << m_writeCondObjs );
73  ATH_MSG_DEBUG ( " WriteCorrections flag = " << m_writeCorrections );
74  ATH_MSG_DEBUG ( " ApplyCorrections flag = " << m_applyCorrections );
75  ATH_MSG_DEBUG ( " TestFill flag = " << m_testFill );
76  ATH_MSG_DEBUG ( " TestReadDBDirect flag = " << m_testReadDB );
77  ATH_MSG_DEBUG ( " Testbeam flag = " << m_TB );
78 
80 
81  // Need to load authentication for RDBMS
82  // log << MSG::INFO << "Loading XMLAuthenticationService " << endmsg;
83  // pool::POOLContext::loadComponent( "POOL/Services/XMLAuthenticationService" );
84 
85  const CaloCell_ID* calocell_id = nullptr;
86  ATH_CHECK( detStore()->retrieve(calocell_id) );
87 
88  ATH_MSG_DEBUG ( "initialize done" );
89  return StatusCode::SUCCESS;
90 }

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

◆ printCondObjects()

StatusCode LArConditionsTestAlg::printCondObjects ( )
private

Definition at line 1170 of file LArConditionsTestAlg.cxx.

1171 {
1172  ATH_MSG_INFO ("in printCondObjects()" );
1173  return StatusCode::SUCCESS;
1174 }

◆ printTable()

void LArConditionsTestAlg::printTable ( const GenericDbTable t)
private

◆ registerCondObjects()

StatusCode LArConditionsTestAlg::registerCondObjects ( )
private

Definition at line 1188 of file LArConditionsTestAlg.cxx.

1189 {
1190  ATH_MSG_INFO ("in registerCondObjects()" );
1191  return StatusCode::SUCCESS;
1192 }

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

◆ streamOutCondObjects()

StatusCode LArConditionsTestAlg::streamOutCondObjects ( )
private

Definition at line 1179 of file LArConditionsTestAlg.cxx.

1180 {
1181  ATH_MSG_INFO ("in streamOutCondObjects()" );
1182  return StatusCode::SUCCESS;
1183 }

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

◆ testCallBack1()

StatusCode LArConditionsTestAlg::testCallBack1 ( IOVSVC_CALLBACK_ARGS  )

Definition at line 1197 of file LArConditionsTestAlg.cxx.

1198 {
1199 
1200  ATH_MSG_DEBUG ( " testing Call back function1 " );
1201  ATH_MSG_DEBUG(" int = " << i );
1202  ATH_MSG_DEBUG(" list<string> size = " << l.size() );
1203 
1204 // if(m_testCondObject){
1205 // const ILArRamp* ramp = m_ramp;
1206 // log<< MSG::DEBUG<<" Pointer to Ramp = " << ramp <<endmsg;
1207 // }
1208 
1209  return StatusCode::SUCCESS;
1210 }

◆ testCallBack2()

StatusCode LArConditionsTestAlg::testCallBack2 ( IOVSVC_CALLBACK_ARGS  )

Definition at line 1213 of file LArConditionsTestAlg.cxx.

1214 {
1215  ATH_MSG_DEBUG ( " testing Call back function2 " );
1216  ATH_MSG_DEBUG(" int = " << i );
1217  ATH_MSG_DEBUG(" list<string> size = " << l.size() );
1218  return StatusCode::SUCCESS;
1219 }

◆ testChannelSet()

StatusCode LArConditionsTestAlg::testChannelSet ( )
private

Definition at line 1070 of file LArConditionsTestAlg.cxx.

1071 {
1072 
1074  typedef ChanSet::ConstChannelIt ConstChannelIt;
1075 
1076  ATH_MSG_INFO ("in testChannelSet" );
1077 
1078  ChanSet chanSet;
1079 
1080  // corrections not always available:
1082  // add corrections to channel set
1083  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
1084  // Must copy LArRampPTmp into a LArRampComplete::LArCondObj
1086  ramp.m_vRamp = m_rampCorrections[i].m_vRamp;
1087  chanSet.insert(m_rampCorrections[i].m_channelID.get_identifier32().get_compact(), ramp);
1088  }
1089  // Now loop over corrections and check that they agree
1090  bool error = false;
1091  if (m_rampCorrections.size() != chanSet.size()) {
1092  ATH_MSG_ERROR ("Corrections not the same size as channel set: "
1093  << m_rampCorrections.size() << " " << chanSet.size() );
1094  return (StatusCode::FAILURE);
1095  }
1096  else {
1097  ATH_MSG_DEBUG ("Sizes OK: " << chanSet.size() );
1098  }
1099 
1100  ConstChannelIt it = chanSet.begin();
1101  ConstChannelIt itEnd = chanSet.end();
1102 
1103 
1104  unsigned int i = 0;
1105  for (; it != itEnd; ++it, ++i) {
1106 
1107  HWIdentifier id = m_rampCorrections[i].m_channelID;
1108  HWIdentifier id1((*it).first);
1109  LArRampComplete::LArCondObj rampP = (*it).second;
1110  if (id != id1 || rampP != m_rampCorrections[i]) {
1111  ATH_MSG_ERROR ("Correction retrieved with iterator does not match: "
1112  << " i = " << i );
1113  error = true;
1114  }
1115  ATH_MSG_DEBUG ("New : chan id, gain, ramps "
1116  << m_onlineID->show_to_string(id1) << " "
1117  << m_rampCorrections[i].m_gain << " "
1118  << rampP.m_vRamp[0] << " "
1119  << rampP.m_vRamp[1] << " "
1120  << rampP.m_vRamp[2] << " "
1121  );
1122  ATH_MSG_DEBUG ("Corrections: chan id, gain, ramps "
1123  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
1124  << m_rampCorrections[i].m_gain << " "
1125  << m_rampCorrections[i].m_vRamp[0] << " "
1126  << m_rampCorrections[i].m_vRamp[1] << " "
1127  << m_rampCorrections[i].m_vRamp[2] << " "
1128  << " Compare = " << (rampP == m_rampCorrections[i])
1129  );
1130  }
1131  if (!error) {
1132  ATH_MSG_DEBUG ("Iteration check OK " );
1133  }
1134 
1135  i = 0;
1136  for (; i < m_rampCorrections.size(); ++i) {
1137 
1138  unsigned int id = m_rampCorrections[i].m_channelID.get_identifier32().get_compact();
1139  it = chanSet.find(id);
1140  if (it == itEnd) {
1141  ATH_MSG_ERROR ("Could not find correction: "
1142  << " i = " << i );
1143  error = true;
1144  ATH_MSG_DEBUG ("Corrections: cool chan, chan id, gain, ramps "
1145  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
1146  << m_rampCorrections[i].m_gain << " "
1147  << m_rampCorrections[i].m_vRamp[0] << " "
1148  << m_rampCorrections[i].m_vRamp[1] << " "
1149  << m_rampCorrections[i].m_vRamp[2] << " "
1150  );
1151  }
1152  }
1153  if (!error) {
1154  ATH_MSG_DEBUG ("Find check OK " );
1155  }
1156 
1157  if (error) {
1158  ATH_MSG_ERROR ("Failing check of channel set - see above" );
1159  return (StatusCode::FAILURE);
1160  }
1161  }
1162 
1163  return StatusCode::SUCCESS;
1164 
1165 }

◆ testCondObjects()

StatusCode LArConditionsTestAlg::testCondObjects ( )
private

Statistics: total number of conditions

Statistics: total number of conditions

Statistics: total number of conditions

Definition at line 261 of file LArConditionsTestAlg.cxx.

262 {
263  ATH_MSG_INFO ("in testCondObjects()" );
264 
265  static std::atomic<bool> first = true;
266  if (!first) {
267  ATH_MSG_INFO ("Multiple entries - returning" );
268  return StatusCode::SUCCESS;
269  }
270  first = false;
271 
272  typedef LArRampMC::CONTAINER CONTAINER;
273  typedef CONTAINER::chan_const_iterator chan_const_iterator;
274  typedef CONTAINER::iov_const_iterator iov_const_iterator;
275 
278 
279  const LArRampMC* ramps = 0;
280 
281  // Create SingleGroup
282  if (m_readCondObjs) {
283  const ILArRamp* iramps = 0;
284  ATH_CHECK( detStore()->retrieve(iramps, "/LArCalorimeter/LArTests/LArRampsSingleGroup") );
285  ATH_MSG_INFO ( "Retrieved ramps for LArRampsSingleGroup " );
286  ramps = dynamic_cast<const LArRampMC*>(iramps);
287  if (!ramps) {
288  ATH_MSG_ERROR ("Could not dynamic cast ILArRamp to LArRampMC" );
289  return( StatusCode::FAILURE);
290  }
291  }
292  else {
293  LArRampMC* ramps_rw = new LArRampMC;
294  ramps = ramps_rw;
295  ATH_MSG_INFO ( "Created ramps for LArRampsSingleGroup " );
296  ramps_rw->setGroupingType(LArConditionsContainerBase::SingleGroup);
297  ATH_CHECK( ramps_rw->initialize() );
298  }
299 
300  ATH_CHECK( testEachCondObject(ramps) );
301  ATH_MSG_INFO ( "Succeeded SingleGroup test " );
302 
303  if (!m_readCondObjs) {
304  // Save in DetectorStore
305  ATH_CHECK( detStore()->record(ramps, "/LArCalorimeter/LArTests/LArRampsSingleGroup") );
306  const ILArRamp* iramps = 0;
307  ATH_CHECK( detStore()->symLink(ramps, iramps) );
308 
310  if (ramps) {
311  ATH_MSG_DEBUG ( "Total number of conditions objects"
312  << ramps->totalNumberOfConditions() );
313  }
314  if (!m_writeCondObjs) {
315  // Remove conditions objects if not writing out
316  LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
317  if (!ramps_rw) {
318  ATH_MSG_ERROR ( "Could not const cast to LArRampMC " );
319  return StatusCode::FAILURE;
320  }
321  ramps_rw->removeConditions();
322  ATH_MSG_DEBUG ( "Removed conditions objects" );
323  }
324  ATH_MSG_DEBUG ( "Total number of conditions objects "
325  << ramps->totalNumberOfConditions() );
326  ATH_MSG_DEBUG ( "Total number of correction objects"
327  << ramps->totalNumberOfCorrections() );
328  }
329 
330  // Create SubDetectorGrouping
331  if (m_readCondObjs) {
332  const ILArRamp* iramps = 0;
333  ATH_CHECK( detStore()->retrieve(iramps, "/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping") );
334  ATH_MSG_INFO ( "Retrieved ramps for LArRampsSubDetectorGrouping " );
335  ramps = dynamic_cast<const LArRampMC*>(iramps);
336  if (!ramps) {
337  ATH_MSG_ERROR ("Could not dynamic cast ILArRamp to LArRampMC" );
338  return( StatusCode::FAILURE);
339  }
340  }
341  else {
342  LArRampMC* ramps_rw = new LArRampMC;
343  ramps = ramps_rw;
344  //ramps_rw->setGroupingType(LArConditionsContainerBase::SubDetectorGrouping);
345  ATH_CHECK( ramps_rw->initialize() );
346  }
347 
348  ATH_CHECK( testEachCondObject(ramps) );
349  ATH_MSG_INFO ( "Succeeded SubDetectorGrouping test " );
350 
351  if (!m_readCondObjs) {
352  // Save in DetectorStore
353  ATH_CHECK( detStore()->record(ramps, "/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping") );
354  const ILArRamp* iramps = 0;
355  ATH_CHECK( detStore()->symLink(ramps, iramps) );
357  if (ramps) {
358  ATH_MSG_DEBUG ( "Total number of conditions objects"
359  << ramps->totalNumberOfConditions() );
360  }
361  if (!m_writeCondObjs) {
362  // Remove conditions objects if not writing out
363  LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
364  if (!ramps_rw) {
365  ATH_MSG_ERROR ( "Could not const cast to LArRampMC " );
366  return StatusCode::FAILURE;
367  }
368  ramps_rw->removeConditions();
369  ATH_MSG_DEBUG ( "Removed conditions objects" );
370  }
371  ATH_MSG_DEBUG ( "Total number of conditions objects "
372  << ramps->totalNumberOfConditions() );
373  ATH_MSG_DEBUG ( "Total number of correction objects"
374  << ramps->totalNumberOfConditions() );
375  }
376 
377  // Create FeedThroughGrouping
378  if (m_readCondObjs) {
379  const ILArRamp* iramps = 0;
380  ATH_CHECK( detStore()->retrieve(iramps, "/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping") );
381  ATH_MSG_INFO ( "Retrieved ramps for LArRampsFeedThroughGrouping " );
382  ramps = dynamic_cast<const LArRampMC*>(iramps);
383  if (!ramps) {
384  ATH_MSG_ERROR ("Could not dynamic cast ILArRamp to LArRampMC" );
385  return( StatusCode::FAILURE);
386  }
387  }
388  else {
389  LArRampMC* ramps_rw = new LArRampMC;
390  ramps = ramps_rw;
391  ramps_rw->setGroupingType(LArConditionsContainerBase::FeedThroughGrouping);
392  ATH_CHECK( ramps_rw->initialize() );
393  }
394 
395  ATH_CHECK( testEachCondObject(ramps) );
396  ATH_MSG_INFO ( "Succeeded FeedThroughGrouping test " );
397 
398  if (!m_readCondObjs) {
399  // Save in DetectorStore
400  ATH_CHECK( detStore()->record(ramps, "/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping") );
401  const ILArRamp* iramps = 0;
402  ATH_CHECK( detStore()->symLink(ramps, iramps) );
404  if (ramps) {
405  ATH_MSG_DEBUG ( "Total number of conditions objects"
406  << ramps->totalNumberOfConditions() );
407  }
408  if (!m_writeCondObjs) {
409  // Remove conditions objects if not writing out
410  LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
411  if (!ramps_rw) {
412  ATH_MSG_ERROR ( "Could not const cast to LArRampMC " );
413  return StatusCode::FAILURE;
414  }
415  ramps_rw->removeConditions();
416  ATH_MSG_DEBUG ( "Removed conditions objects" );
417  }
418  ATH_MSG_DEBUG ( "Total number of conditions objects "
419  << ramps->totalNumberOfConditions() );
420  ATH_MSG_DEBUG ( "Total number of correction objects"
421  << ramps->totalNumberOfCorrections() );
422  }
423 
424  ATH_MSG_DEBUG ( "Statistics for LArRampsFeedThroughGrouping " );
425  ATH_MSG_DEBUG ( "Number of channels, iovs "
426  << ramps->chan_size() << " " << ramps->iov_size() );
427 
428  iov_const_iterator iovIt = ramps->iov_begin();
429  iov_const_iterator iovEnd = ramps->iov_end ();
430  msg() << MSG::DEBUG << "IOVs found: ";
431  for (; iovIt != iovEnd; ++iovIt) {
432  msg() << MSG::DEBUG << (*iovIt) << ", ";
433  }
434  msg() << MSG::DEBUG << endmsg;
435 
436  chan_const_iterator chIt = ramps->chan_begin();
437  chan_const_iterator chEnd = ramps->chan_end ();
438  for (; chIt != chEnd; ++chIt) {
439  ATH_MSG_DEBUG ( "Channel: " << (*chIt)
440  << " number of conditions: " << ramps->conditionsPerChannel((*chIt)) );
441  }
442 
443  for (unsigned int i = 0; i < ramps->nGroups(); ++i) {
444  ATH_MSG_DEBUG ( "Group: " << i
445  << " number of conditions: " << ramps->conditionsPerGroup(i) );
446  }
447  ATH_MSG_DEBUG ("");
448 
449  for (unsigned int i = 0; i < ramps->nGains(); ++i) {
450  ATH_MSG_DEBUG ( "Gain: " << i
451  << " number of conditions: " << ramps->conditionsPerGain(i) );
452  }
453  ATH_MSG_DEBUG ( "Total number of conditions objects "
454  << ramps->totalNumberOfConditions() );
455  ATH_MSG_DEBUG ( "Total number of correction objects "
456  << ramps->totalNumberOfCorrections() );
457 
458 
459  ATH_MSG_DEBUG ( "End of testCondObjects " );
460 
461  return StatusCode::SUCCESS;
462 }

◆ testDbObjectRead()

StatusCode LArConditionsTestAlg::testDbObjectRead ( )
private

Definition at line 1278 of file LArConditionsTestAlg.cxx.

1279 {
1280 
1281  typedef LArRampMC::CONTAINER CONTAINER;
1282  typedef CONTAINER::Subset Subset;
1283 
1284  const LArRampMC* ramp = 0 ;
1285  ATH_CHECK( detStore()->retrieve(ramp, "LArRamp") );
1286 
1287  ATH_MSG_DEBUG ( " Found LArRampMC, key LArRamp." );
1288 
1289  // Print out channels
1290  ATH_MSG_DEBUG ( " Number of channels " << ramp->chan_size() );
1291 
1292  // Print out first 10 elements of each gain for subset
1293  CONTAINER::chan_const_iterator chanIt = ramp->chan_begin();
1294  CONTAINER::chan_const_iterator endChan = ramp->chan_end ();
1295  for (unsigned int i = 0; chanIt != endChan; ++chanIt, ++i) {
1296  unsigned int coolChan = *chanIt;
1297  const Subset* subset = ramp->at(i);
1298 
1299  ATH_MSG_DEBUG ( " Channel " << coolChan << " "
1300  << " Subset size " << subset->subsetSize()
1301  << " gain, channel, grouping type " << subset->gain() << " "
1302  << MSG::hex << subset->channel() << " " << MSG::dec
1303  << subset->groupingType() << " "
1304  );
1305 
1306  Subset::ConstSubsetIt first = subset->subsetBegin();
1307  Subset::ConstSubsetIt last = subset->subsetEnd();
1308  //for (int i = 0; i < 10 && first != last; ++i, ++first) {
1309  for (; first != last; ++first) {
1310 
1311  // select non-zero subsets
1312  if ((*first).second.size()) {
1313 
1314  ATH_MSG_DEBUG ( " FEB id "
1315  << m_onlineID->show_to_string(HWIdentifier((*first).first)) << " "
1316  );
1317  for (unsigned int k = 0; k < 5; ++k) {
1318  msg() << MSG::DEBUG << " vramp " ;
1319 // << m_onlineID->show_to_string((*first).second[k].m_channelID) << " "
1320 // << (*first).second[k].m_gain << " ";
1321  for (unsigned int j = 0; j < (*first).second[k].m_vRamp.size(); ++j) {
1322  msg() << MSG::DEBUG << (*first).second[k].m_vRamp[j] << " ";
1323  }
1324  msg() << MSG::DEBUG << endmsg;
1325  }
1326 
1327  }
1328 
1329  }
1330  }
1331 
1332 
1333  /*
1334 
1335  // Print out first 10 elements of each gain for corrections
1336  for (unsigned int gain = 0; gain < 3; ++gain) {
1337  log << MSG::DEBUG << " Gain, size "
1338  << gain << " "
1339  << ramp->correctionsSize(gain) << endmsg;
1340  CONTAINER::ConstCorrectionIt first = ramp->correctionsBegin(gain);
1341  CONTAINER::ConstCorrectionIt last = ramp->correctionsEnd(gain);
1342  for (int i = 0; i < 10 && first != last; ++i, ++first) {
1343  log << MSG::DEBUG << " id, vramp "
1344  << m_onlineID->show_to_string(HWIdentifier((*first).first)) << " ";
1345 // << m_onlineID->show_to_string((*first).second.m_channelID) << " "
1346 // << (*first).second.m_gain << " ";
1347  for (unsigned int j = 0; j < (*first).second.m_vRamp.size(); ++j) {
1348  log << MSG::DEBUG << (*first).second.m_vRamp[j] << " ";
1349  }
1350  log << MSG::DEBUG << endmsg;
1351  }
1352  }
1353 
1354  */
1355 
1356  return StatusCode::SUCCESS;
1357 
1358 }

◆ testDCS_Objects()

StatusCode LArConditionsTestAlg::testDCS_Objects ( )
private

Definition at line 1361 of file LArConditionsTestAlg.cxx.

1362 {
1363 
1364 // StatusCode sc;
1365 // MsgStream log(msgSvc(), name());
1366 // log << MSG::INFO <<"in testDCS_Objects()" <<endmsg;
1367 
1368 // log << MSG::DEBUG << "RETRIEVING ALL CONDDBMYSQLOBJECT" << endmsg;
1369 
1370 // const DataHandle<GenericDbTable> dh_b, dh_e;
1371 
1372 // sc = detStore()->retrieve(dh_b, dh_e);
1373 // if (sc.isFailure()) {
1374 // log << MSG::WARNING <<"Could not find GenericDbTable DetectorStore" <<endmsg;
1375 // return( StatusCode::SUCCESS);
1376 // }
1377 
1378 // for(; dh_b!=dh_e;++dh_b) {
1379 // const GenericDbTable* obj1 = dh_b;
1380 
1381 // //lets dump the object contents
1382 // int ncolumns = obj1->getNumColumns();
1383 // int nrows = obj1->getNumRows();
1384 
1385 // log << MSG::INFO << " Object " << dh_b.ID() << " has "
1386 // << obj1->getNumColumns() << " parameters and "
1387 // << obj1->getNumRows() << " objects" << endmsg;
1388 
1389 // std::vector<std::string> dNames;
1390 // std::vector<GenericDbTable::dataTypes> dTypes;
1391 
1392 // obj1->getNames(dNames);
1393 // obj1->getTypes(dTypes);
1394 
1395 // if (!(dNames.size()))
1396 // {
1397 // log << MSG::FATAL << "Esta tabela nao tem nada (This Table hasnothing =)" << endmsg;
1398 // }
1399 
1400 // log << MSG::INFO << "X" << dNames.size() <<"X The parameters name/types are: |";
1401 // for (unsigned int i=0; i< dNames.size(); i++) {
1402 // log << dNames[i] << " / ";
1403 // log << dTypes[i] << " | ";
1404 // log << endmsg;
1405 // }
1406 // printTable(obj1);
1407 
1408 // }
1409 
1410  return StatusCode::SUCCESS;
1411 }

◆ testFillIOVDb()

StatusCode LArConditionsTestAlg::testFillIOVDb ( )
private

Definition at line 1221 of file LArConditionsTestAlg.cxx.

1222 {
1223  IToolSvc* toolSvc = nullptr;
1224  ATH_CHECK( service("ToolSvc", toolSvc) );
1225 
1226 // IFillNovaIOVTool* fill;
1227 // if(StatusCode::SUCCESS != toolSvc->retrieveTool("FillNovaIOVTool",fill ))
1228 // {
1229 // log << MSG::ERROR << " Can't get FillNovaIOVTool " << endmsg;
1230 // return StatusCode::FAILURE;
1231 // }
1232 
1233 // // Make a new ExampleData object
1234 // ExampleData v;
1235 
1236 // // prepare some fake data.
1237 // int n = 3 ;
1238 // for( int i = 0; i<n; ++i ) {
1239 // ExampleData_t p ;
1240 // p.chan_id = i;
1241 // p.fArray[0] = i*100+0;
1242 // p.fArray[1] = i*100+1;
1243 // p.fArray[2] = i*100+2;
1244 // p.fArray[3] = i*100+3;
1245 // p.fArray[4] = i*100+4;
1246 // p.i = i;
1247 // p.d = i;
1248 // v.push_back(p);
1249 // }
1250 
1251 // typedef ExampleData::const_iterator IT;
1252 // IT it = v.begin();
1253 // void* vArray = (void*) &(*it);
1254 
1255 // typedef ExampleData::value_type STRUCT ;
1256 // std::string typenm = System::typeinfoName(typeid(STRUCT)) ;
1257 // std::string folder = "/lar/test/ExampleData1/ExampleDataName";
1258 // int nrow = v.size();
1259 
1260 // log<< MSG::DEBUG <<" writing " << typenm <<" through FillNovaIOVTool " <<endmsg;
1261 // log<< MSG::DEBUG <<" to folder " << folder <<endmsg;
1262 // log<< MSG::DEBUG <<" number of rows " << nrow <<endmsg;
1263 
1264  // Fill object to Nova_IOV, using validity specified in the tool.
1265 // StatusCode sc= fill->fillNovaIOV(vArray, folder,typenm,nrow) ;
1266 // if(!sc.isSuccess()) return sc ;
1267 
1268 // // put the same reference in a different folder.
1269 // std::string folder2 = "/lar/test/ExampleData2/ExampleDataName";
1270 // return fill->fillLastIOV(folder2);
1271 
1272  return StatusCode::SUCCESS;
1273 }

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

BooleanProperty LArConditionsTestAlg::m_applyCorrections
private

Definition at line 81 of file LArConditionsTestAlg.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_onlineID

const LArOnlineID* LArConditionsTestAlg::m_onlineID
private

Definition at line 75 of file LArConditionsTestAlg.h.

◆ m_rampCache

std::vector<LArRampPTmp> LArConditionsTestAlg::m_rampCache
private

Definition at line 72 of file LArConditionsTestAlg.h.

◆ m_rampCorrections

std::vector<LArRampPTmp> LArConditionsTestAlg::m_rampCorrections
private

Definition at line 73 of file LArConditionsTestAlg.h.

◆ m_readCondObjs

BooleanProperty LArConditionsTestAlg::m_readCondObjs
private

Definition at line 78 of file LArConditionsTestAlg.h.

◆ m_TB

BooleanProperty LArConditionsTestAlg::m_TB
private

Definition at line 83 of file LArConditionsTestAlg.h.

◆ m_tbin

int LArConditionsTestAlg::m_tbin
private

Definition at line 84 of file LArConditionsTestAlg.h.

◆ m_testCondObjs

BooleanProperty LArConditionsTestAlg::m_testCondObjs
private

Definition at line 77 of file LArConditionsTestAlg.h.

◆ m_testFill

BooleanProperty LArConditionsTestAlg::m_testFill
private

Definition at line 76 of file LArConditionsTestAlg.h.

◆ m_testReadDB

BooleanProperty LArConditionsTestAlg::m_testReadDB
private

Definition at line 82 of file LArConditionsTestAlg.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.

◆ m_writeCondObjs

BooleanProperty LArConditionsTestAlg::m_writeCondObjs
private

Definition at line 79 of file LArConditionsTestAlg.h.

◆ m_writeCorrections

BooleanProperty LArConditionsTestAlg::m_writeCorrections
private

Definition at line 80 of file LArConditionsTestAlg.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArConditionsTestAlg::m_tbin
int m_tbin
Definition: LArConditionsTestAlg.h:84
LArConditionsContainer::removeConditions
void removeConditions()
Remove conditions leaving the corrections - may be needed to only write out the corrections when both...
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LArConditionsContainer::iov_end
iov_const_iterator iov_end() const
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArConditionsContainerBase::SingleGroup
@ SingleGroup
Definition: LArConditionsContainerBase.h:46
LArConditionsTestAlg::m_rampCache
std::vector< LArRampPTmp > m_rampCache
Definition: LArConditionsTestAlg.h:72
LArRampMC
Implementation of the interface ILArRamp for MC Derives from LArRampComplete, and implements the phi-...
Definition: LArRampMC.h:22
LArConditionsTestAlg::m_TB
BooleanProperty m_TB
Definition: LArConditionsTestAlg.h:83
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArConditionsTestAlg::m_writeCorrections
BooleanProperty m_writeCorrections
Definition: LArConditionsTestAlg.h:80
LArConditionsContainer::chan_begin
chan_const_iterator chan_begin() const
Access to Channel numbers via iterators - from MultChanCollection.
LArConditionsTestAlg::testChannelSet
StatusCode testChannelSet()
Definition: LArConditionsTestAlg.cxx:1070
LArRampP1
Persistent data for LArRamp Copied from LAr.
Definition: LArRampP1.h:24
LArConditionsTestAlg::m_testReadDB
BooleanProperty m_testReadDB
Definition: LArConditionsTestAlg.h:82
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
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
LArConditionsContainer::iov_begin
iov_const_iterator iov_begin() const
Access to IOVs via iterators - from MultChanCollection.
LArConditionsContainer::conditionsPerGain
unsigned int conditionsPerGain(unsigned int gain) const
Statistics: number of conditions per gain.
LArConditionsContainer::nGains
unsigned int nGains() const
Number of gain values.
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
LArRampP1::m_vRamp
std::vector< float > m_vRamp
Definition: LArRampP1.h:30
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
LArConditionsContainer< LArRampP1 >
LArConditionsTestAlg::m_rampCorrections
std::vector< LArRampPTmp > m_rampCorrections
Definition: LArConditionsTestAlg.h:73
LArConditionsTestAlg::m_readCondObjs
BooleanProperty m_readCondObjs
Definition: LArConditionsTestAlg.h:78
LArRampMC::initialize
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.
Definition: LArRampMC.cxx:10
LArConditionsContainer::totalNumberOfConditions
unsigned int totalNumberOfConditions() const
Statistics: total number of conditions.
LArConditionsTestAlg::m_testFill
BooleanProperty m_testFill
Definition: LArConditionsTestAlg.h:76
LArConditionsTestAlg::createCompareObjects
StatusCode createCompareObjects()
Definition: LArConditionsTestAlg.cxx:162
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.
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArConditionsTestAlg::testFillIOVDb
StatusCode testFillIOVDb()
Definition: LArConditionsTestAlg.cxx:1221
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
ILArRamp
Definition: ILArRamp.h:12
LArConditionsTestAlg::m_applyCorrections
BooleanProperty m_applyCorrections
Definition: LArConditionsTestAlg.h:81
LArConditionsContainer::iov_size
iov_size_type iov_size() const
number of IOVs - from MultChanCollection
LArConditionsChannelSet
template class for use for I/O of conditions data correction sets
Definition: LArConditionsChannelSet.h:37
LArConditionsContainer::conditionsPerGroup
unsigned int conditionsPerGroup(unsigned int group) const
Statistics: number of conditions per group.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LArConditionsContainer::chan_end
chan_const_iterator chan_end() const
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
ILArOFC
Definition: ILArOFC.h:14
LArConditionsContainer::totalNumberOfCorrections
unsigned int totalNumberOfCorrections() const
Statistics: total number of corrections.
LArConditionsContainer::chan_size
chan_size_type chan_size() const
number of channels - from MultChanCollection
LArConditionsContainer::nGroups
unsigned int nGroups() const
Number of groups - minimum is 2 (1 correction group, 1 FEB ID group)
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
LArRampPTmp
Persistent data for LArRamp Copied from LAr.
Definition: LArRampPTmp.h:24
defineDB.ichan
int ichan
Definition: JetTagCalibration/share/defineDB.py:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArConditionsTestAlg::m_onlineID
const LArOnlineID * m_onlineID
Definition: LArConditionsTestAlg.h:75
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArConditionsContainer::conditionsPerChannel
unsigned int conditionsPerChannel(unsigned int coolChannel) const
Statistics: number of conditions per COOL channel.
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
LArConditionsTestAlg::m_writeCondObjs
BooleanProperty m_writeCondObjs
Definition: LArConditionsTestAlg.h:79
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
LArConditionsTestAlg::testCondObjects
StatusCode testCondObjects()
Definition: LArConditionsTestAlg.cxx:261
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LArConditionsTestAlg::m_testCondObjs
BooleanProperty m_testCondObjs
Definition: LArConditionsTestAlg.h:77
error
Definition: IImpactPoint3dEstimator.h:70
ReadOfcFromCool.ofc
ofc
Definition: ReadOfcFromCool.py:110
LArConditionsContainerBase::FeedThroughGrouping
@ FeedThroughGrouping
Definition: LArConditionsContainerBase.h:48
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
LArConditionsTestAlg::testDbObjectRead
StatusCode testDbObjectRead()
Definition: LArConditionsTestAlg.cxx:1278
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >