|
ATLAS Offline Software
|
#include <CondInputLoader.h>
|
| CondInputLoader (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor with parameters: More...
|
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | start () 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 |
|
|
Gaudi::Property< DataObjIDColl > | m_load {this,"Load",{},"List of objects to be loaded"} |
| Containers. More...
|
|
DataObjIDColl | m_handlesToCreate |
|
std::vector< SG::VarHandleKey > | m_vhk |
|
Gaudi::Property< bool > | m_dumpCondStore |
|
Gaudi::Property< bool > | m_dumpCondSvc |
|
Gaudi::Property< bool > | m_abort |
|
ServiceHandle< StoreGateSvc > | m_condStore |
|
ServiceHandle< ICondSvc > | m_condSvc |
|
ServiceHandle< IIOVSvc > | m_IOVSvc |
|
ServiceHandle< IIOVDbSvc > | m_IOVDbSvc |
|
ServiceHandle< IClassIDSvc > | m_clidSvc |
|
ServiceHandle< Athena::IRCUSvc > | m_rcuSvc |
|
ServiceHandle< IDictLoaderSvc > | m_dictLoader { this, "DictLoaderSvc", "AthDictLoaderSvc", "" } |
|
ServiceHandle< ITPCnvSvc > | m_tpCnvSvc { this, "TPCnvSvc", "AthTPCnvSvc", "" } |
|
std::map< std::string, std::string > | m_keyFolderMap |
|
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 |
|
Definition at line 29 of file CondInputLoader.h.
◆ StoreGateSvc_t
◆ CondInputLoader()
CondInputLoader::CondInputLoader |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Constructor with parameters:
Definition at line 58 of file CondInputLoader.cxx.
71 auto props = getProperties();
72 for( Gaudi::Details::PropertyBase* prop : props ) {
73 if (prop->name() ==
"ExtraOutputs" || prop->name() ==
"ExtraInputs") {
74 prop->declareUpdateHandler
◆ 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 CondInputLoader::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 308 of file CondInputLoader.cxx.
313 if (!getContext().
valid()) {
318 return StatusCode::FAILURE;
328 now.set_event_number(getContext().eventID().event_number());
329 now.set_lumi_block(getContext().eventID().lumi_block());
330 now.set_time_stamp(getContext().eventID().time_stamp());
331 now.set_time_stamp_ns_offset(getContext().eventID().time_stamp_ns_offset());
334 EventIDBase now_event =
now;
335 now.set_event_number (EventIDBase::UNDEFEVT);
343 if (conditionsRun != EventIDBase::UNDEFNUM) {
344 now.set_run_number (conditionsRun);
349 for (
auto &vhk:
m_vhk) {
350 ATH_MSG_DEBUG(
"handling id: " << vhk.fullKey() <<
" key: " << vhk.key() );
353 if (!
m_condStore->retrieve(ccb, vhk.key()).isSuccess()) {
354 ATH_MSG_ERROR(
"unable to get CondContBase* for " << vhk.fullKey()
355 <<
" from ConditionStore" );
356 sc = StatusCode::FAILURE;
360 if (ccb->valid(
now)) {
361 ATH_MSG_DEBUG(
" CondObj " << vhk.fullKey() <<
" is still valid at " << now_event );
366 if (
m_IOVSvc->createCondObj( ccb, vhk.fullKey(),
now ).isFailure()) {
367 ATH_MSG_ERROR(
"unable to create Cond object for " << vhk.fullKey() <<
" dbKey: "
369 sc = StatusCode::FAILURE;
379 std::ostringstream
ost;
◆ extraDeps_update_handler()
void CondInputLoader::extraDeps_update_handler |
( |
Gaudi::Details::PropertyBase & |
| ) |
|
|
private |
◆ 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 CondInputLoader::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode CondInputLoader::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 85 of file CondInputLoader.cxx.
104 DataObjIDColl handles_to_load;
115 TClass::GetClass (
"coral::AttributeList",
true,
false);
119 if (
id.
key() == itr.second) {
120 if (itr.second != itr.first) {
123 id.updateKey( itr.first );
128 handles_to_load.emplace(vhk.fullKey());
138 std::string
pat =
"LArConditionsContainer<";
139 for (
size_t ibase = 0; ibase < nbases; ++ibase) {
142 std::string subset =
"LArConditionsSubset<" +
basename.substr (
pat.size(), std::string::npos);
144 loadDict (
"LArConditionsSubset_p1");
162 std::ostringstream
ost;
163 ost <<
"Adding base classes:";
164 for (
auto &
e : sortedDataObjIDColl (handles_to_load)) {
166 if (
e->key().empty())
continue;
168 ost <<
"\n + " << *
e <<
" ->";
169 CLID clid =
e->clid();
176 std::string
base(
"UNKNOWN");
178 ost <<
" " <<
base <<
" (" << clid2 <<
")";
181 m_load.value().emplace(vhk.fullKey());
192 const Gaudi::Details::PropertyBase &
p =
getProperty(
"Load");
195 if (!setProperty(
"ExtraOutputs",
p).isSuccess()) {
197 return StatusCode::FAILURE;
201 std::ostringstream
str;
202 str <<
"Will create WriteCondHandle dependencies for the following DataObjects:";
203 for (
auto &
e : sortedDataObjIDColl(
m_load)) {
204 str <<
"\n + " << *
e;
205 if (
e->key().empty()) {
206 sc = StatusCode::FAILURE;
207 str <<
" ERROR: empty key is not allowed!";
211 if (
m_condSvc->regHandle(
this, vhk).isFailure()) {
212 ATH_MSG_ERROR(
"Unable to register WriteCondHandle " << vhk.fullKey());
213 sc = StatusCode::FAILURE;
216 m_IOVSvc->ignoreProxy(vhk.fullKey().clid(), vhk.key());
◆ 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.
◆ loadDict() [1/2]
◆ loadDict() [2/2]
◆ 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()
◆ start()
StatusCode CondInputLoader::start |
( |
| ) |
|
|
overridevirtual |
Definition at line 237 of file CondInputLoader.cxx.
254 std::string
tp(
"UNKNOWN");
255 if (
m_clidSvc->getTypeNameOfID(ditr->clid(),
tp).isFailure()) {
256 ATH_MSG_WARNING(
"unable to convert clid " << ditr->clid() <<
" to a classname."
257 <<
"This is a BAD sign, but will try to continue");
263 (void)TClass::GetClass (
tp.c_str());
269 <<
"> clid=" << ditr->clid()
270 <<
" : no factory found");
274 << ditr->key() <<
"'");
275 if (
m_condStore->recordObject(cb, vhk.key(),
true,
false) ==
nullptr) {
280 m_vhk.push_back(vhk);
284 m_vhk.push_back(vhk);
289 ATH_MSG_FATAL(
"Unable to setup some of the requested CondCont<T>. "
291 return StatusCode::FAILURE;
300 return StatusCode::SUCCESS;
◆ 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.
◆ updateVHKA()
◆ m_abort
Gaudi::Property<bool> CondInputLoader::m_abort |
|
private |
Initial value:{this, "AbortIfInitFails", true,
"Abort execution if unable to create the CondCont<T> in first event"}
Definition at line 63 of file CondInputLoader.h.
◆ m_clidSvc
◆ m_condStore
◆ m_condSvc
◆ m_detStore
◆ m_dictLoader
◆ m_dumpCondStore
Gaudi::Property<bool> CondInputLoader::m_dumpCondStore |
|
private |
Initial value:{ this, "DumpCondStore", false,
"dump the ConditionStore at the end execute"}
Definition at line 59 of file CondInputLoader.h.
◆ m_dumpCondSvc
Gaudi::Property<bool> CondInputLoader::m_dumpCondSvc |
|
private |
Initial value:{ this, "DumpCondSvc", false,
"dump the CondSvc at the end execute"}
Definition at line 61 of file CondInputLoader.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_handlesToCreate
DataObjIDColl CondInputLoader::m_handlesToCreate |
|
private |
◆ m_IOVDbSvc
◆ m_IOVSvc
◆ m_keyFolderMap
std::map<std::string,std::string> CondInputLoader::m_keyFolderMap |
|
private |
◆ m_load
Gaudi::Property<DataObjIDColl> CondInputLoader::m_load {this,"Load",{},"List of objects to be loaded"} |
|
private |
◆ m_rcuSvc
◆ m_tpCnvSvc
◆ m_varHandleArraysDeclared
◆ m_vhk
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
uint64_t eventNumber() const
The current event's event number.
static CondContFactory & Instance()
SG::DataObjectSharedPtr< DataObject > Create(Athena::IRCUSvc &rcusvc, const CLID &clid, const std::string &key) const
EventIDBase::number_type conditionsRun() const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
uint32_t runNumber() const
The current event's run number.
virtual void setOwner(IDataHandleHolder *o)=0
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
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.
Base class for all conditions containers.
T getProperty(const asg::IAsgTool *interface_tool, const std::string &prop_name)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
uint32_t CLID
The Class ID type.
uint32_t lumiBlock() const
The current event's luminosity block number.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
A property holding a SG store/key/clid from which a VarHandle is made.
Class describing the basic event information.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
virtual const std::type_info & persistentTInfo() const =0
return C++ type id of the persistent class this converter is for
The non-template portion of the BaseInfo implementation.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
Filled by IIOVDbSvc::getKeyInfo.
AthAlgorithm()
Default constructor:
Smart pointer to manage DataObject reference counts.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
static const std::string & storeName(const StoreID::type &s)
TBaseAdapter BaseAt(size_t nth) const