|
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 |
|
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 |
|
Athena algorithm used for testing LAr conditions data access.
Definition at line 40 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 162 of file LArConditionsTestAlg.cxx.
175 for (; chanIt != chanEnd; ++chanIt, ++
ichan) {
177 if (
ichan % 1000 != 5)
continue;
181 ramp.m_vRamp.push_back(vramp);
183 ramp.m_vRamp.push_back(vramp);
185 ramp.m_vRamp.push_back(vramp);
196 if (icorr % 10 != 5)
continue;
198 for (
unsigned int i = 0;
i < 3; ++
i)ramp.m_vRamp[
i] = -ramp.m_vRamp[
i];
222 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.
◆ printCondObjects()
StatusCode LArConditionsTestAlg::printCondObjects |
( |
| ) |
|
|
private |
◆ printTable()
◆ registerCondObjects()
StatusCode LArConditionsTestAlg::registerCondObjects |
( |
| ) |
|
|
private |
◆ renounce()
◆ renounceArray()
◆ streamOutCondObjects()
StatusCode LArConditionsTestAlg::streamOutCondObjects |
( |
| ) |
|
|
private |
◆ 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.
◆ testCallBack1()
◆ testCallBack2()
◆ testChannelSet()
StatusCode LArConditionsTestAlg::testChannelSet |
( |
| ) |
|
|
private |
Definition at line 1070 of file LArConditionsTestAlg.cxx.
1074 typedef ChanSet::ConstChannelIt ConstChannelIt;
1087 chanSet.insert(
m_rampCorrections[
i].m_channelID.get_identifier32().get_compact(), ramp);
1092 ATH_MSG_ERROR (
"Corrections not the same size as channel set: "
1094 return (StatusCode::FAILURE);
1100 ConstChannelIt
it = chanSet.begin();
1101 ConstChannelIt itEnd = chanSet.end();
1105 for (;
it != itEnd; ++
it, ++
i) {
1111 ATH_MSG_ERROR (
"Correction retrieved with iterator does not match: "
1139 it = chanSet.find(
id);
1144 ATH_MSG_DEBUG (
"Corrections: cool chan, chan id, gain, ramps "
1158 ATH_MSG_ERROR (
"Failing check of channel set - see above" );
1159 return (StatusCode::FAILURE);
1163 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 261 of file LArConditionsTestAlg.cxx.
265 static std::atomic<bool>
first =
true;
268 return StatusCode::SUCCESS;
273 typedef CONTAINER::chan_const_iterator chan_const_iterator;
274 typedef CONTAINER::iov_const_iterator iov_const_iterator;
285 ATH_MSG_INFO (
"Retrieved ramps for LArRampsSingleGroup " );
286 ramps =
dynamic_cast<const LArRampMC*
>(iramps);
288 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
289 return( StatusCode::FAILURE);
295 ATH_MSG_INFO (
"Created ramps for LArRampsSingleGroup " );
305 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsSingleGroup") );
319 return StatusCode::FAILURE;
334 ATH_MSG_INFO (
"Retrieved ramps for LArRampsSubDetectorGrouping " );
335 ramps =
dynamic_cast<const LArRampMC*
>(iramps);
337 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
338 return( StatusCode::FAILURE);
353 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping") );
366 return StatusCode::FAILURE;
381 ATH_MSG_INFO (
"Retrieved ramps for LArRampsFeedThroughGrouping " );
382 ramps =
dynamic_cast<const LArRampMC*
>(iramps);
384 ATH_MSG_ERROR (
"Could not dynamic cast ILArRamp to LArRampMC" );
385 return( StatusCode::FAILURE);
400 ATH_CHECK(
detStore()->record(ramps,
"/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping") );
413 return StatusCode::FAILURE;
424 ATH_MSG_DEBUG (
"Statistics for LArRampsFeedThroughGrouping " );
428 iov_const_iterator iovIt = ramps->
iov_begin();
429 iov_const_iterator iovEnd = ramps->
iov_end ();
431 for (; iovIt != iovEnd; ++iovIt) {
436 chan_const_iterator chIt = ramps->
chan_begin();
437 chan_const_iterator chEnd = ramps->
chan_end ();
438 for (; chIt != chEnd; ++chIt) {
443 for (
unsigned int i = 0;
i < ramps->
nGroups(); ++
i) {
449 for (
unsigned int i = 0;
i < ramps->
nGains(); ++
i) {
461 return StatusCode::SUCCESS;
◆ testDbObjectRead()
StatusCode LArConditionsTestAlg::testDbObjectRead |
( |
| ) |
|
|
private |
Definition at line 1229 of file LArConditionsTestAlg.cxx.
1233 typedef CONTAINER::Subset Subset;
1244 CONTAINER::chan_const_iterator chanIt = ramp->
chan_begin();
1245 CONTAINER::chan_const_iterator endChan = ramp->
chan_end ();
1246 for (
unsigned int i = 0; chanIt != endChan; ++chanIt, ++
i) {
1247 unsigned int coolChan = *chanIt;
1248 const Subset* subset = ramp->at(
i);
1251 <<
" Subset size " << subset->subsetSize()
1252 <<
" gain, channel, grouping type " << subset->gain() <<
" "
1253 << MSG::hex << subset->channel() <<
" " << MSG::dec
1254 << subset->groupingType() <<
" "
1257 Subset::ConstSubsetIt
first = subset->subsetBegin();
1258 Subset::ConstSubsetIt last = subset->subsetEnd();
1263 if ((*first).second.size()) {
1268 for (
unsigned int k = 0;
k < 5; ++
k) {
1272 for (
unsigned int j = 0; j < (*first).second[
k].m_vRamp.size(); ++j) {
1307 return StatusCode::SUCCESS;
◆ testDCS_Objects()
StatusCode LArConditionsTestAlg::testDCS_Objects |
( |
| ) |
|
|
private |
◆ testFillIOVDb()
StatusCode LArConditionsTestAlg::testFillIOVDb |
( |
| ) |
|
|
private |
◆ 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_testFill
BooleanProperty LArConditionsTestAlg::m_testFill |
|
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.
BooleanProperty m_testFill
StatusCode createCompareObjects()
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
StatusCode testFillIOVDb()
::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()