ATLAS Offline Software
Loading...
Searching...
No Matches
IOVDbSvc Class Reference

Athena service for Interval Of Validity database. More...

#include <IOVDbSvc.h>

Inheritance diagram for IOVDbSvc:

Public Types

typedef IAddressProvider::tadList tadList
typedef IAddressProvider::tadListIterator tadListIterator

Public Member Functions

virtual ~IOVDbSvc ()
virtual StatusCode initialize () override
 Service init.
StatusCode io_reinit () override final
virtual StatusCode finalize () override
 Service finalize.
StatusCode io_finalize () override final
virtual cool::IDatabasePtr getDatabase (bool readOnly) override
 Access to COOL database for a given folder.
Address use
virtual StatusCode preLoadAddresses (StoreID::type storeID, tadList &list) override
 Get all addresses that the provider wants to preload in SG maps.
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.

IOV range access

enum  IOVDbSvc_state { INITIALIZATION = 0 , BEGIN_RUN , EVENT_LOOP , FINALIZE_ALG }
typedef std::vector< IOVDbConn * > ConnVec
typedef std::map< std::string, IOVDbFolder * > FolderMap
Gaudi::Property< std::string > m_par_defaultConnection {this,"dbConnection","sqlite://;schema=cooldummy.db;dbname=OFLP200","default DB connection string"}
Gaudi::Property< std::string > m_par_globalTag {this,"GlobalTag","","Global database tag"}
Gaudi::Property< std::string > m_par_dbinst {this,"DBInstance","","Database instance (like OFLP200)"}
Gaudi::Property< std::vector< std::string > > m_par_folders {this,"Folders",{},"List of database folders to preload","OrderedSet<std::string>"}
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>"}
Gaudi::Property< std::vector< std::string > > m_par_foldersToWrite {this,"FoldersToMetaData",{},"list of folders to write to file meta data","OrderedSet<std::string>"}
BooleanProperty m_par_manageConnections {this,"ManageConnections",true,"flag to trigger the connections management"}
BooleanProperty m_par_managePoolConnections {this,"ManagePoolConnections",true,"flag to manage pool connections"}
IntegerProperty m_par_forceRunNumber {this,"forceRunNumber",0,"globally force run-number (default: no force)"}
IntegerProperty m_par_forceLumiblockNumber {this,"forceLumiblockNumber",0,"globally force LB-number (default: no force)"}
IntegerProperty m_par_forceTimestamp {this,"forceTimeStamp",0,"globally force time-stamp (default: no force)"}
IntegerProperty m_par_maxNumPoolFiles {this,"MaxPoolFilesOpen",5,"max number of pool files open allowed (0 means no limit)"}
FloatProperty m_par_timeStampSlop {this,"TimeStampSlop",0.0,"backdata timestamp IOVs by this many seconds"}
IntegerProperty m_par_cacheRun {this,"CacheRun",0,"force larger numbers of runs to be cached"}
IntegerProperty m_par_cacheTime {this,"CacheTime",0,"force larger timeranges to be cached (seconds)"}
UnsignedIntegerProperty m_par_cacheAlign {this,"CacheAlign",0,"cache alignment - divide cache into N slices and align queries on slice"}
BooleanProperty m_par_onlineMode {this,"OnlineMode",false,"online mode flag to ignore missing channels outside cache range"}
BooleanProperty m_par_checklock {this,"CheckLock",false,"check to ensure global/HVS tags are locked (for production)"}
StringProperty m_par_source {this,"Source","COOL_DATABASE","source of data as a string (default COOL_DATABASE)"}
StringProperty m_par_crestServer {this,"crestServer","https://crest.cern.ch","CREST URL with the port number as a string (default https://crest.cern.ch)"}
std::map< std::string, std::string > m_cresttagmap
StringProperty m_par_format {this,"Format",{},"Format of data; default is empty string (default for a given source)"}
BooleanProperty m_outputToFile {this,"OutputToFile",false,"output to file for debugging purposes"}
BooleanProperty m_crestCoolToFile {this,"CrestCoolToFile",false,"output to file crest or cool data in the same format for debugging purposes"}
ServiceHandle< IIOVSvcm_h_IOVSvc {this,"IOVSvc","IOVSvc"}
ServiceHandle< StoreGateSvcm_h_sgSvc {this,"StoreGateSvc","StoreGateSvc"}
ServiceHandle< StoreGateSvcm_h_detStore {this,"DetectorStore","DetectorStore"}
ServiceHandle< StoreGateSvcm_h_metaDataStore {this,"MetaDataStore","StoreGateSvc/MetaDataStore"}
ServiceHandle< IAddressCreator > m_h_persSvc {this,"EventPersistencySvc","EventPersistencySvc"}
ServiceHandle< IClassIDSvc > m_h_clidSvc {this,"ClassIDSvc","ClassIDSvc"}
ServiceHandle< IPoolSvcm_h_poolSvc {this,"PoolSvc","PoolSvc"}
PublicToolHandle< IIOVDbMetaDataToolm_h_metaDataTool {this,"IOVDbMetaDataTool","IOVDbMetaDataTool"}
ServiceHandle< ITagInfoMgrm_h_tagInfoMgr {this,"TagInfoMgr","TagInfoMgr"}
bool m_poolPayloadRequested {false}
int m_poolSvcContext {-1}
IOVDbSvc_state m_state {INITIALIZATION}
IOVTime m_iovTime {}
std::string m_globalTag {}
cool::ValidityKey m_iovslop {}
ConnVec m_connections
FolderMap m_foldermap
bool m_abort {false}
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.
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.
virtual StatusCode signalBeginRun (const IOVTime &beginRunTime, const EventContext &ctx) override
 Set time for begin run.
virtual void signalEndProxyPreload () override
 Signal that callback has been fired.
virtual void postConditionsLoad () override
 May be called once conditions are loaded to let IOVDbSvc release resources.
virtual void handle (const Incident &incident) override
 Incident service handle for EndEvent.
virtual StatusCode processTagInfo () override
 Process TagInfo.
virtual std::vector< std::string > getKeyList () override
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.
virtual bool dropObject (const std::string &key, const bool resetCache=false) override
StatusCode checkConfigConsistency () const
StatusCode checkEventSel ()
StatusCode setupFolders ()
StatusCode fillTagInfo ()
StatusCode loadCaches (IOVDbConn *conn, const IOVTime *time=nullptr)
int poolSvcContext ()

Detailed Description

Athena service for Interval Of Validity database.

The IOVDbSvc may be in one of three time states which determines from where the IOV time is coming: initialization - IOV time must be set from the EventSelector begin run - IOV time should have been set with signalBeginRun event loop - IOV time is from EventInfo

Definition at line 76 of file IOVDbSvc.h.

Member Typedef Documentation

◆ ConnVec

typedef std::vector<IOVDbConn*> IOVDbSvc::ConnVec
private

Definition at line 277 of file IOVDbSvc.h.

◆ FolderMap

typedef std::map<std::string,IOVDbFolder*> IOVDbSvc::FolderMap
private

Definition at line 280 of file IOVDbSvc.h.

◆ tadList

Definition at line 102 of file IOVDbSvc.h.

◆ tadListIterator

Member Enumeration Documentation

◆ IOVDbSvc_state

Enumerator
INITIALIZATION 
BEGIN_RUN 
EVENT_LOOP 
FINALIZE_ALG 

Definition at line 259 of file IOVDbSvc.h.

259 {
260 INITIALIZATION = 0,
261 BEGIN_RUN,
264 };
@ FINALIZE_ALG
Definition IOVDbSvc.h:263
@ BEGIN_RUN
Definition IOVDbSvc.h:261
@ INITIALIZATION
Definition IOVDbSvc.h:260
@ EVENT_LOOP
Definition IOVDbSvc.h:262

Constructor & Destructor Documentation

◆ ~IOVDbSvc()

IOVDbSvc::~IOVDbSvc ( )
virtualdefault

Member Function Documentation

◆ checkConfigConsistency()

StatusCode IOVDbSvc::checkConfigConsistency ( ) const
private

Definition at line 1175 of file IOVDbSvc.cxx.

1175 {
1176// check consistency of global tag and database instance, if set
1177 // catch most common user misconfigurations
1178 // this is only done here as need global tag to be set even if read from file
1179 // @TODO should this not be done during initialize
1180 if (!m_par_dbinst.empty() && !m_globalTag.empty() and (m_par_source!="CREST")) {
1181 const std::string_view tagstub=std::string_view(m_globalTag).substr(0,7);
1182 ATH_MSG_DEBUG( "Checking " << m_par_dbinst << " against " <<tagstub );
1183 if (((m_par_dbinst=="COMP200" || m_par_dbinst=="CONDBR2") &&
1184 (tagstub!="COMCOND" && tagstub!="CONDBR2")) ||
1185 (m_par_dbinst=="OFLP200" && (tagstub!="OFLCOND" && tagstub!="CMCCOND"))) {
1186 ATH_MSG_FATAL( "Likely incorrect conditions DB configuration! "
1187 << "Attached to database instance " << m_par_dbinst <<
1188 " but global tag begins " << tagstub );
1189 ATH_MSG_FATAL( "See Atlas/CoolTroubles wiki for details," <<
1190 " or set IOVDbSvc.DBInstance=\"\" to disable check" );
1191 return StatusCode::FAILURE;
1192 }
1193 }
1194 return StatusCode::SUCCESS;
1195}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Property< std::string > m_par_dbinst
Definition IOVDbSvc.h:189
StringProperty m_par_source
Definition IOVDbSvc.h:222
std::string m_globalTag
Definition IOVDbSvc.h:271

◆ checkEventSel()

StatusCode IOVDbSvc::checkEventSel ( )
private

Definition at line 876 of file IOVDbSvc.cxx.

876 {
877 // check if EventSelector is being used to override run numbers
878 // if so, we can set IOV time already to allow conditons retrieval
879 // in the initialise phase, needed for setting up simulation
880
881 ServiceHandle<Gaudi::Interfaces::IOptionsSvc> joSvc("JobOptionsSvc",name());
882 ATH_CHECK( joSvc.retrieve() );
883
884 if (!joSvc->has("EventSelector.OverrideRunNumber")) {
885 // do not return FAILURE if the EventSelector cannot be found, or it has
886 // no override property, can e.g. happen in online running
887 ATH_MSG_DEBUG( "No EventSelector.OverrideRunNumber property found" );
888 return StatusCode::SUCCESS;
889 }
890
891 BooleanProperty bprop("OverrideRunNumber",false);
892 ATH_CHECK( bprop.fromString(joSvc->get("EventSelector.OverrideRunNumber")) );
893 if (bprop.value()) {
894 // if flag is set, extract Run,LB and time
895 ATH_MSG_INFO( "Setting run/LB/time from EventSelector override in initialize" );
896 uint32_t run,lumib;
898 bool allGood=true;
899 if (m_par_forceRunNumber.value()!=0 ||
901 ATH_MSG_WARNING( "forceRunNumber property also set" );
902 IntegerProperty iprop1("RunNumber",0);
903 if (iprop1.fromString(joSvc->get("EventSelector.RunNumber","INVALID"))) {
904 run=iprop1.value();
905 } else {
906 ATH_MSG_ERROR( "Unable to get RunNumber from EventSelector");
907 allGood=false;
908 }
909 IntegerProperty iprop2("FirstLB",0);
910 if (iprop2.fromString(joSvc->get("EventSelector.FirstLB","INVALID"))) {
911 lumib=iprop2.value();
912 } else {
913 ATH_MSG_ERROR( "Unable to get FirstLB from EventSelector");
914 allGood=false;
915 }
916 IntegerProperty iprop3("InitialTimeStamp",0);
917 if (iprop3.fromString(joSvc->get("EventSelector.InitialTimeStamp","INVALID"))) {
918 time=iprop3.value();
919 } else {
920 ATH_MSG_ERROR("Unable to get InitialTimeStamp from EventSelector" );
921 allGood=false;
922 }
923 if (allGood) {
924 m_iovTime.setRunEvent(run,lumib);
925 uint64_t nsTime=time*1000000000LL;
926 m_iovTime.setTimestamp(nsTime);
927 ATH_MSG_INFO( "run/LB/time set to [" << run << "," << lumib << " : " << nsTime << "]" );
928 } else {
929 ATH_MSG_ERROR( "run/LB/Time NOT changed" );
930 }
931 }
932
933 return StatusCode::SUCCESS;
934}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
IntegerProperty m_par_forceLumiblockNumber
Definition IOVDbSvc.h:203
IOVTime m_iovTime
Definition IOVDbSvc.h:268
IntegerProperty m_par_forceRunNumber
Definition IOVDbSvc.h:201
time(flags, cells_name, *args, **kw)
bool allGood
Loop over the SDOs & Digits.
setEventNumber uint32_t

◆ dropObject()

bool IOVDbSvc::dropObject ( const std::string & key,
const bool resetCache = false )
overridevirtual

Definition at line 848 of file IOVDbSvc.cxx.

848 {
849 // find the folder corresponding to this object
850 FolderMap::const_iterator itr=m_foldermap.find(key);
851 if (itr!=m_foldermap.end()) {
852 IOVDbFolder* folder=itr->second;
853 CLID clid=folder->clid();
854 SG::DataProxy* proxy=m_h_detStore->proxy(clid,key);
855 if (proxy!=nullptr) {
856 m_h_detStore->clearProxyPayload(proxy);
857 ATH_MSG_DEBUG("Dropped payload for key " << key );
858 folder->setDropped(true);
859 if (resetCache) {
860 folder->resetCache();
861 ATH_MSG_DEBUG( "Cache reset done for folder " << folder->folderName() );
862 }
863 return true;
864 } else {
865 return false;
866 }
867 } else {
868 return false;
869 }
870}
uint32_t CLID
The Class ID type.
ServiceHandle< StoreGateSvc > m_h_detStore
Definition IOVDbSvc.h:236
FolderMap m_foldermap
Definition IOVDbSvc.h:281

◆ fillTagInfo()

StatusCode IOVDbSvc::fillTagInfo ( )
private

Definition at line 1094 of file IOVDbSvc.cxx.

1094 {
1095 if (!m_par_globalTag.empty()) {
1096 ATH_MSG_DEBUG( "Adding GlobalTag " << m_par_globalTag << " into TagInfo" );
1097 if (StatusCode::SUCCESS!=m_h_tagInfoMgr->addTag("IOVDbGlobalTag",m_par_globalTag))
1098 return StatusCode::FAILURE;
1099 }
1100 // add all explicit tags specified in folders
1101 // can be from Folders or tagOverrides properties
1102 for (const auto & thisFolder : m_foldermap) {
1103 const IOVDbFolder* folder=thisFolder.second;
1104 if (!folder->joTag().empty()) {
1105 ATH_MSG_DEBUG( "Adding folder " << folder->folderName() <<" tag " << folder->joTag() << " into TagInfo" );
1106 if (StatusCode::SUCCESS!=m_h_tagInfoMgr->addTag(folder->folderName(),folder->joTag()))
1107 return StatusCode::FAILURE;
1108 }
1109 // check to see if any input TagInfo folder overrides should be removed
1110 // this anticipates the decisions which will be made in processTagInfo
1111 // Here we do not have access to the TagInfo object, but can put remove
1112 // requests in for all folders if the global tag is set, or if there is
1113 // an explict joboption tag, nooverride spec, or data comes from metadata
1114 if (!m_par_globalTag.empty() || !folder->joTag().empty() || folder->noOverride() ||
1115 folder->readMeta()) {
1116 if (StatusCode::SUCCESS!=
1117 m_h_tagInfoMgr->removeTagFromInput(folder->folderName())) {
1118 ATH_MSG_WARNING( "Could not add TagInfo remove request for "
1119 << folder->folderName() );
1120 } else {
1121 ATH_MSG_INFO( "Added taginfo remove for " <<
1122 folder->folderName() );
1123 }
1124 }
1125 }
1126 return StatusCode::SUCCESS;
1127}
ServiceHandle< ITagInfoMgr > m_h_tagInfoMgr
Definition IOVDbSvc.h:242
Gaudi::Property< std::string > m_par_globalTag
Definition IOVDbSvc.h:187

◆ finalize()

StatusCode IOVDbSvc::finalize ( )
overridevirtual

Service finalize.

Definition at line 258 of file IOVDbSvc.cxx.

258 {
259 // summarise and delete folders, adding total read from COOL
260 unsigned long long nread=0;
261 float readtime=0.;
262 // accumulate a map of readtime by connection
263 typedef std::map<IOVDbConn*,float> CTMap;
264 CTMap ctmap;
265 for (const auto & namePtrPair : m_foldermap) {
266 IOVDbFolder* folder=namePtrPair.second;
267 folder->summary();
268 nread+=folder->bytesRead();
269 const float& fread=folder->readTime();
270 readtime+=fread;
271 IOVDbConn* cptr=folder->conn();
272 CTMap::iterator citr=ctmap.find(cptr);
273 if (citr!=ctmap.end()) {
274 (citr->second)+=fread;
275 } else {
276 ctmap.insert(CTMap::value_type(cptr,fread));
277 }
278 delete folder;
279 }
280 ATH_MSG_INFO( "Total payload read from IOVDb: " << nread << " bytes in (( " << std::fixed << std::setw(9) << std::setprecision(2) <<
281 readtime << " ))s" );
282
283 // close and delete connections, printing time in each one
284 for (auto & pThisConnection : m_connections) {
285 float fread=0;
286 CTMap::iterator citr=ctmap.find(pThisConnection);
287 if (citr!=ctmap.end()) fread=citr->second;
288 pThisConnection->setInactive();
289 pThisConnection->summary(fread);
290 delete pThisConnection;
291 }
292 // finally remove the msg svc
293 //delete m_log;
294 return AthService::finalize();
295}
ConnVec m_connections
Definition IOVDbSvc.h:278

◆ getDatabase()

cool::IDatabasePtr IOVDbSvc::getDatabase ( bool readOnly)
overridevirtual

Access to COOL database for a given folder.

Definition at line 297 of file IOVDbSvc.cxx.

297 {
298 // get default database connection
299 cool::IDatabasePtr dbconn;
300 if (m_par_defaultConnection.empty() || m_connections.empty()) {
301 ATH_MSG_INFO( "No default COOL database connection is available");
302 dbconn.reset();
303 } else {
304 Athena::DBLock dblock;
305 if (m_connections[0]->isReadOnly()!=readOnly) {
306 ATH_MSG_INFO("Changing state of default connection to readonly=" << readOnly );
307 m_connections[0]->setReadOnly(readOnly);
308 }
309 dbconn = std::make_shared<LockedDatabase> (m_connections[0]->getCoolDb(),
310 dblock);
311 }
312 return dbconn;
313}
Gaudi::Property< std::string > m_par_defaultConnection
Definition IOVDbSvc.h:185

◆ getKeyInfo()

bool IOVDbSvc::getKeyInfo ( const std::string & key,
IIOVDbSvc::KeyInfo & info )
overridevirtual

Return information about SG key return false if this key is not known to IOVDbSvc.

Definition at line 828 of file IOVDbSvc.cxx.

828 {
829 // return information about given SG key
830 // first attempt to find the folder object for this key
831 FolderMap::const_iterator itr = m_foldermap.find(key);
832 if (itr!=m_foldermap.end()) {
833 const IOVDbFolder* f=itr->second;
834 info.folderName = f->folderName();
835 info.tag = f->resolvedTag();
836 info.range = f->currentRange();
837 info.retrieved = f->retrieved();
838 info.bytesRead = f->bytesRead();
839 info.readTime = f->readTime();
840 info.extensible = f->extensible();
841 return true;
842 } else {
843 info.retrieved = false;
844 return false;
845 }
846}

◆ getKeyList()

std::vector< std::string > IOVDbSvc::getKeyList ( )
overridevirtual

Definition at line 820 of file IOVDbSvc.cxx.

820 {
821 // return a list of all the StoreGate keys being managed by IOVDbSvc
822 std::vector<std::string> keys;
823 keys.reserve(m_foldermap.size());
824 std::for_each(m_foldermap.begin(),m_foldermap.end(), [&keys](const auto &i){keys.emplace_back(i.first);});
825 return keys;
826}

◆ getRange()

StatusCode IOVDbSvc::getRange ( const CLID & clid,
const std::string & dbKey,
const IOVTime & time,
IOVRange & range,
std::string & tag,
std::unique_ptr< IOpaqueAddress > & ioa )
overridevirtual

Get range for a particular data object identified by its clid and key and a requested IOVTime.

Definition at line 565 of file IOVDbSvc.cxx.

570 {
571
572 Athena::DBLock dblock;
573
574 ATH_MSG_DEBUG( "getRange clid: " << clid << " key: \""<< dbKey << "\" t: " << time );
575 const std::string& key=dbKey;
576 FolderMap::const_iterator fitr=m_foldermap.find(key);
577 if (fitr==m_foldermap.end()) {
578 ATH_MSG_VERBOSE("getRange cannot find description for dbKey " << key );
579 return StatusCode::FAILURE;
580 }
581 IOVDbFolder* folder=fitr->second;
582 if (folder->clid()!=clid) {
583 ATH_MSG_VERBOSE( "supplied CLID for " << key << " is "
584 << clid
585 << " but expecting " << folder->clid() );
586
587 return StatusCode::FAILURE;
588 }
589
590 tag = folder->key();
591
592 // obtain the validity key for this folder (includes overrides)
593 cool::ValidityKey vkey=folder->iovTime(time);
594 if (!folder->readMeta() && !folder->cacheValid(vkey)) {
595 // mark this folder as not-dropped so cache-read will succeed
596 folder->setDropped(false);
597 // reload cache for this folder (and all others sharing this DB connection)
598 ATH_MSG_DEBUG( "Triggering cache load for folder " << folder->folderName() );
599 if (StatusCode::SUCCESS!=loadCaches(folder->conn(),&time)) {
600 ATH_MSG_ERROR( "Cache load failed for at least one folder from " << folder->conn()->name()
601 << ". You may see errors from other folders sharing the same connection." );
602 return StatusCode::FAILURE;
603 }
604 }
605
606 // data should now be in cache
607 address.reset();
608 // setup address and range
609 {
610 Gaudi::Guards::AuditorGuard auditor(std::string("FldrSetup:")+(key.empty() ? "anonymous" : key),
611 auditorSvc(), "preLoadProxy");
612 if (!folder->getAddress(vkey,&(*m_h_persSvc),poolSvcContext(),address,
613 range,m_poolPayloadRequested)) {
614 ATH_MSG_ERROR("getAddress failed for folder " <<folder->folderName() );
615 return StatusCode::FAILURE;
616 }
617 }
618
619 // Special handling for extensible folders:
620 if (folder->extensible()) {
621 // Set the end time to just past the current event or lumiblock.
622 IOVTime extStop = range.stop();
623 if (folder->timeStamp()) {
624 extStop.setTimestamp (time.timestamp() + 1);
625 }
626 else {
627 extStop.setRETime (time.re_time() + 1);
628 }
629 range = IOVRange (range.start(), extStop);
630 }
631
632 // Special handling for IOV override: set the infinite validity range
633 if (folder->iovOverridden()) {
634 if (folder->timeStamp()) {
635 range = IOVRange ( IOVTime(IOVTime::MINTIMESTAMP)
636 , IOVTime(IOVTime::MAXTIMESTAMP) );
637 }
638 else {
639 range = IOVRange ( IOVTime(IOVTime::MINRUN,IOVTime::MINEVENT)
641 }
642 }
643
644 return StatusCode::SUCCESS;
645}
#define ATH_MSG_VERBOSE(x)
StatusCode loadCaches(IOVDbConn *conn, const IOVTime *time=nullptr)
ServiceHandle< IAddressCreator > m_h_persSvc
Definition IOVDbSvc.h:238
int poolSvcContext()
Definition IOVDbSvc.cxx:141
bool m_poolPayloadRequested
Definition IOVDbSvc.h:247
static constexpr uint64_t MAXTIMESTAMP
Definition IOVTime.h:58
static constexpr uint32_t MAXRUN
Definition IOVTime.h:48
void setRETime(uint64_t time) noexcept
Definition IOVTime.cxx:84
static constexpr uint32_t MINEVENT
Definition IOVTime.h:50
static constexpr uint64_t MINTIMESTAMP
Definition IOVTime.h:56
void setTimestamp(uint64_t timestamp) noexcept
Definition IOVTime.cxx:72
static constexpr uint32_t MAXEVENT
Definition IOVTime.h:51
static constexpr uint32_t MINRUN
Definition IOVTime.h:44

◆ handle()

void IOVDbSvc::handle ( const Incident & incident)
overridevirtual

Incident service handle for EndEvent.

Definition at line 757 of file IOVDbSvc.cxx.

757 {
758 // Handle incidents:
759 // BeginEvent to set IOVDbSvc state to EVENT_LOOP
760 // StoreCleared/EndProcessing to close any open POOL files
761 ATH_MSG_VERBOSE( "entering handle(), incident type " << inc.type() << " from " << inc.source() );
762 if (inc.type()=="BeginEvent") {
764 } else {
765 Athena::DBLock dblock;
766
767 const StoreClearedIncident* sinc = dynamic_cast<const StoreClearedIncident*>(&inc);
768 if( (inc.type()=="StoreCleared" && sinc!=nullptr && sinc->store()==&*m_h_sgSvc
770 or inc.type()==IncidentType::EndProcessing )
771 {
774 }
775 }
776}
ServiceHandle< StoreGateSvc > m_h_sgSvc
Definition IOVDbSvc.h:235
virtual void postConditionsLoad() override
May be called once conditions are loaded to let IOVDbSvc release resources.
Definition IOVDbSvc.cxx:732
IOVDbSvc_state m_state
Definition IOVDbSvc.h:265
const StoreGateSvc * store() const
Return the store that was cleared.

◆ initialize()

StatusCode IOVDbSvc::initialize ( )
overridevirtual

Service init.

Definition at line 160 of file IOVDbSvc.cxx.

160 {
161 if (StatusCode::SUCCESS!=AthService::initialize()) return StatusCode::FAILURE;
162 // subscribe to events
163 ServiceHandle<IIncidentSvc> incSvc("IncidentSvc",name());
164 if (StatusCode::SUCCESS!=incSvc.retrieve()) {
165 ATH_MSG_ERROR( "Unable to get the IncidentSvc" );
166 return StatusCode::FAILURE;
167 }
168 long int pri=100;
169 incSvc->addListener( this, "BeginEvent", pri );
170 incSvc->addListener( this, "StoreCleared", pri ); // for SP Athena
171 incSvc->addListener( this, IncidentType::EndProcessing, pri ); // for MT Athena
172
173 // Register this service for 'I/O' events
174 ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
175 if (!iomgr.retrieve().isSuccess()) {
176 ATH_MSG_FATAL("Could not retrieve IoComponentMgr !");
177 return(StatusCode::FAILURE);
178 }
179 if (!iomgr->io_register(this).isSuccess()) {
180 ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
181 return(StatusCode::FAILURE);
182 }
183 // print warnings/info depending on state of job options
185 ATH_MSG_INFO( "COOL connection management disabled - connections kept open throughout job" );
187 ATH_MSG_INFO( "POOL file connection management disabled - files kept open throught job" );
188 if (m_par_maxNumPoolFiles.value() > 0)
189 ATH_MSG_INFO( "Only " << m_par_maxNumPoolFiles.value() << " POOL conditions files will be open at once" );
190 if (m_par_forceRunNumber.value() > 0 || m_par_forceLumiblockNumber.value() > 0)
191 ATH_MSG_WARNING( "Global run/LB number forced to be [" <<
192 m_par_forceRunNumber.value() << "," << m_par_forceLumiblockNumber.value() << "]" );
193 if (m_par_forceTimestamp.value() > 0)
194 ATH_MSG_WARNING( "Global timestamp forced to be " <<
195 m_par_forceTimestamp.value() );
196 if (m_par_cacheRun.value() > 0)
197 ATH_MSG_INFO( "Run-LB data will be cached in groups of " <<
198 m_par_cacheRun.value() << " runs" );
199 if (m_par_cacheTime.value() > 0)
200 ATH_MSG_INFO( "Timestamp data will be cached in groups of " << m_par_cacheTime.value() << " seconds" );
201 if (m_par_cacheAlign > 0)
202 ATH_MSG_INFO( "Cache alignment will be done in " << m_par_cacheAlign.value() << " slices" );
203 if (m_par_onlineMode)
204 ATH_MSG_INFO( "Online mode ignoring potential missing channels outside cache" );
205 if (m_par_checklock)
206 ATH_MSG_INFO( "Tags will be required to be locked");
207
208 // make sure iovTime is undefined
209 m_iovTime.reset();
210
211 // extract information from EventSelector for run/LB/time overrides
212 if (StatusCode::SUCCESS!=checkEventSel()) return StatusCode::FAILURE;
213
214 // initialise default connection
215 if (!m_par_defaultConnection.empty()) {
216 // default connection is readonly if no : in name (i.e. logical conn)
217 bool readonly=(m_par_defaultConnection.value().find(':')==std::string::npos);
218 m_connections.push_back(new IOVDbConn(m_par_defaultConnection,readonly,msg()));
219 }
220
221 // set time of timestampslop in nanoseconds
222 m_iovslop=static_cast<cool::ValidityKey>(m_par_timeStampSlop*1.E9);
223
224 // check for global tag in jobopt, which will override anything in input file
225 if (!m_par_globalTag.empty()) {
227 ATH_MSG_INFO( "Global tag: " << m_par_globalTag.value() << " set from joboptions" );
228 }
229
230 // setup folders and process tag overrides
231 if (StatusCode::SUCCESS!=setupFolders()) return StatusCode::FAILURE;
232
233 // Set state to initialize
235 ATH_MSG_INFO( "Initialised with " << m_connections.size() <<
236 " connections and " << m_foldermap.size() << " folders" );
237 if (m_outputToFile.value()) ATH_MSG_INFO("Db dump to file activated");
238 if (m_crestCoolToFile.value())ATH_MSG_INFO("Crest or Cool dump to file activated");
239 ATH_MSG_INFO( "Service IOVDbSvc initialised successfully" );
240
242 return StatusCode::SUCCESS;
243}
BooleanProperty m_par_managePoolConnections
Definition IOVDbSvc.h:199
BooleanProperty m_crestCoolToFile
Definition IOVDbSvc.h:231
BooleanProperty m_outputToFile
Definition IOVDbSvc.h:230
BooleanProperty m_par_checklock
Definition IOVDbSvc.h:220
BooleanProperty m_par_manageConnections
Definition IOVDbSvc.h:197
StatusCode checkConfigConsistency() const
IntegerProperty m_par_maxNumPoolFiles
Definition IOVDbSvc.h:207
UnsignedIntegerProperty m_par_cacheAlign
Definition IOVDbSvc.h:216
IntegerProperty m_par_forceTimestamp
Definition IOVDbSvc.h:205
IntegerProperty m_par_cacheRun
Definition IOVDbSvc.h:211
StatusCode checkEventSel()
Definition IOVDbSvc.cxx:876
BooleanProperty m_par_onlineMode
Definition IOVDbSvc.h:218
StatusCode setupFolders()
Definition IOVDbSvc.cxx:936
IntegerProperty m_par_cacheTime
Definition IOVDbSvc.h:213
FloatProperty m_par_timeStampSlop
Definition IOVDbSvc.h:209
cool::ValidityKey m_iovslop
Definition IOVDbSvc.h:274
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:138
MsgStream & msg
Definition testRead.cxx:32

◆ io_finalize()

StatusCode IOVDbSvc::io_finalize ( )
finaloverride

Definition at line 253 of file IOVDbSvc.cxx.

253 {
254 ATH_MSG_DEBUG("I/O finalization...");
255 return(StatusCode::SUCCESS);
256}

◆ io_reinit()

StatusCode IOVDbSvc::io_reinit ( )
finaloverride

Definition at line 246 of file IOVDbSvc.cxx.

246 {
247 ATH_MSG_DEBUG("I/O reinitialization...");
248 // PoolSvc clears all connections on IO_reinit - forget the stored contextId
249 m_poolSvcContext = -1;
250 return(StatusCode::SUCCESS);
251}
int m_poolSvcContext
Definition IOVDbSvc.h:251

◆ loadAddresses()

StatusCode IOVDbSvc::loadAddresses ( StoreID::type storeID,
tadList & list )
overridevirtual

Get all new addresses from Provider for this Event.

Definition at line 442 of file IOVDbSvc.cxx.

442 {
443 // this method does nothing
444 return StatusCode::SUCCESS;
445}

◆ loadCaches()

StatusCode IOVDbSvc::loadCaches ( IOVDbConn * conn,
const IOVTime * time = nullptr )
private

Definition at line 1129 of file IOVDbSvc.cxx.

1129 {
1130 // load the caches for all folders using the given connection
1131 // so connection use is optimised
1132
1133 Gaudi::Guards::AuditorGuard auditor(std::string("loadCachesOverhead:")+conn->name(), auditorSvc(), "preLoadProxy");
1134
1135 ATH_MSG_DEBUG( "loadCaches: Begin for connection " << conn->name());
1136 // if global abort already set, load nothing
1137 if (m_abort) return StatusCode::FAILURE;
1138 bool access=false;
1139 StatusCode sc=StatusCode::SUCCESS;
1140 for (const auto & thisNamePtrPair : m_foldermap) {
1141 IOVDbFolder* folder=thisNamePtrPair.second;
1142 if (folder->conn()!=conn) continue;
1143 cool::ValidityKey vkey=folder->iovTime(time==nullptr ? m_iovTime : *time);
1144 // protect against out of range times (timestamp -1 happened in FDR2)
1145 if (vkey>cool::ValidityKeyMax) {
1146 ATH_MSG_WARNING( "Requested validity key " << vkey << " is out of range, reset to 0" );
1147 vkey=0;
1148 }
1149 if (!folder->cacheValid(vkey) && !folder->dropped()) {
1150 access=true;
1151 {
1152 Gaudi::Guards::AuditorGuard auditor(std::string("FldrCache:")+folder->folderName(), auditorSvc(), "preLoadProxy");
1153 if (!folder->loadCache(vkey,m_par_cacheAlign,m_globalTag,m_par_onlineMode)) {
1154 ATH_MSG_ERROR( "Cache load (prefetch) failed for folder " << folder->folderName() );
1155 // remember the failure, but also load other folders on this connection
1156 // while it is open
1157 sc=StatusCode::FAILURE;
1158 }
1159 }
1160 }
1161 }
1162 // disconnect from database if we connected
1163 if (access && m_par_manageConnections) conn->setInactive();
1164 // if connection aborted, set overall abort so we do not waste time trying
1165 // to read data from other schema
1166 if (conn->aborted()) {
1167 ATH_MSG_FATAL( "Connection " << conn->name() << " was aborted, set global abort" );
1168 m_abort=true;
1169 ATH_MSG_FATAL( "loadCache: impossible to load cache!" );
1170 throw std::exception();
1171 }
1172 return sc;
1173}
static Double_t sc
bool m_abort
Definition IOVDbSvc.h:283
::StatusCode StatusCode
StatusCode definition for legacy code.
access(filename, mode)

◆ poolSvcContext()

int IOVDbSvc::poolSvcContext ( )
private

Definition at line 141 of file IOVDbSvc.cxx.

142{
143 if( m_poolSvcContext < 0 ) {
144 // Get context for POOL conditions files, and created an initial connection
146 m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions", m_par_maxNumPoolFiles);
147 } else {
148 m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions");
149 }
150 if( m_h_poolSvc->connect(pool::ITransaction::READ, m_poolSvcContext).isSuccess() ) {
151 ATH_MSG_INFO( "Opened read transaction for POOL PersistencySvc");
152 } else {
153 // We only emit info for failure to connect (for the moment? RDS 01/2008)
154 ATH_MSG_INFO( "Cannot connect to POOL PersistencySvc" );
155 }
156 }
157 return m_poolSvcContext;
158}
ServiceHandle< IPoolSvc > m_h_poolSvc
Definition IOVDbSvc.h:240

◆ postConditionsLoad()

void IOVDbSvc::postConditionsLoad ( )
overridevirtual

May be called once conditions are loaded to let IOVDbSvc release resources.

Definition at line 732 of file IOVDbSvc.cxx.

732 {
733 // Close any open POOL files after loding Conditions
734 ATH_MSG_DEBUG( "postConditionsLoad: m_par_managePoolConnections=" << m_par_managePoolConnections
735 << " m_poolPayloadRequested=" << m_poolPayloadRequested );
736
738 // reset POOL connection to close all open conditions POOL files
741 if( m_poolSvcContext ) {
742 if (StatusCode::SUCCESS==m_h_poolSvc->disconnect(m_poolSvcContext)) {
743 ATH_MSG_DEBUG( "Successfully closed input POOL connections");
744 } else {
745 ATH_MSG_WARNING( "Unable to close input POOL connections" );
746 }
747 // reopen transaction
748 if (StatusCode::SUCCESS==m_h_poolSvc->connect(pool::ITransaction::READ, m_poolSvcContext)) {
749 ATH_MSG_DEBUG("Reopend read transaction for POOL conditions input files" );
750 } else {
751 ATH_MSG_WARNING("Cannot reopen read transaction for POOL conditions input files");
752 }
753 }
754 }
755}

◆ preLoadAddresses()

StatusCode IOVDbSvc::preLoadAddresses ( StoreID::type storeID,
tadList & list )
overridevirtual

Get all addresses that the provider wants to preload in SG maps.

Definition at line 315 of file IOVDbSvc.cxx.

315 {
316 // Read information for folders and setup TADs
317 if (storeID!=StoreID::DETECTOR_STORE) return StatusCode::SUCCESS;
318 // Preloading of addresses should be done ONLY for detector store
319 ATH_MSG_DEBUG( "preLoadAddress: storeID -> " << storeID );
320
321 Athena::DBLock dblock;
322
323 // check File Level Meta Data of input, see if any requested folders are available there
324 SG::ConstIterator<IOVMetaDataContainer> cont;
325 SG::ConstIterator<IOVMetaDataContainer> contEnd;
326 if (StatusCode::SUCCESS==m_h_metaDataStore->retrieve(cont,contEnd)) {
327 unsigned int ncontainers=0;
328 unsigned int nused=0;
329 for (;cont!=contEnd; ++cont) {
330 ++ncontainers;
331 const std::string& fname=cont->folderName();
332 // check if this folder is in list requested by IOVDbSvc
333 for (const auto & thisNamePtrPair : m_foldermap) {
334 IOVDbFolder* folder = thisNamePtrPair.second;
335 // take data from FLMD only if tag override is NOT set
336 if (folder->folderName()==fname && !(folder->tagOverride())) {
337 ATH_MSG_INFO( "Folder " << fname << " will be taken from file metadata" );
338 folder->useFileMetaData();
339 folder->setFolderDescription( cont->folderDescription() );
340 ++nused;
341 break;
342 }
343 }
344 }
345 ATH_MSG_INFO( "Found " << ncontainers << " metadata containers in input file, " << nused << " will be used");
346 } else {
347 ATH_MSG_DEBUG( "Could not retrieve IOVMetaDataContainer objects from MetaDataStore" );
348 }
349
350 // Remove folders which should only be read from file meta data, but
351 // were not found in the MetaDataStore
352
353 // Note: we cannot iterate and perform erase within the iteration
354 // because the iterator becomes invalid. So first collect the keys
355 // to erase in a first pass and then erase them.
356 std::vector<std::string> keysToDelete;
357 for (const auto & thisNamePtrPair : m_foldermap) {
358 if (thisNamePtrPair.second->fromMetaDataOnly() && !thisNamePtrPair.second->readMeta()) {
359 ATH_MSG_INFO( "preLoadAddresses: Removing folder " << thisNamePtrPair.second->folderName() <<
360 ". It should only be in the file meta data and was not found." );
361 keysToDelete.push_back(thisNamePtrPair.first);
362 }
363 }
364
365 for (auto & thisKey : keysToDelete) {
366 FolderMap::iterator fitr=m_foldermap.find(thisKey);
367 if (fitr != m_foldermap.end()) {
368 fitr->second->conn()->decUsage();
369 delete (fitr->second);
370 m_foldermap.erase(fitr);
371 } else {
372 ATH_MSG_ERROR( "preLoadAddresses: Could not find folder " << thisKey << " for removal" );
373 }
374 }
375
376
377 // loop over all folders, grouped by connection
378 // do metadata folders on first connection (default connection)
379 bool doMeta=true;
380 // do not close COOL connection until next one has been opened, this enables
381 // connection sharing in CORAL, so all COOL connections will use the same
382 // CORAL one (althugh they will each be given a separate session)
383 IOVDbConn* oldconn=nullptr;
384 for (const auto & pThisConnection : m_connections) {
385 if (pThisConnection->nFolders()>0 || doMeta) {
386 // loop over all folders using this connection
387 for (const auto & thisNamePtrPair : m_foldermap) {
388 IOVDbFolder* folder=thisNamePtrPair.second;
389 if (folder->conn()==pThisConnection || (folder->conn()==nullptr && doMeta)) {
390 std::unique_ptr<SG::TransientAddress> tad =
391 folder->preLoadFolder( &(*m_h_tagInfoMgr), m_par_cacheRun.value(),
392 m_par_cacheTime.value());
393 if (oldconn!=pThisConnection) {
394 // close old connection if appropriate
395 if (m_par_manageConnections && oldconn!=nullptr) oldconn->setInactive();
396 oldconn=pThisConnection;
397 }
398 if (tad==nullptr) {
399 ATH_MSG_ERROR( "preLoadFolder failed for folder " << folder->folderName() );
400 return StatusCode::FAILURE;
401 }
402 // for write-metadata folder, request data preload
403 if (folder->writeMeta()) {
404 if (StatusCode::SUCCESS!=m_h_IOVSvc->preLoadDataTAD(tad.get(),folder->eventStore())) {
405 ATH_MSG_ERROR( "Could not request IOVSvc to preload metadata for " << folder->folderName() );
406 return StatusCode::FAILURE;
407 }
408 } else {
409 // for other folders, just preload TAD (not data)
410 if (StatusCode::SUCCESS!=m_h_IOVSvc->preLoadTAD(tad.get(), folder->eventStore())) {
411 ATH_MSG_ERROR( "Could not request IOVSvc to preload metadata for " << folder->folderName() );
412 return StatusCode::FAILURE;
413 }
414 }
415 // Add TAD to Storegate
416 tlist.push_back(tad.release());
417 // check for IOV override
418 folder->setIOVOverride(m_par_forceRunNumber.value(),
420 }
421 }
422 }
423 doMeta=false;
424 }
425 // close last connection
426 if (oldconn!=nullptr and m_par_manageConnections) oldconn->setInactive();
427
428 // some folder keys may have changed during preloadFolder due to use of
429 // <key> specification in folder description string
430 // build a new foldermap with the updated keys
431 FolderMap newmap;
432 for (const auto & thisNamePtrPair : m_foldermap) {
433 newmap[thisNamePtrPair.second->key()]=thisNamePtrPair.second;
434 }
435 m_foldermap=std::move(newmap);
436 // fill global and explicit folder tags into TagInfo
437 if (StatusCode::SUCCESS!=fillTagInfo())
438 ATH_MSG_ERROR("Could not fill TagInfo object from preLoadAddresses" );
439 return StatusCode::SUCCESS;
440}
void setInactive()
std::map< std::string, IOVDbFolder * > FolderMap
Definition IOVDbSvc.h:280
ServiceHandle< StoreGateSvc > m_h_metaDataStore
Definition IOVDbSvc.h:237
StatusCode fillTagInfo()
ServiceHandle< IIOVSvc > m_h_IOVSvc
Definition IOVDbSvc.h:234
@ DETECTOR_STORE
Definition StoreID.h:27

◆ processTagInfo()

StatusCode IOVDbSvc::processTagInfo ( )
overridevirtual

Process TagInfo.

Definition at line 778 of file IOVDbSvc.cxx.

778 {
779 // Processing of taginfo
780 // Set GlobalTag and any folder-specific overrides if given
781
782 // dump out contents of TagInfo
783 ATH_MSG_DEBUG( "Tags from input TagInfo:");
784 if( msg().level()>=MSG::DEBUG ) m_h_tagInfoMgr->printTags(msg());
785
786 // check IOVDbSvc GlobalTag, if not already set
787 if (m_globalTag.empty()) {
788 m_globalTag = m_h_tagInfoMgr->findTag("IOVDbGlobalTag");
789 if (!m_globalTag.empty()) ATH_MSG_INFO( "Global tag: " << m_globalTag<< " set from input file" );
791 }
792
793 // now check for tag overrides for specific folders
794 const ITagInfoMgr::NameTagPairVec nameTagPairs = m_h_tagInfoMgr->getInputTags();
795 for (const auto & thisNameTagPair: nameTagPairs) {
796 // assume tags relating to conditions folders start with /
797 if (not refersToConditionsFolder(thisNameTagPair)) continue;
798 // check for folder(s) with this name in (key, ptr) pair
799 for (const auto & thisKeyPtrPair: m_foldermap) {
800 IOVDbFolder* folder=thisKeyPtrPair.second;
801 const std::string& ifname=folder->folderName();
802 if (ifname!=thisNameTagPair.first) continue;
803 // use an override from TagInfo only if there is not an explicit jo tag,
804 // and folder meta-data is not used, and there is no <noover/> spec,
805 // and no global tag set in job options
806 const auto & theTag{thisNameTagPair.second};
807 if (folder->joTag().empty() && !folder->readMeta() && !folder->noOverride() && m_par_globalTag.empty()) {
808 folder->setTagOverride(theTag,false);
809 ATH_MSG_INFO( "TagInfo override for tag " << theTag << " in folder " << ifname );
810 } else if (folder->joTag()!=theTag) {
811 const std::string_view tagTypeString=(folder->joTag().empty()) ? "hierarchical" : "jobOption";
812 ATH_MSG_INFO( "Ignoring inputfile TagInfo request for tag " << theTag << " in folder " << ifname<<" in favour of "<<tagTypeString);
813 }
814 }
815 }
816 return StatusCode::SUCCESS;
817}
static const Attributes_t empty
std::vector< NameTagPair > NameTagPairVec
Definition ITagInfoMgr.h:66

◆ setRange()

StatusCode IOVDbSvc::setRange ( const CLID & clid,
const std::string & dbKey,
const IOVRange & range,
const std::string & tag )
overridevirtual

Set range for a particular data object.

Definition at line 649 of file IOVDbSvc.cxx.

652 {
653 // this method does nothing
654 return StatusCode::SUCCESS;
655}

◆ setupFolders()

StatusCode IOVDbSvc::setupFolders ( )
private

Definition at line 936 of file IOVDbSvc.cxx.

936 {
937 // read the Folders joboptions and setup the folder list
938 // no wildcards are allowed
939
940 // getting the pairs: folder name - CREST tag name:
941 if (m_par_source == "CREST"){
942 m_cresttagmap.clear();
944 }
945
946 //1. Loop through folders
947 std::list<IOVDbParser> allFolderdata;
948 for (const auto & thisFolder : m_par_folders.value()) {
949 ATH_MSG_DEBUG( "Setup folder " << thisFolder );
950 IOVDbParser folderdata(thisFolder,msg());
951 if (!folderdata.isValid()) {
952 ATH_MSG_FATAL("setupFolders: Folder setup string is invalid: " <<thisFolder);
953 return StatusCode::FAILURE;
954 }
955
956 allFolderdata.push_back(std::move(folderdata));
957 }
958
959 //2. Loop through overwrites:
960 // syntax for entries is <prefix>folderpath</prefix> <tag>value</tag>
961 // folderpath matches from left of folderName
962 // but if partial match, next character must be / so override for /Fred/Ji
963 // matches /Fred/Ji/A and /Fred/Ji but not /Fred/Jim
964
965 for (const auto & thisOverrideTag : m_par_overrideTags) {
966 IOVDbParser keys(thisOverrideTag,msg());
967 if (not keys.isValid()){
968 ATH_MSG_ERROR("An override tag was invalid: " << thisOverrideTag);
969 return StatusCode::FAILURE;
970 }
971 std::string prefix;
972 if (!keys.getKey("prefix","",prefix)) { // || !keys.getKey("tag","",tag)) {
973 ATH_MSG_ERROR( "Problem in overrideTag specification " <<thisOverrideTag );
974 return StatusCode::FAILURE;
975 }
976
977 for (auto& folderdata : allFolderdata) {
978 const std::string& ifname=folderdata.folderName();
979 if (ifname.compare(0,prefix.size(), prefix)==0 &&
980 (ifname.size()==prefix.size() || ifname[prefix.size()]=='/')) {
981 //Match!
982 folderdata.applyOverrides(keys,msg());
983 }// end if
984 }// end loop over allFolderdata
985 }// end loop over overrides
986
987 //3. Remove any duplicates:
988 std::list<IOVDbParser>::iterator it1=allFolderdata.begin();
989 std::list<IOVDbParser>::iterator it_e=allFolderdata.end();
990 for (;it1!=it_e;++it1) {
991 const IOVDbParser& folder1=*it1;
992 std::list<IOVDbParser>::iterator it2=it1;
993 ++it2;
994 while(it2!=it_e) {
995 const IOVDbParser& folder2=*it2;
996 if (folder1==folder2) {
997 it2=allFolderdata.erase(it2); //FIXME: Smarter distinction/reporting about same folder but different keys.
998 ATH_MSG_DEBUG( "Removing duplicate folder " << folder1.folderName());
999 } else {
1000 ++it2;
1001 //Catch suspicous cases:
1002 if (folder1.folderName()==folder2.folderName()) {
1003 ATH_MSG_WARNING( "Folder name appears twice: " << folder1.folderName() );
1004 ATH_MSG_WARNING( folder1 << " vs " << folder2 );
1005 }
1006 }
1007 }//end inner loop
1008 }//end outer loop
1009
1010 //4.Set up folder map with cleaned folder list
1011
1012 bool hasError=false;
1013 for (const auto& folderdata : allFolderdata) {
1014 // find the connection specification first - db or dbConnection
1015 // default is to use the 'default' connection
1016 IOVDbConn* conn=nullptr;
1017 std::string connstr;
1018 if (folderdata.getKey("db","",connstr) ||
1019 folderdata.getKey("dbConnection","",connstr)) {
1020 // an explicit database name is specified
1021 // check if it is already present in the existing connections
1022 for (const auto & pThisConnection : m_connections) {
1023 if (pThisConnection->name()==connstr) {
1024 // found existing connection - use that
1025 conn=pThisConnection;
1026 break;
1027 }
1028 }
1029 if (conn==nullptr) {
1030 // create new read-onlyconnection
1031 conn=new IOVDbConn(connstr,true,msg());
1032 m_connections.push_back(conn);
1033 }
1034 } else {
1035 // no connection specified - use default if available
1036 if (!m_par_defaultConnection.empty()) {
1038 } else {
1039 ATH_MSG_FATAL( "Folder request " << folderdata.folderName() <<
1040 " gives no DB connection information and no default set" );
1041 return StatusCode::FAILURE;
1042 }
1043 }
1044
1045 // create the new folder, but only if a folder for this SG key has not
1046 // already been requested
1047
1048 std::string crestTag = "";
1049 if (m_par_source == "CREST"){
1050 crestTag = m_cresttagmap[folderdata.folderName()];
1051 if(crestTag.size()==0 && folderdata.folderName().compare("/TagInfo")!=0){
1052 ATH_MSG_FATAL( "Global Tag "<<m_par_globalTag<<" hasn't folder: " << folderdata.folderName() <<
1053 " in Global Tag Map." );
1054 hasError=true;
1055 continue;
1056 }
1057 }
1058
1059 IOVDbFolder* folder=new IOVDbFolder(conn,folderdata,msg(),&(*m_h_clidSvc), &(*m_h_metaDataTool),
1061 const std::string& key=folder->key();
1062 if (m_foldermap.find(key)==m_foldermap.end()) { //This check is too weak. For POOL-based folders, the SG key is in the folder description (not known at this point).
1064 conn->incUsage();
1065 } else {
1066 ATH_MSG_ERROR( "Duplicate request for folder " <<
1067 folder->folderName() <<
1068 " associated to already requested Storegate key " << key );
1069 // clean up this duplicate request
1070 delete folder;
1071 }
1072 }// end loop over folders
1073 // check for folders to be written to metadata
1074 if(hasError)
1075 return StatusCode::FAILURE;
1076 for (const auto & folderToWrite : m_par_foldersToWrite) {
1077 // match wildcard * at end of string only (i.e. /A/* matches /A/B, /A/C/D)
1078 std::string_view match=folderToWrite;
1079 std::string::size_type idx=folderToWrite.find('*');
1080 if (idx!=std::string::npos) {
1081 match=std::string_view(folderToWrite).substr(0,idx);
1082 }
1083 for (const auto & thisFolder : m_foldermap) {
1084 IOVDbFolder* fptr=thisFolder.second;
1085 if ((fptr->folderName()).compare(0,match.size(), match)==0) {
1086 fptr->setWriteMeta();
1087 ATH_MSG_INFO( "Folder " << fptr->folderName() << " will be written to file metadata" );
1088 }
1089 }//end loop over FolderMap
1090 }//end loop over m_par_foldersToWrite
1091 return StatusCode::SUCCESS;
1092}
static std::map< std::string, std::string > getGlobalTagMap(const std::string &crest_path, const std::string &globaltag)
PublicToolHandle< IIOVDbMetaDataTool > m_h_metaDataTool
Definition IOVDbSvc.h:241
Gaudi::Property< std::vector< std::string > > m_par_overrideTags
Definition IOVDbSvc.h:193
Gaudi::Property< std::vector< std::string > > m_par_folders
Definition IOVDbSvc.h:191
std::map< std::string, std::string > m_cresttagmap
Definition IOVDbSvc.h:226
ServiceHandle< IClassIDSvc > m_h_clidSvc
Definition IOVDbSvc.h:239
Gaudi::Property< std::vector< std::string > > m_par_foldersToWrite
Definition IOVDbSvc.h:195
StringProperty m_par_crestServer
Definition IOVDbSvc.h:224
std::vector< TFile * > fptr
Definition hcg.cxx:51
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:357

◆ signalBeginRun()

StatusCode IOVDbSvc::signalBeginRun ( const IOVTime & beginRunTime,
const EventContext & ctx )
overridevirtual

Set time for begin run.

Definition at line 657 of file IOVDbSvc.cxx.

659{
660 Athena::DBLock dblock;
661
662 // Begin run - set state and save time for later use
664 // Is this a different run compared to the previous call?
665 bool newRun = m_iovTime.isValid() && (m_iovTime.run() != beginRunTime.run());
666 m_iovTime=beginRunTime;
667 // For a MC event, the run number we need to use to look up the conditions
668 // may be different from that of the event itself. Override the run
669 // number with the conditions run number from the event context,
670 // if it is defined.
671 EventIDBase::number_type conditionsRun =
673 if (conditionsRun != EventIDBase::UNDEFNUM) {
674 m_iovTime.setRunEvent (conditionsRun, m_iovTime.event());
675 }
676
677 ATH_MSG_DEBUG( "signalBeginRun> begin run time " << m_iovTime);
678 if (!m_par_onlineMode) {
679 return StatusCode::SUCCESS;
680 }
681
682 // ONLINE mode: allow adding of new calibration constants between runs
683 if (!newRun) {
684 ATH_MSG_DEBUG( "Same run as previous signalBeginRun call. Skipping re-loading of folders..." );
685 return StatusCode::SUCCESS;
686 }
687
688 // all other stuff is event based so happens after this.
689 // this is before first event of each run
690 ATH_MSG_DEBUG( "In online mode will recheck ... " );
691 ATH_MSG_DEBUG( "First reload PoolCataloge ... " );
692
693 pool::IFileCatalog* catalog ATLAS_THREAD_SAFE = // we are not within the event loop yet
694 const_cast<pool::IFileCatalog*>(m_h_poolSvc->catalog());
695 catalog->commit();
696 catalog->start();
697
698 for (const auto & pThisConnection : m_connections){
699 // only access connections which are actually in use - avoids waking up
700 // the default DB connection if it is not being used
701 if (pThisConnection->nFolders()>0) {
702 //request for database activates connection
703 cool::IDatabasePtr dbconn=pThisConnection->getCoolDb();
704 if (dbconn.get()==nullptr) {
705 ATH_MSG_FATAL( "Conditions database connection " << pThisConnection->name() << " cannot be opened - STOP" );
706 return StatusCode::FAILURE;
707 }
708 for (const auto & thisNamePtrPair: m_foldermap) {
709 IOVDbFolder* folder=thisNamePtrPair.second;
710 if (folder->conn()!=pThisConnection) continue;
711 folder->printCache();
712 cool::ValidityKey vkey=folder->iovTime(m_iovTime);
713 {
714 Gaudi::Guards::AuditorGuard auditor(std::string("FldrCache:")+folder->folderName(), auditorSvc(), "preLoadProxy");
715 if (!folder->loadCacheIfDbChanged(vkey, m_globalTag, dbconn, m_h_IOVSvc)) {
716 ATH_MSG_ERROR( "Problem RELOADING: " << folder->folderName());
717 return StatusCode::FAILURE;
718 }
719 }
720 folder->printCache();
721 }
722 }
723 if (m_par_manageConnections) pThisConnection->setInactive();
724 }
725 return StatusCode::SUCCESS;
726}
#define ATLAS_THREAD_SAFE
EventIDBase::number_type conditionsRun() const
uint32_t run() const noexcept
Definition IOVTime.h:105
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.

◆ signalEndProxyPreload()

void IOVDbSvc::signalEndProxyPreload ( )
overridevirtual

Signal that callback has been fired.

Definition at line 728 of file IOVDbSvc.cxx.

728 {
729 // this method does nothing
730}

◆ updateAddress()

StatusCode IOVDbSvc::updateAddress ( StoreID::type storeID,
SG::TransientAddress * tad,
const EventContext & ctx )
overridevirtual

Update a transient Address.

Definition at line 448 of file IOVDbSvc.cxx.

450{
451 // Provide TAD and associated range, actually reading the conditions data
452
453 // Read information for folders and setup TADs
454 if (storeID!=StoreID::DETECTOR_STORE) return StatusCode::FAILURE;
455 Gaudi::Guards::AuditorGuard auditor(std::string("UpdateAddr::")+(tad->name().empty() ? "anonymous" : tad->name()),
456 auditorSvc(), "preLoadProxy");
457
458 IOVTime iovTime{m_iovTime};
459 IOVRange range;
460 std::unique_ptr<IOpaqueAddress> address;
461
462 // first check if this key is managed by IOVDbSvc
463 // return FAILURE if not - this allows other AddressProviders to be
464 // asked for the TAD
465 const std::string& key=tad->name();
466 FolderMap::const_iterator fitr=m_foldermap.find(key);
467 if (fitr==m_foldermap.end()) {
469 "updateAddress cannot find description for TAD " << key );
470 return StatusCode::FAILURE;
471 }
472 IOVDbFolder* folder=fitr->second;
473 if (folder->clid()!=tad->clID()) {
474 ATH_MSG_VERBOSE( "CLID for TAD " << key << " is " << tad->clID()
475 << " but expecting " << folder->clid() );
476
477 return StatusCode::FAILURE;
478 }
479
480 // IOVDbSvc will satisfy the request, using already found folder
481 // now determine the current IOVTime
482 if (m_state==IOVDbSvc::INITIALIZATION && !m_iovTime.isValid()) {
483 ATH_MSG_DEBUG( "updateAddress: in initialisation phase and no iovTime defined" );
484 return::StatusCode::SUCCESS;
485 }
487 // determine iovTime from eventID in the event context
488 const EventIDBase* evid = EventIDFromStore( m_h_sgSvc );
489 if( evid ) {
490 iovTime.setRunEvent( evid->run_number(), evid->lumi_block()) ;
491 // save both seconds and ns offset for timestamp
492 uint64_t nsTime = evid->time_stamp() *1000000000LL;
493 nsTime += evid->time_stamp_ns_offset();
494 iovTime.setTimestamp(nsTime);
495 m_iovTime = iovTime;
496 ATH_MSG_DEBUG( "updateAddress - using iovTime from EventInfo: " << iovTime);
497 } else {
498 // failed to get event info - just return success
499 ATH_MSG_DEBUG( "Could not get event - initialise phase");
500 return StatusCode::SUCCESS;
501 }
502 } else {
503 ATH_MSG_DEBUG("updateAddress: using iovTime from init/beginRun: " << iovTime);
504 }
505
506
507
508 // obtain the validity key for this folder (includes overrides)
509 cool::ValidityKey vkey=folder->iovTime(iovTime);
510 {
511 // The dblock is currently abused to also protect the cache in the IOVDbFolders.
512 // This global lock may give rise to deadlocks between the dblock and the internal lock
513 // of the SGImplSvc. The deadlock may arise if the order of the initial call to IOVDbSvc
514 // and SGImplSvc are different, because the two services call each other.
515 // A problem was observed when SG::DataProxy::isValidAddress first called IOVDbSvc::updateAddress
516 // which called IOVSvc::setRange then SGImplSvc::proxy, and at the same time
517 // StoreGateSvc::contains called first SGImplSvc::proxy which then called IOVDbSvc::updateAddress.
518 // This problem is mitigated by limiting the scope of the dblock here.
519 Athena::DBLock dblock;
520 ATH_MSG_DEBUG("Validity key "<<vkey);
521 if (!folder->readMeta() && !folder->cacheValid(vkey)) {
522 // mark this folder as not-dropped so cache-read will succeed
523 folder->setDropped(false);
524 // reload cache for this folder (and all others sharing this DB connection)
525 ATH_MSG_DEBUG( "Triggering cache load for folder " << folder->folderName());
526 if (StatusCode::SUCCESS!=loadCaches(folder->conn())) {
527 ATH_MSG_ERROR( "Cache load failed for at least one folder from " << folder->conn()->name()
528 << ". You may see errors from other folders sharing the same connection." );
529 return StatusCode::FAILURE;
530 }
531 }
532
533 // data should now be in cache
534 // setup address and range
535 {
536 Gaudi::Guards::AuditorGuard auditor(std::string("FldrSetup:")+(tad->name().empty() ? "anonymous" : tad->name()),
537 auditorSvc(), "preLoadProxy");
538 if (!folder->getAddress(vkey,&(*m_h_persSvc),poolSvcContext(),address,
539 range,m_poolPayloadRequested)) {
540 ATH_MSG_ERROR( "getAddress failed for folder " << folder->folderName() );
541 return StatusCode::FAILURE;
542 }
543 }
544 // reduce minimum IOV of timestamp folders to avoid 'thrashing'
545 // due to events slightly out of order in HLT
546 if (folder->timeStamp()) {
547 cool::ValidityKey start=range.start().timestamp();
548 if (start>m_iovslop) start-=m_iovslop;
549 range=IOVRange(IOVTime(start),range.stop());
550 }
551 }
552
553 // Pass range onto IOVSvc
554 if (StatusCode::SUCCESS!=m_h_IOVSvc->setRange(tad->clID(),tad->name(),
555 range,folder->eventStore())) {
556 ATH_MSG_ERROR( "setRange failed for folder " << folder->folderName() );
557 return StatusCode::FAILURE;
558 }
559 tad->setAddress(address.release());
560 return StatusCode::SUCCESS;
561}
const EventIDBase * EventIDFromStore(IProxyDict *store)
Retrieve the EventID from EventContext saved in store STORE.
void setRunEvent(uint32_t run, uint32_t event) noexcept
Definition IOVTime.cxx:96
CLID clID() const
Retrieve string key:
const std::string & name() const
Get the primary (hashed) SG key.
void setAddress(CxxUtils::RefCountedPtr< IOpaqueAddress > pAddress)
Retrieve primary clid.

Member Data Documentation

◆ m_abort

bool IOVDbSvc::m_abort {false}
private

Definition at line 283 of file IOVDbSvc.h.

283{false};

◆ m_connections

ConnVec IOVDbSvc::m_connections
private

Definition at line 278 of file IOVDbSvc.h.

◆ m_crestCoolToFile

BooleanProperty IOVDbSvc::m_crestCoolToFile {this,"CrestCoolToFile",false,"output to file crest or cool data in the same format for debugging purposes"}
private

Definition at line 231 of file IOVDbSvc.h.

231{this,"CrestCoolToFile",false,"output to file crest or cool data in the same format for debugging purposes"};

◆ m_cresttagmap

std::map<std::string, std::string> IOVDbSvc::m_cresttagmap
private

Definition at line 226 of file IOVDbSvc.h.

◆ m_foldermap

FolderMap IOVDbSvc::m_foldermap
private

Definition at line 281 of file IOVDbSvc.h.

◆ m_globalTag

std::string IOVDbSvc::m_globalTag {}
private

Definition at line 271 of file IOVDbSvc.h.

271{};

◆ m_h_clidSvc

ServiceHandle<IClassIDSvc> IOVDbSvc::m_h_clidSvc {this,"ClassIDSvc","ClassIDSvc"}
private

Definition at line 239 of file IOVDbSvc.h.

239{this,"ClassIDSvc","ClassIDSvc"};

◆ m_h_detStore

ServiceHandle<StoreGateSvc> IOVDbSvc::m_h_detStore {this,"DetectorStore","DetectorStore"}
private

Definition at line 236 of file IOVDbSvc.h.

236{this,"DetectorStore","DetectorStore"};

◆ m_h_IOVSvc

ServiceHandle<IIOVSvc> IOVDbSvc::m_h_IOVSvc {this,"IOVSvc","IOVSvc"}
private

Definition at line 234 of file IOVDbSvc.h.

234{this,"IOVSvc","IOVSvc"};

◆ m_h_metaDataStore

ServiceHandle<StoreGateSvc> IOVDbSvc::m_h_metaDataStore {this,"MetaDataStore","StoreGateSvc/MetaDataStore"}
private

Definition at line 237 of file IOVDbSvc.h.

237{this,"MetaDataStore","StoreGateSvc/MetaDataStore"};

◆ m_h_metaDataTool

PublicToolHandle<IIOVDbMetaDataTool> IOVDbSvc::m_h_metaDataTool {this,"IOVDbMetaDataTool","IOVDbMetaDataTool"}
private

Definition at line 241 of file IOVDbSvc.h.

241{this,"IOVDbMetaDataTool","IOVDbMetaDataTool"};

◆ m_h_persSvc

ServiceHandle<IAddressCreator> IOVDbSvc::m_h_persSvc {this,"EventPersistencySvc","EventPersistencySvc"}
private

Definition at line 238 of file IOVDbSvc.h.

238{this,"EventPersistencySvc","EventPersistencySvc"};

◆ m_h_poolSvc

ServiceHandle<IPoolSvc> IOVDbSvc::m_h_poolSvc {this,"PoolSvc","PoolSvc"}
private

Definition at line 240 of file IOVDbSvc.h.

240{this,"PoolSvc","PoolSvc"};

◆ m_h_sgSvc

ServiceHandle<StoreGateSvc> IOVDbSvc::m_h_sgSvc {this,"StoreGateSvc","StoreGateSvc"}
private

Definition at line 235 of file IOVDbSvc.h.

235{this,"StoreGateSvc","StoreGateSvc"};

◆ m_h_tagInfoMgr

ServiceHandle<ITagInfoMgr> IOVDbSvc::m_h_tagInfoMgr {this,"TagInfoMgr","TagInfoMgr"}
private

Definition at line 242 of file IOVDbSvc.h.

242{this,"TagInfoMgr","TagInfoMgr"};

◆ m_iovslop

cool::ValidityKey IOVDbSvc::m_iovslop {}
private

Definition at line 274 of file IOVDbSvc.h.

274{};

◆ m_iovTime

IOVTime IOVDbSvc::m_iovTime {}
private

Definition at line 268 of file IOVDbSvc.h.

268{};

◆ m_outputToFile

BooleanProperty IOVDbSvc::m_outputToFile {this,"OutputToFile",false,"output to file for debugging purposes"}
private

Definition at line 230 of file IOVDbSvc.h.

230{this,"OutputToFile",false,"output to file for debugging purposes"};

◆ m_par_cacheAlign

UnsignedIntegerProperty IOVDbSvc::m_par_cacheAlign {this,"CacheAlign",0,"cache alignment - divide cache into N slices and align queries on slice"}
private

Definition at line 216 of file IOVDbSvc.h.

216{this,"CacheAlign",0,"cache alignment - divide cache into N slices and align queries on slice"};

◆ m_par_cacheRun

IntegerProperty IOVDbSvc::m_par_cacheRun {this,"CacheRun",0,"force larger numbers of runs to be cached"}
private

Definition at line 211 of file IOVDbSvc.h.

211{this,"CacheRun",0,"force larger numbers of runs to be cached"};

◆ m_par_cacheTime

IntegerProperty IOVDbSvc::m_par_cacheTime {this,"CacheTime",0,"force larger timeranges to be cached (seconds)"}
private

Definition at line 213 of file IOVDbSvc.h.

213{this,"CacheTime",0,"force larger timeranges to be cached (seconds)"};

◆ m_par_checklock

BooleanProperty IOVDbSvc::m_par_checklock {this,"CheckLock",false,"check to ensure global/HVS tags are locked (for production)"}
private

Definition at line 220 of file IOVDbSvc.h.

220{this,"CheckLock",false,"check to ensure global/HVS tags are locked (for production)"};

◆ m_par_crestServer

StringProperty IOVDbSvc::m_par_crestServer {this,"crestServer","https://crest.cern.ch","CREST URL with the port number as a string (default https://crest.cern.ch)"}
private

Definition at line 224 of file IOVDbSvc.h.

224{this,"crestServer","https://crest.cern.ch","CREST URL with the port number as a string (default https://crest.cern.ch)"};

◆ m_par_dbinst

Gaudi::Property<std::string> IOVDbSvc::m_par_dbinst {this,"DBInstance","","Database instance (like OFLP200)"}
private

Definition at line 189 of file IOVDbSvc.h.

189{this,"DBInstance","","Database instance (like OFLP200)"};

◆ m_par_defaultConnection

Gaudi::Property<std::string> IOVDbSvc::m_par_defaultConnection {this,"dbConnection","sqlite://;schema=cooldummy.db;dbname=OFLP200","default DB connection string"}
private

Definition at line 185 of file IOVDbSvc.h.

185{this,"dbConnection","sqlite://;schema=cooldummy.db;dbname=OFLP200","default DB connection string"};

◆ m_par_folders

Gaudi::Property<std::vector<std::string> > IOVDbSvc::m_par_folders {this,"Folders",{},"List of database folders to preload","OrderedSet<std::string>"}
private

Definition at line 191 of file IOVDbSvc.h.

191{this,"Folders",{},"List of database folders to preload","OrderedSet<std::string>"};

◆ m_par_foldersToWrite

Gaudi::Property<std::vector<std::string> > IOVDbSvc::m_par_foldersToWrite {this,"FoldersToMetaData",{},"list of folders to write to file meta data","OrderedSet<std::string>"}
private

Definition at line 195 of file IOVDbSvc.h.

195{this,"FoldersToMetaData",{},"list of folders to write to file meta data","OrderedSet<std::string>"};

◆ m_par_forceLumiblockNumber

IntegerProperty IOVDbSvc::m_par_forceLumiblockNumber {this,"forceLumiblockNumber",0,"globally force LB-number (default: no force)"}
private

Definition at line 203 of file IOVDbSvc.h.

203{this,"forceLumiblockNumber",0,"globally force LB-number (default: no force)"};

◆ m_par_forceRunNumber

IntegerProperty IOVDbSvc::m_par_forceRunNumber {this,"forceRunNumber",0,"globally force run-number (default: no force)"}
private

Definition at line 201 of file IOVDbSvc.h.

201{this,"forceRunNumber",0,"globally force run-number (default: no force)"};

◆ m_par_forceTimestamp

IntegerProperty IOVDbSvc::m_par_forceTimestamp {this,"forceTimeStamp",0,"globally force time-stamp (default: no force)"}
private

Definition at line 205 of file IOVDbSvc.h.

205{this,"forceTimeStamp",0,"globally force time-stamp (default: no force)"};

◆ m_par_format

StringProperty IOVDbSvc::m_par_format {this,"Format",{},"Format of data; default is empty string (default for a given source)"}
private

Definition at line 228 of file IOVDbSvc.h.

228{this,"Format",{},"Format of data; default is empty string (default for a given source)"};

◆ m_par_globalTag

Gaudi::Property<std::string> IOVDbSvc::m_par_globalTag {this,"GlobalTag","","Global database tag"}
private

Definition at line 187 of file IOVDbSvc.h.

187{this,"GlobalTag","","Global database tag"};

◆ m_par_manageConnections

BooleanProperty IOVDbSvc::m_par_manageConnections {this,"ManageConnections",true,"flag to trigger the connections management"}
private

Definition at line 197 of file IOVDbSvc.h.

197{this,"ManageConnections",true,"flag to trigger the connections management"};

◆ m_par_managePoolConnections

BooleanProperty IOVDbSvc::m_par_managePoolConnections {this,"ManagePoolConnections",true,"flag to manage pool connections"}
private

Definition at line 199 of file IOVDbSvc.h.

199{this,"ManagePoolConnections",true,"flag to manage pool connections"};

◆ m_par_maxNumPoolFiles

IntegerProperty IOVDbSvc::m_par_maxNumPoolFiles {this,"MaxPoolFilesOpen",5,"max number of pool files open allowed (0 means no limit)"}
private

Definition at line 207 of file IOVDbSvc.h.

207{this,"MaxPoolFilesOpen",5,"max number of pool files open allowed (0 means no limit)"};

◆ m_par_onlineMode

BooleanProperty IOVDbSvc::m_par_onlineMode {this,"OnlineMode",false,"online mode flag to ignore missing channels outside cache range"}
private

Definition at line 218 of file IOVDbSvc.h.

218{this,"OnlineMode",false,"online mode flag to ignore missing channels outside cache range"};

◆ m_par_overrideTags

Gaudi::Property<std::vector<std::string> > IOVDbSvc::m_par_overrideTags {this,"overrideTags",{},"List of xml-modifiers for folders like <prefix>/My/Folder</prefix><tag>MyFolderTag</tag>","OrderedSet<std::string>"}
private

Definition at line 193 of file IOVDbSvc.h.

193{this,"overrideTags",{},"List of xml-modifiers for folders like <prefix>/My/Folder</prefix><tag>MyFolderTag</tag>","OrderedSet<std::string>"};

◆ m_par_source

StringProperty IOVDbSvc::m_par_source {this,"Source","COOL_DATABASE","source of data as a string (default COOL_DATABASE)"}
private

Definition at line 222 of file IOVDbSvc.h.

222{this,"Source","COOL_DATABASE","source of data as a string (default COOL_DATABASE)"};

◆ m_par_timeStampSlop

FloatProperty IOVDbSvc::m_par_timeStampSlop {this,"TimeStampSlop",0.0,"backdata timestamp IOVs by this many seconds"}
private

Definition at line 209 of file IOVDbSvc.h.

209{this,"TimeStampSlop",0.0,"backdata timestamp IOVs by this many seconds"};

◆ m_poolPayloadRequested

bool IOVDbSvc::m_poolPayloadRequested {false}
private

Definition at line 247 of file IOVDbSvc.h.

247{false};

◆ m_poolSvcContext

int IOVDbSvc::m_poolSvcContext {-1}
private

Definition at line 251 of file IOVDbSvc.h.

251{-1};

◆ m_state

IOVDbSvc_state IOVDbSvc::m_state {INITIALIZATION}
private

Definition at line 265 of file IOVDbSvc.h.


The documentation for this class was generated from the following files: