|
ATLAS Offline Software
|
Athena algorithm used for testing LAr conditions data access.
More...
#include <LArConditionsTestAlg.h>
|
| LArConditionsTestAlg (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~LArConditionsTestAlg () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | finalize () 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 |
|
Athena algorithm used for testing LAr conditions data access.
Definition at line 39 of file LArConditionsTestAlg.h.
◆ StoreGateSvc_t
◆ LArConditionsTestAlg()
LArConditionsTestAlg::LArConditionsTestAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~LArConditionsTestAlg()
LArConditionsTestAlg::~LArConditionsTestAlg |
( |
| ) |
|
|
virtual |
◆ ATLAS_NOT_THREAD_SAFE()
StatusCode testEachCondObject LArConditionsTestAlg::ATLAS_NOT_THREAD_SAFE |
( |
const LArRampMC * |
ramps | ) |
|
|
private |
◆ createCompareObjects()
StatusCode LArConditionsTestAlg::createCompareObjects |
( |
| ) |
|
|
private |
Definition at line 144 of file LArConditionsTestAlg.cxx.
157 for (; chanIt != chanEnd; ++chanIt, ++
ichan) {
159 if (
ichan % 1000 != 5)
continue;
163 ramp.m_vRamp.push_back(vramp);
165 ramp.m_vRamp.push_back(vramp);
167 ramp.m_vRamp.push_back(vramp);
178 if (icorr % 10 != 5)
continue;
180 for (
unsigned int i = 0;
i < 3; ++
i)ramp.m_vRamp[
i] = -ramp.m_vRamp[
i];
204 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode LArConditionsTestAlg::execute |
( |
| ) |
|
|
overridevirtual |
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode LArConditionsTestAlg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode LArConditionsTestAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ testChannelSet()
StatusCode LArConditionsTestAlg::testChannelSet |
( |
| ) |
|
|
private |
Definition at line 1052 of file LArConditionsTestAlg.cxx.
1056 typedef ChanSet::ConstChannelIt ConstChannelIt;
1069 chanSet.insert(
m_rampCorrections[
i].m_channelID.get_identifier32().get_compact(), ramp);
1074 ATH_MSG_ERROR (
"Corrections not the same size as channel set: "
1076 return (StatusCode::FAILURE);
1082 ConstChannelIt
it = chanSet.begin();
1083 ConstChannelIt itEnd = chanSet.end();
1087 for (;
it != itEnd; ++
it, ++
i) {
1093 ATH_MSG_ERROR (
"Correction retrieved with iterator does not match: "
1121 it = chanSet.find(
id);
1126 ATH_MSG_DEBUG (
"Corrections: cool chan, chan id, gain, ramps "
1140 ATH_MSG_ERROR (
"Failing check of channel set - see above" );
1141 return (StatusCode::FAILURE);
1145 return StatusCode::SUCCESS;
◆ testCondObjects()
StatusCode LArConditionsTestAlg::testCondObjects |
( |
| ) |
|
|
private |
Statistics: total number of conditions
Statistics: total number of conditions
Statistics: total number of conditions
Definition at line 243 of file LArConditionsTestAlg.cxx.
247 static std::atomic<bool>
first =
true;
250 return StatusCode::SUCCESS;
255 typedef CONTAINER::chan_const_iterator chan_const_iterator;
256 typedef CONTAINER::iov_const_iterator iov_const_iterator;
267 ATH_MSG_INFO (
"Retrieved ramps for LArRampsSingleGroup " );
268 ramps =
dynamic_cast<const LArRampMC*
>(iramps);
270 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
271 return( StatusCode::FAILURE);
277 ATH_MSG_INFO (
"Created ramps for LArRampsSingleGroup " );
287 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsSingleGroup") );
301 return StatusCode::FAILURE;
316 ATH_MSG_INFO (
"Retrieved ramps for LArRampsSubDetectorGrouping " );
317 ramps =
dynamic_cast<const LArRampMC*
>(iramps);
319 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
320 return( StatusCode::FAILURE);
335 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping") );
348 return StatusCode::FAILURE;
363 ATH_MSG_INFO (
"Retrieved ramps for LArRampsFeedThroughGrouping " );
364 ramps =
dynamic_cast<const LArRampMC*
>(iramps);
366 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
367 return( StatusCode::FAILURE);
382 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping") );
395 return StatusCode::FAILURE;
406 ATH_MSG_DEBUG (
"Statistics for LArRampsFeedThroughGrouping " );
410 iov_const_iterator iovIt = ramps->
iov_begin();
411 iov_const_iterator iovEnd = ramps->
iov_end ();
413 for (; iovIt != iovEnd; ++iovIt) {
418 chan_const_iterator chIt = ramps->
chan_begin();
419 chan_const_iterator chEnd = ramps->
chan_end ();
420 for (; chIt != chEnd; ++chIt) {
425 for (
unsigned int i = 0;
i < ramps->
nGroups(); ++
i) {
431 for (
unsigned int i = 0;
i < ramps->
nGains(); ++
i) {
443 return StatusCode::SUCCESS;
◆ testDbObjectRead()
StatusCode LArConditionsTestAlg::testDbObjectRead |
( |
| ) |
|
|
private |
Definition at line 1150 of file LArConditionsTestAlg.cxx.
1154 typedef CONTAINER::Subset Subset;
1165 CONTAINER::chan_const_iterator chanIt = ramp->
chan_begin();
1166 CONTAINER::chan_const_iterator endChan = ramp->
chan_end ();
1167 for (
unsigned int i = 0; chanIt != endChan; ++chanIt, ++
i) {
1168 unsigned int coolChan = *chanIt;
1169 const Subset* subset = ramp->at(
i);
1172 <<
" Subset size " << subset->subsetSize()
1173 <<
" gain, channel, grouping type " << subset->gain() <<
" "
1174 << MSG::hex << subset->channel() <<
" " << MSG::dec
1175 << subset->groupingType() <<
" "
1178 Subset::ConstSubsetIt
first = subset->subsetBegin();
1179 Subset::ConstSubsetIt last = subset->subsetEnd();
1184 if ((*first).second.size()) {
1189 for (
unsigned int k = 0;
k < 5; ++
k) {
1193 for (
unsigned int j = 0; j < (*first).second[
k].m_vRamp.size(); ++j) {
1228 return StatusCode::SUCCESS;
◆ updateVHKA()
◆ m_applyCorrections
BooleanProperty LArConditionsTestAlg::m_applyCorrections |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_onlineID
◆ m_rampCache
std::vector<LArRampPTmp> LArConditionsTestAlg::m_rampCache |
|
private |
◆ m_rampCorrections
std::vector<LArRampPTmp> LArConditionsTestAlg::m_rampCorrections |
|
private |
◆ m_readCondObjs
BooleanProperty LArConditionsTestAlg::m_readCondObjs |
|
private |
◆ m_TB
BooleanProperty LArConditionsTestAlg::m_TB |
|
private |
◆ m_tbin
int LArConditionsTestAlg::m_tbin |
|
private |
◆ m_testCondObjs
BooleanProperty LArConditionsTestAlg::m_testCondObjs |
|
private |
◆ m_testReadDB
BooleanProperty LArConditionsTestAlg::m_testReadDB |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_writeCondObjs
BooleanProperty LArConditionsTestAlg::m_writeCondObjs |
|
private |
◆ m_writeCorrections
BooleanProperty LArConditionsTestAlg::m_writeCorrections |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
void removeConditions()
Remove conditions leaving the corrections - may be needed to only write out the corrections when both...
iov_const_iterator iov_end() const
std::vector< LArRampPTmp > m_rampCache
Implementation of the interface ILArRamp for MC Derives from LArRampComplete, and implements the phi-...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
BooleanProperty m_writeCorrections
chan_const_iterator chan_begin() const
Access to Channel numbers via iterators - from MultChanCollection.
StatusCode testChannelSet()
Persistent data for LArRamp Copied from LAr.
BooleanProperty m_testReadDB
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
id_iterator channel_end() const
iov_const_iterator iov_begin() const
Access to IOVs via iterators - from MultChanCollection.
unsigned int conditionsPerGain(unsigned int gain) const
Statistics: number of conditions per gain.
unsigned int nGains() const
Number of gain values.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::vector< float > m_vRamp
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< LArRampPTmp > m_rampCorrections
BooleanProperty m_readCondObjs
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.
unsigned int totalNumberOfConditions() const
Statistics: total number of conditions.
StatusCode createCompareObjects()
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
BooleanProperty m_applyCorrections
iov_size_type iov_size() const
number of IOVs - from MultChanCollection
template class for use for I/O of conditions data correction sets
unsigned int conditionsPerGroup(unsigned int group) const
Statistics: number of conditions per group.
Helper class for offline cell identifiers.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
chan_const_iterator chan_end() const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
unsigned int totalNumberOfCorrections() const
Statistics: total number of corrections.
chan_size_type chan_size() const
number of channels - from MultChanCollection
unsigned int nGroups() const
Number of groups - minimum is 2 (1 correction group, 1 FEB ID group)
Persistent data for LArRamp Copied from LAr.
DataObjIDColl m_extendedExtraObjects
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
#define ATH_MSG_WARNING(x)
const LArOnlineID * m_onlineID
unsigned int conditionsPerChannel(unsigned int coolChannel) const
Statistics: number of conditions per COOL channel.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
BooleanProperty m_writeCondObjs
AthAlgorithm()
Default constructor:
StatusCode testCondObjects()
BooleanProperty m_testCondObjs
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
StatusCode testDbObjectRead()