16#ifndef IOVDbSvc_IOVDbSvc_h
17#define IOVDbSvc_IOVDbSvc_h
19#include "GaudiKernel/IInterface.h"
20#include "GaudiKernel/IService.h"
22#include "GaudiKernel/StatusCode.h"
23#include "GaudiKernel/ClassID.h"
24#include "GaudiKernel/IIncidentListener.h"
25#include "GaudiKernel/ServiceHandle.h"
26#include "GaudiKernel/ToolHandle.h"
27#include "GaudiKernel/IAddressCreator.h"
28#include "GaudiKernel/IIoComponent.h"
40#include "CoolKernel/IDatabase.h"
41#include "CoolKernel/ValidityKey.h"
86 using base_class::base_class;
94 virtual StatusCode
finalize() override;
118 const EventContext& ctx ) override;
143 const EventContext& ctx) override;
153 virtual
void handle(
const Incident& incident ) override;
187 Gaudi::Property<std::string>
m_par_globalTag{
this,
"GlobalTag",
"",
"Global database tag"};
189 Gaudi::Property<std::string>
m_par_dbinst{
this,
"DBInstance",
"",
"Database instance (like OFLP200)"};
191 Gaudi::Property<std::vector<std::string> >
m_par_folders{
this,
"Folders",{},
"List of database folders to preload",
"OrderedSet<std::string>"};
193 Gaudi::Property<std::vector<std::string> >
m_par_overrideTags{
this,
"overrideTags",{},
"List of xml-modifiers for folders like <prefix>/My/Folder</prefix><tag>MyFolderTag</tag>",
"OrderedSet<std::string>"};
195 Gaudi::Property<std::vector<std::string> >
m_par_foldersToWrite{
this,
"FoldersToMetaData",{},
"list of folders to write to file meta data",
"OrderedSet<std::string>"};
207 IntegerProperty
m_par_maxNumPoolFiles{
this,
"MaxPoolFilesOpen",5,
"max number of pool files open allowed (0 means no limit)"};
209 FloatProperty
m_par_timeStampSlop{
this,
"TimeStampSlop",0.0,
"backdata timestamp IOVs by this many seconds"};
211 IntegerProperty
m_par_cacheRun{
this,
"CacheRun",0,
"force larger numbers of runs to be cached"};
213 IntegerProperty
m_par_cacheTime{
this,
"CacheTime",0,
"force larger timeranges to be cached (seconds)"};
216 UnsignedIntegerProperty
m_par_cacheAlign{
this,
"CacheAlign",0,
"cache alignment - divide cache into N slices and align queries on slice"};
218 BooleanProperty
m_par_onlineMode{
this,
"OnlineMode",
false,
"online mode flag to ignore missing channels outside cache range"};
220 BooleanProperty
m_par_checklock{
this,
"CheckLock",
false,
"check to ensure global/HVS tags are locked (for production)"};
222 StringProperty
m_par_source{
this,
"Source",
"COOL_DATABASE",
"source of data as a string (default COOL_DATABASE)"};
224 StringProperty
m_par_crestServer{
this,
"crestServer",
"https://crest.cern.ch",
"CREST URL with the port number as a string (default https://crest.cern.ch)"};
228 StringProperty
m_par_format{
this,
"Format",{},
"Format of data; default is empty string (default for a given source)"};
230 BooleanProperty
m_outputToFile{
this,
"OutputToFile",
false,
"output to file for debugging purposes"};
231 BooleanProperty
m_crestCoolToFile{
this,
"CrestCoolToFile",
false,
"output to file crest or cool data in the same format for debugging purposes"};
241 PublicToolHandle<IIOVDbMetaDataTool>
m_h_metaDataTool{
this,
"IOVDbMetaDataTool",
"IOVDbMetaDataTool"};
uint32_t CLID
The Class ID type.
Abstract interface to IOVDbSvc to access IOVRange and tag information.
Basic time unit for IOVSvc.
This file contains the class definition for the IPoolSvc interface class.
This class is a collection of AttributeLists where each one is associated with a channel number.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
interface for IOA providers
Abstract interface to IOVDbSvc to access IOVRange and tag information.
Athena service for Interval Of Validity database.
virtual StatusCode finalize() override
Service finalize.
StringProperty m_par_format
BooleanProperty m_par_managePoolConnections
StatusCode loadCaches(IOVDbConn *conn, const IOVTime *time=nullptr)
PublicToolHandle< IIOVDbMetaDataTool > m_h_metaDataTool
std::vector< IOVDbConn * > ConnVec
ServiceHandle< StoreGateSvc > m_h_sgSvc
Gaudi::Property< std::vector< std::string > > m_par_overrideTags
virtual void handle(const Incident &incident) override
Incident service handle for EndEvent.
Gaudi::Property< std::vector< std::string > > m_par_folders
virtual cool::IDatabasePtr getDatabase(bool readOnly) override
Access to COOL database for a given folder.
BooleanProperty m_crestCoolToFile
virtual bool dropObject(const std::string &key, const bool resetCache=false) override
IAddressProvider::tadList tadList
std::map< std::string, IOVDbFolder * > FolderMap
BooleanProperty m_outputToFile
BooleanProperty m_par_checklock
IntegerProperty m_par_forceLumiblockNumber
BooleanProperty m_par_manageConnections
virtual StatusCode preLoadAddresses(StoreID::type storeID, tadList &list) override
Get all addresses that the provider wants to preload in SG maps.
StatusCode io_finalize() override final
ServiceHandle< IAddressCreator > m_h_persSvc
std::map< std::string, std::string > m_cresttagmap
StatusCode checkConfigConsistency() const
IntegerProperty m_par_maxNumPoolFiles
UnsignedIntegerProperty m_par_cacheAlign
StatusCode io_reinit() override final
IntegerProperty m_par_forceTimestamp
virtual StatusCode setRange(const CLID &clid, const std::string &dbKey, const IOVRange &range, const std::string &tag) override
Set range for a particular data object.
IntegerProperty m_par_cacheRun
IAddressProvider::tadListIterator tadListIterator
virtual StatusCode initialize() override
Service init.
StatusCode checkEventSel()
virtual void postConditionsLoad() override
May be called once conditions are loaded to let IOVDbSvc release resources.
BooleanProperty m_par_onlineMode
ServiceHandle< StoreGateSvc > m_h_metaDataStore
ServiceHandle< IClassIDSvc > m_h_clidSvc
ServiceHandle< ITagInfoMgr > m_h_tagInfoMgr
Gaudi::Property< std::string > m_par_dbinst
virtual StatusCode signalBeginRun(const IOVTime &beginRunTime, const EventContext &ctx) override
Set time for begin run.
ServiceHandle< IPoolSvc > m_h_poolSvc
bool m_poolPayloadRequested
StatusCode setupFolders()
ServiceHandle< StoreGateSvc > m_h_detStore
virtual bool getKeyInfo(const std::string &key, IIOVDbSvc::KeyInfo &info) override
Return information about SG key return false if this key is not known to IOVDbSvc.
Gaudi::Property< std::string > m_par_defaultConnection
virtual StatusCode loadAddresses(StoreID::type storeID, tadList &list) override
Get all new addresses from Provider for this Event.
virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
Update a transient Address.
virtual std::vector< std::string > getKeyList() override
virtual void signalEndProxyPreload() override
Signal that callback has been fired.
IntegerProperty m_par_cacheTime
Gaudi::Property< std::vector< std::string > > m_par_foldersToWrite
Gaudi::Property< std::string > m_par_globalTag
IntegerProperty m_par_forceRunNumber
StringProperty m_par_crestServer
virtual StatusCode processTagInfo() override
Process TagInfo.
StringProperty m_par_source
virtual StatusCode getRange(const CLID &clid, const std::string &dbKey, const IOVTime &time, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa) override
Get range for a particular data object identified by its clid and key and a requested IOVTime.
FloatProperty m_par_timeStampSlop
cool::ValidityKey m_iovslop
ServiceHandle< IIOVSvc > m_h_IOVSvc
Basic time unit for IOVSvc.
This is a Athena service which manages detector description tag information.
Support class for PropertyMgr.
The Athena Transient Store API.
defines an enum used by address providers to decide what kind of StoreGateSvc they are providing addr...
=============================================================================