ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
IOVDbSvc Class Reference

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. More...

#include <IOVDbSvc.h>

Inheritance diagram for IOVDbSvc:
Collaboration diagram for IOVDbSvc:

Classes

class  SvcFactory
 

Public Types

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

Public Member Functions

virtual ~IOVDbSvc ()
 
virtual StatusCode initialize () override
 Service init. More...
 
StatusCode io_reinit () override final
 
virtual StatusCode finalize () override
 Service finalize. More...
 
StatusCode io_finalize () override final
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface) override
 Query the interfaces. More...
 
virtual cool::IDatabasePtr getDatabase (bool readOnly) override
 Access to COOL database for a given folder. More...
 
 DeclareInterfaceID (IAddressProvider, 1, 0)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
Address use
virtual StatusCode preLoadAddresses (StoreID::type storeID, tadList &list) override
 Get all addresses that the provider wants to preload in SG maps. More...
 
virtual StatusCode loadAddresses (StoreID::type storeID, tadList &list) override
 Get all new addresses from Provider for this Event. More...
 
virtual StatusCode updateAddress (StoreID::type storeID, SG::TransientAddress *tad, const EventContext &ctx) override
 Update a transient Address. More...
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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 foolder-tag overrides","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","http://crest-undertow-api.web.cern.ch","CREST URL with the port number as a string (default http://crest-undertow-api.web.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_crestToFile {this,"CrestToFile",false,"output to file crest data 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. More...
 
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. More...
 
virtual StatusCode signalBeginRun (const IOVTime &beginRunTime, const EventContext &ctx) override
 Set time for begin run. More...
 
virtual void signalEndProxyPreload () override
 Signal that callback has been fired. More...
 
virtual void postConditionsLoad () override
 May be called once conditions are loaded to let IOVDbSvc release resources. More...
 
virtual void handle (const Incident &incident) override
 Incident service handle for EndEvent. More...
 
virtual StatusCode processTagInfo () override
 Process TagInfo. More...
 
virtual std::vector< std::string > getKeyList () override
 return list of SG keys being provided by IOVDbSvc More...
 
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. More...
 
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 77 of file IOVDbSvc.h.

Member Typedef Documentation

◆ ConnVec

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

Definition at line 286 of file IOVDbSvc.h.

◆ FolderMap

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

Definition at line 289 of file IOVDbSvc.h.

◆ tadList

Definition at line 110 of file IOVDbSvc.h.

◆ tadListIterator

Definition at line 111 of file IOVDbSvc.h.

Member Enumeration Documentation

◆ IOVDbSvc_state

Enumerator
INITIALIZATION 
BEGIN_RUN 
EVENT_LOOP 
FINALIZE_ALG 

Definition at line 268 of file IOVDbSvc.h.

268  {
269  INITIALIZATION = 0,
270  BEGIN_RUN,
271  EVENT_LOOP,
273  };

Constructor & Destructor Documentation

◆ ~IOVDbSvc()

IOVDbSvc::~IOVDbSvc ( )
virtualdefault

Member Function Documentation

◆ checkConfigConsistency()

StatusCode IOVDbSvc::checkConfigConsistency ( ) const
private

Definition at line 1177 of file IOVDbSvc.cxx.

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

◆ checkEventSel()

StatusCode IOVDbSvc::checkEventSel ( )
private

Definition at line 886 of file IOVDbSvc.cxx.

886  {
887  // check if EventSelector is being used to override run numbers
888  // if so, we can set IOV time already to allow conditons retrieval
889  // in the initialise phase, needed for setting up simulation
890 
891  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> joSvc("JobOptionsSvc",name());
892  ATH_CHECK( joSvc.retrieve() );
893 
894  if (!joSvc->has("EventSelector.OverrideRunNumber")) {
895  // do not return FAILURE if the EventSelector cannot be found, or it has
896  // no override property, can e.g. happen in online running
897  ATH_MSG_DEBUG( "No EventSelector.OverrideRunNumber property found" );
898  return StatusCode::SUCCESS;
899  }
900 
901  BooleanProperty bprop("OverrideRunNumber",false);
902  ATH_CHECK( bprop.fromString(joSvc->get("EventSelector.OverrideRunNumber")) );
903  if (bprop.value()) {
904  // if flag is set, extract Run,LB and time
905  ATH_MSG_INFO( "Setting run/LB/time from EventSelector override in initialize" );
906  uint32_t run,lumib;
907  uint64_t time;
908  bool allGood=true;
909  if (m_par_forceRunNumber.value()!=0 ||
910  m_par_forceLumiblockNumber.value()!=0)
911  ATH_MSG_WARNING( "forceRunNumber property also set" );
912  IntegerProperty iprop1("RunNumber",0);
913  if (iprop1.fromString(joSvc->get("EventSelector.RunNumber","INVALID"))) {
914  run=iprop1.value();
915  } else {
916  ATH_MSG_ERROR( "Unable to get RunNumber from EventSelector");
917  allGood=false;
918  }
919  IntegerProperty iprop2("FirstLB",0);
920  if (iprop2.fromString(joSvc->get("EventSelector.FirstLB","INVALID"))) {
921  lumib=iprop2.value();
922  } else {
923  ATH_MSG_ERROR( "Unable to get FirstLB from EventSelector");
924  allGood=false;
925  }
926  IntegerProperty iprop3("InitialTimeStamp",0);
927  if (iprop3.fromString(joSvc->get("EventSelector.InitialTimeStamp","INVALID"))) {
928  time=iprop3.value();
929  } else {
930  ATH_MSG_ERROR("Unable to get InitialTimeStamp from EventSelector" );
931  allGood=false;
932  }
933  if (allGood) {
934  m_iovTime.setRunEvent(run,lumib);
935  uint64_t nsTime=time*1000000000LL;
936  m_iovTime.setTimestamp(nsTime);
937  ATH_MSG_INFO( "run/LB/time set to [" << run << "," << lumib << " : " << nsTime << "]" );
938  } else {
939  ATH_MSG_ERROR( "run/LB/Time NOT changed" );
940  }
941  }
942 
943  return StatusCode::SUCCESS;
944 }

◆ DeclareInterfaceID()

IAddressProvider::DeclareInterfaceID ( IAddressProvider  ,
,
 
)
inherited

◆ dropObject()

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

Implements IIOVDbSvc.

Definition at line 858 of file IOVDbSvc.cxx.

858  {
859  // find the folder corresponding to this object
860  FolderMap::const_iterator itr=m_foldermap.find(key);
861  if (itr!=m_foldermap.end()) {
862  IOVDbFolder* folder=itr->second;
863  CLID clid=folder->clid();
864  SG::DataProxy* proxy=m_h_detStore->proxy(clid,key);
865  if (proxy!=nullptr) {
866  m_h_detStore->clearProxyPayload(proxy);
867  ATH_MSG_DEBUG("Dropped payload for key " << key );
868  folder->setDropped(true);
869  if (resetCache) {
870  folder->resetCache();
871  ATH_MSG_DEBUG( "Cache reset done for folder " << folder->folderName() );
872  }
873  return true;
874  } else {
875  return false;
876  }
877  } else {
878  return false;
879  }
880 }

◆ fillTagInfo()

StatusCode IOVDbSvc::fillTagInfo ( )
private

Definition at line 1096 of file IOVDbSvc.cxx.

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

◆ finalize()

StatusCode IOVDbSvc::finalize ( )
overridevirtual

Service finalize.

Definition at line 272 of file IOVDbSvc.cxx.

272  {
273  // summarise and delete folders, adding total read from COOL
274  float readtime=0.;
275  // accumulate a map of readtime by connection
276  typedef std::map<IOVDbConn*,float> CTMap;
277  CTMap ctmap;
278  for (const auto & namePtrPair : m_foldermap) {
279  IOVDbFolder* folder=namePtrPair.second;
280  folder->summary();
281  const float& fread=folder->readTime();
282  readtime+=fread;
283  IOVDbConn* cptr=folder->conn();
284  CTMap::iterator citr=ctmap.find(cptr);
285  if (citr!=ctmap.end()) {
286  (citr->second)+=fread;
287  } else {
288  ctmap.insert(CTMap::value_type(cptr,fread));
289  }
290  delete folder;
291  }
292  ATH_MSG_INFO( " bytes in (( " << std::fixed << std::setw(9) << std::setprecision(2) <<
293  readtime << " ))s" );
294 
295  // close and delete connections, printing time in each one
296  for (auto & pThisConnection : m_connections) {
297  float fread=0;
298  CTMap::iterator citr=ctmap.find(pThisConnection);
299  if (citr!=ctmap.end()) fread=citr->second;
300  pThisConnection->setInactive();
301  pThisConnection->summary(fread);
302  delete pThisConnection;
303  }
304  // finally remove the msg svc
305  //delete m_log;
306  return AthService::finalize();
307 }

◆ getDatabase()

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

Access to COOL database for a given folder.

Implements IIOVCondDbSvc.

Definition at line 309 of file IOVDbSvc.cxx.

309  {
310  // get default database connection
311  cool::IDatabasePtr dbconn;
312  if (m_par_defaultConnection.empty() || m_connections.empty()) {
313  ATH_MSG_INFO( "No default COOL database connection is available");
314  dbconn.reset();
315  } else {
316  Athena::DBLock dblock;
317  if (m_connections[0]->isReadOnly()!=readOnly) {
318  ATH_MSG_INFO("Changing state of default connection to readonly=" << readOnly );
319  m_connections[0]->setReadOnly(readOnly);
320  }
321  dbconn = std::make_shared<LockedDatabase> (m_connections[0]->getCoolDb(),
322  dblock);
323  }
324  return dbconn;
325 }

◆ 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.

Implements IIOVDbSvc.

Definition at line 838 of file IOVDbSvc.cxx.

838  {
839  // return information about given SG key
840  // first attempt to find the folder object for this key
841  FolderMap::const_iterator itr = m_foldermap.find(key);
842  if (itr!=m_foldermap.end()) {
843  const IOVDbFolder* f=itr->second;
844  info.folderName = f->folderName();
845  info.tag = f->resolvedTag();
846  info.range = f->currentRange();
847  info.retrieved = f->retrieved();
848  info.bytesRead = f->bytesRead();
849  info.readTime = f->readTime();
850  info.extensible = f->extensible();
851  return true;
852  } else {
853  info.retrieved = false;
854  return false;
855  }
856 }

◆ getKeyList()

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

return list of SG keys being provided by IOVDbSvc

Implements IIOVDbSvc.

Definition at line 830 of file IOVDbSvc.cxx.

830  {
831  // return a list of all the StoreGate keys being managed by IOVDbSvc
832  std::vector<std::string> keys;
833  keys.reserve(m_foldermap.size());
834  std::for_each(m_foldermap.begin(),m_foldermap.end(), [&keys](const auto &i){keys.emplace_back(i.first);});
835  return keys;
836 }

◆ 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.

Implements IIOVDbSvc.

Definition at line 576 of file IOVDbSvc.cxx.

581  {
582 
583  Athena::DBLock dblock;
584 
585  ATH_MSG_DEBUG( "getRange clid: " << clid << " key: \""<< dbKey << "\" t: " << time );
586  const std::string& key=dbKey;
587  FolderMap::const_iterator fitr=m_foldermap.find(key);
588  if (fitr==m_foldermap.end()) {
589  ATH_MSG_VERBOSE("getRange cannot find description for dbKey " << key );
590  return StatusCode::FAILURE;
591  }
592  IOVDbFolder* folder=fitr->second;
593  if (folder->clid()!=clid) {
594  ATH_MSG_VERBOSE( "supplied CLID for " << key << " is "
595  << clid
596  << " but expecting " << folder->clid() );
597 
598  return StatusCode::FAILURE;
599  }
600 
601  tag = folder->key();
602 
603  // obtain the validity key for this folder (includes overrides)
604  cool::ValidityKey vkey=folder->iovTime(time);
605  if (!folder->readMeta() && !folder->cacheValid(vkey)) {
606  // mark this folder as not-dropped so cache-read will succeed
607  folder->setDropped(false);
608  // reload cache for this folder (and all others sharing this DB connection)
609  ATH_MSG_DEBUG( "Triggering cache load for folder " << folder->folderName() );
610  if (StatusCode::SUCCESS!=loadCaches(folder->conn(),&time)) {
611  ATH_MSG_ERROR( "Cache load failed for at least one folder from " << folder->conn()->name()
612  << ". You may see errors from other folders sharing the same connection." );
613  return StatusCode::FAILURE;
614  }
615  }
616 
617  // data should now be in cache
618  address.reset();
619  // setup address and range
620  {
621  Gaudi::Guards::AuditorGuard auditor(std::string("FldrSetup:")+(key.empty() ? "anonymous" : key),
622  auditorSvc(), "preLoadProxy");
623  if (!folder->getAddress(vkey,&(*m_h_persSvc),poolSvcContext(),address,
625  ATH_MSG_ERROR("getAddress failed for folder " <<folder->folderName() );
626  return StatusCode::FAILURE;
627  }
628  }
629 
630  // Special handling for extensible folders:
631  if (folder->extensible()) {
632  // Set the end time to just past the current event or lumiblock.
633  IOVTime extStop = range.stop();
634  if (folder->timeStamp()) {
635  extStop.setTimestamp (time.timestamp() + 1);
636  }
637  else {
638  extStop.setRETime (time.re_time() + 1);
639  }
640  range = IOVRange (range.start(), extStop);
641  }
642 
643  // Special handling for IOV override: set the infinite validity range
644  if (folder->iovOverridden()) {
645  if (folder->timeStamp()) {
648  }
649  else {
652  }
653  }
654 
655  return StatusCode::SUCCESS;
656 }

◆ handle()

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

Incident service handle for EndEvent.

Definition at line 768 of file IOVDbSvc.cxx.

768  {
769  // Handle incidents:
770  // BeginEvent to set IOVDbSvc state to EVENT_LOOP
771  // StoreCleared/EndProcessing to close any open POOL files
772  ATH_MSG_VERBOSE( "entering handle(), incident type " << inc.type() << " from " << inc.source() );
773  if (inc.type()=="BeginEvent") {
775  } else {
776  Athena::DBLock dblock;
777 
778  const StoreClearedIncident* sinc = dynamic_cast<const StoreClearedIncident*>(&inc);
779  if( (inc.type()=="StoreCleared" && sinc!=nullptr && sinc->store()==&*m_h_sgSvc)
780  or inc.type()==IncidentType::EndProcessing )
781  {
784  }
785  }
786 }

◆ initialize()

StatusCode IOVDbSvc::initialize ( )
overridevirtual

Service init.

Definition at line 173 of file IOVDbSvc.cxx.

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

◆ interfaceID()

static const InterfaceID& IOVDbSvc::interfaceID ( )
static

◆ io_finalize()

StatusCode IOVDbSvc::io_finalize ( )
finaloverride

Definition at line 267 of file IOVDbSvc.cxx.

267  {
268  ATH_MSG_DEBUG("I/O finalization...");
269  return(StatusCode::SUCCESS);
270 }

◆ io_reinit()

StatusCode IOVDbSvc::io_reinit ( )
finaloverride

Definition at line 260 of file IOVDbSvc.cxx.

260  {
261  ATH_MSG_DEBUG("I/O reinitialization...");
262  // PoolSvc clears all connections on IO_reinit - forget the stored contextId
263  m_poolSvcContext = -1;
264  return(StatusCode::SUCCESS);
265 }

◆ loadAddresses()

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

Get all new addresses from Provider for this Event.

Reimplemented from IAddressProvider.

Definition at line 453 of file IOVDbSvc.cxx.

453  {
454  // this method does nothing
455  return StatusCode::SUCCESS;
456 }

◆ loadCaches()

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

Definition at line 1131 of file IOVDbSvc.cxx.

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

◆ msg() [1/2]

MsgStream& AthCommonMsg< Service >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Service >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Service >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ poolSvcContext()

int IOVDbSvc::poolSvcContext ( )
private

Definition at line 154 of file IOVDbSvc.cxx.

155 {
156  if( m_poolSvcContext < 0 ) {
157  // Get context for POOL conditions files, and created an initial connection
159  m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions", m_par_maxNumPoolFiles);
160  } else {
161  m_poolSvcContext=m_h_poolSvc->getInputContext("Conditions");
162  }
163  if( m_h_poolSvc->connect(pool::ITransaction::READ, m_poolSvcContext).isSuccess() ) {
164  ATH_MSG_INFO( "Opened read transaction for POOL PersistencySvc");
165  } else {
166  // We only emit info for failure to connect (for the moment? RDS 01/2008)
167  ATH_MSG_INFO( "Cannot connect to POOL PersistencySvc" );
168  }
169  }
170  return m_poolSvcContext;
171 }

◆ postConditionsLoad()

void IOVDbSvc::postConditionsLoad ( )
overridevirtual

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

Implements IIOVDbSvc.

Definition at line 743 of file IOVDbSvc.cxx.

743  {
744  // Close any open POOL files after loding Conditions
745  ATH_MSG_DEBUG( "postConditionsLoad: m_par_managePoolConnections=" << m_par_managePoolConnections
746  << " m_poolPayloadRequested=" << m_poolPayloadRequested );
747 
749  // reset POOL connection to close all open conditions POOL files
750  m_par_managePoolConnections.set(false);
752  if( m_poolSvcContext ) {
753  if (StatusCode::SUCCESS==m_h_poolSvc->disconnect(m_poolSvcContext)) {
754  ATH_MSG_DEBUG( "Successfully closed input POOL connections");
755  } else {
756  ATH_MSG_WARNING( "Unable to close input POOL connections" );
757  }
758  // reopen transaction
759  if (StatusCode::SUCCESS==m_h_poolSvc->connect(pool::ITransaction::READ, m_poolSvcContext)) {
760  ATH_MSG_DEBUG("Reopend read transaction for POOL conditions input files" );
761  } else {
762  ATH_MSG_WARNING("Cannot reopen read transaction for POOL conditions input files");
763  }
764  }
765  }
766 }

◆ preLoadAddresses()

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

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

Reimplemented from IAddressProvider.

Definition at line 327 of file IOVDbSvc.cxx.

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

◆ processTagInfo()

StatusCode IOVDbSvc::processTagInfo ( )
overridevirtual

Process TagInfo.

Implements IIOVDbSvc.

Definition at line 788 of file IOVDbSvc.cxx.

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

◆ queryInterface()

StatusCode IOVDbSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
overridevirtual

Query the interfaces.

Identify interfaces to which this service is responsive.

Definition at line 142 of file IOVDbSvc.cxx.

142  {
143  if (IIOVDbSvc::interfaceID().versionMatch(riid)) {
144  *ppvInterface=(IIOVDbSvc*)this;
145  } else if ( IIOVCondDbSvc::interfaceID().versionMatch(riid)) {
146  *ppvInterface=(IIOVCondDbSvc*)this;
147  } else {
148  // Interface is not directly available: try out a base class
149  return AthService::queryInterface(riid, ppvInterface);
150  }
151  return StatusCode::SUCCESS;
152 }

◆ 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.

Implements IIOVDbSvc.

Definition at line 660 of file IOVDbSvc.cxx.

663  {
664  // this method does nothing
665  return StatusCode::SUCCESS;
666 }

◆ setupFolders()

StatusCode IOVDbSvc::setupFolders ( )
private

Definition at line 946 of file IOVDbSvc.cxx.

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

◆ signalBeginRun()

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

Set time for begin run.

Implements IIOVDbSvc.

Definition at line 668 of file IOVDbSvc.cxx.

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

◆ signalEndProxyPreload()

void IOVDbSvc::signalEndProxyPreload ( )
overridevirtual

Signal that callback has been fired.

Implements IIOVDbSvc.

Definition at line 739 of file IOVDbSvc.cxx.

739  {
740  // this method does nothing
741 }

◆ updateAddress()

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

Update a transient Address.

Implements IAddressProvider.

Definition at line 459 of file IOVDbSvc.cxx.

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

Member Data Documentation

◆ m_abort

bool IOVDbSvc::m_abort {false}
private

Definition at line 292 of file IOVDbSvc.h.

◆ m_connections

ConnVec IOVDbSvc::m_connections
private

Definition at line 287 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 240 of file IOVDbSvc.h.

◆ m_cresttagmap

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

Definition at line 234 of file IOVDbSvc.h.

◆ m_crestToFile

BooleanProperty IOVDbSvc::m_crestToFile {this,"CrestToFile",false,"output to file crest data for debugging purposes"}
private

Definition at line 239 of file IOVDbSvc.h.

◆ m_foldermap

FolderMap IOVDbSvc::m_foldermap
private

Definition at line 290 of file IOVDbSvc.h.

◆ m_globalTag

std::string IOVDbSvc::m_globalTag {}
private

Definition at line 280 of file IOVDbSvc.h.

◆ m_h_clidSvc

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

Definition at line 248 of file IOVDbSvc.h.

◆ m_h_detStore

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

Definition at line 245 of file IOVDbSvc.h.

◆ m_h_IOVSvc

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

Definition at line 243 of file IOVDbSvc.h.

◆ m_h_metaDataStore

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

Definition at line 246 of file IOVDbSvc.h.

◆ m_h_metaDataTool

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

Definition at line 250 of file IOVDbSvc.h.

◆ m_h_persSvc

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

Definition at line 247 of file IOVDbSvc.h.

◆ m_h_poolSvc

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

Definition at line 249 of file IOVDbSvc.h.

◆ m_h_sgSvc

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

Definition at line 244 of file IOVDbSvc.h.

◆ m_h_tagInfoMgr

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

Definition at line 251 of file IOVDbSvc.h.

◆ m_iovslop

cool::ValidityKey IOVDbSvc::m_iovslop {}
private

Definition at line 283 of file IOVDbSvc.h.

◆ m_iovTime

IOVTime IOVDbSvc::m_iovTime {}
private

Definition at line 277 of file IOVDbSvc.h.

◆ m_outputToFile

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

Definition at line 238 of file IOVDbSvc.h.

◆ 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 224 of file IOVDbSvc.h.

◆ m_par_cacheRun

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

Definition at line 219 of file IOVDbSvc.h.

◆ m_par_cacheTime

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

Definition at line 221 of file IOVDbSvc.h.

◆ 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 228 of file IOVDbSvc.h.

◆ m_par_crestServer

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

Definition at line 232 of file IOVDbSvc.h.

◆ m_par_dbinst

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

Definition at line 197 of file IOVDbSvc.h.

◆ 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 193 of file IOVDbSvc.h.

◆ 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 199 of file IOVDbSvc.h.

◆ 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 203 of file IOVDbSvc.h.

◆ m_par_forceLumiblockNumber

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

Definition at line 211 of file IOVDbSvc.h.

◆ m_par_forceRunNumber

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

Definition at line 209 of file IOVDbSvc.h.

◆ m_par_forceTimestamp

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

Definition at line 213 of file IOVDbSvc.h.

◆ 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 236 of file IOVDbSvc.h.

◆ m_par_globalTag

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

Definition at line 195 of file IOVDbSvc.h.

◆ m_par_manageConnections

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

Definition at line 205 of file IOVDbSvc.h.

◆ m_par_managePoolConnections

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

Definition at line 207 of file IOVDbSvc.h.

◆ 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 215 of file IOVDbSvc.h.

◆ 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 226 of file IOVDbSvc.h.

◆ m_par_overrideTags

Gaudi::Property<std::vector<std::string> > IOVDbSvc::m_par_overrideTags {this,"overrideTags",{},"List of foolder-tag overrides","OrderedSet<std::string>"}
private

Definition at line 201 of file IOVDbSvc.h.

◆ 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 230 of file IOVDbSvc.h.

◆ m_par_timeStampSlop

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

Definition at line 217 of file IOVDbSvc.h.

◆ m_poolPayloadRequested

bool IOVDbSvc::m_poolPayloadRequested {false}
private

Definition at line 256 of file IOVDbSvc.h.

◆ m_poolSvcContext

int IOVDbSvc::m_poolSvcContext {-1}
private

Definition at line 260 of file IOVDbSvc.h.

◆ m_state

IOVDbSvc_state IOVDbSvc::m_state {INITIALIZATION}
private

Definition at line 274 of file IOVDbSvc.h.


The documentation for this class was generated from the following files:
IOVDbSvc::postConditionsLoad
virtual void postConditionsLoad() override
May be called once conditions are loaded to let IOVDbSvc release resources.
Definition: IOVDbSvc.cxx:743
grepfile.info
info
Definition: grepfile.py:38
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IOVDbSvc::INITIALIZATION
@ INITIALIZATION
Definition: IOVDbSvc.h:269
IIOVCondDbSvc::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: IIOVCondDbSvc.h:47
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
IOVDbSvc::m_crestCoolToFile
BooleanProperty m_crestCoolToFile
Definition: IOVDbSvc.h:240
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IOVDbSvc::m_abort
bool m_abort
Definition: IOVDbSvc.h:292
IOVTime::event
uint32_t event() const noexcept
Definition: IOVTime.h:106
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Atlas::ExtendedEventContext::conditionsRun
EventIDBase::number_type conditionsRun() const
Definition: ExtendedEventContext.h:38
IOVDbSvc::fillTagInfo
StatusCode fillTagInfo()
Definition: IOVDbSvc.cxx:1096
initialize
void initialize()
Definition: run_EoverP.cxx:894
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
query_example.tlist
tlist
Definition: query_example.py:25
IOVDbSvc::m_par_maxNumPoolFiles
IntegerProperty m_par_maxNumPoolFiles
Definition: IOVDbSvc.h:215
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
IOVDbSvc::poolSvcContext
int poolSvcContext()
Definition: IOVDbSvc.cxx:154
IOVDbSvc::m_foldermap
FolderMap m_foldermap
Definition: IOVDbSvc.h:290
AtlasMcWeight::number_type
unsigned int number_type
Definition: AtlasMcWeight.h:20
IOVDbSvc::m_h_poolSvc
ServiceHandle< IPoolSvc > m_h_poolSvc
Definition: IOVDbSvc.h:249
pool::IFileCatalog::commit
void commit()
Save catalog to file.
Definition: IFileCatalog.h:49
IOVDbSvc::m_par_timeStampSlop
FloatProperty m_par_timeStampSlop
Definition: IOVDbSvc.h:217
IOVDbSvc::m_par_manageConnections
BooleanProperty m_par_manageConnections
Definition: IOVDbSvc.h:205
IIOVDbSvc
Abstract interface to IOVDbSvc to access IOVRange and tag information.
Definition: IIOVDbSvc.h:38
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ReadCellNoiseFromCoolCompare.folder2
folder2
Definition: ReadCellNoiseFromCoolCompare.py:296
IOVTime::isValid
bool isValid() const noexcept
Definition: IOVTime.cxx:117
IOVDbFolder
Definition: IOVDbFolder.h:50
IOVDbSvc::m_crestToFile
BooleanProperty m_crestToFile
Definition: IOVDbSvc.h:239
IOVDbSvc::FINALIZE_ALG
@ FINALIZE_ALG
Definition: IOVDbSvc.h:272
IOVDbSvc::m_h_metaDataStore
ServiceHandle< StoreGateSvc > m_h_metaDataStore
Definition: IOVDbSvc.h:246
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
IOVDbSvc::m_h_clidSvc
ServiceHandle< IClassIDSvc > m_h_clidSvc
Definition: IOVDbSvc.h:248
IOVTime::MINRUN
static constexpr uint32_t MINRUN
Definition: IOVTime.h:44
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition: ExtendedEventContext.cxx:32
SG::TransientAddress::name
const std::string & name() const
Get the primary (hashed) SG key.
Definition: TransientAddress.h:208
IOVDbSvc::m_par_forceRunNumber
IntegerProperty m_par_forceRunNumber
Definition: IOVDbSvc.h:209
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
pool::IFileCatalog
Definition: IFileCatalog.h:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IOVDbSvc::m_par_forceLumiblockNumber
IntegerProperty m_par_forceLumiblockNumber
Definition: IOVDbSvc.h:211
lumiFormat.i
int i
Definition: lumiFormat.py:92
IOVDbNamespace::CrestFunctions
Definition: CrestFunctions.h:29
IOVDbSvc::BEGIN_RUN
@ BEGIN_RUN
Definition: IOVDbSvc.h:270
ITagInfoMgr::NameTagPairVec
std::vector< NameTagPair > NameTagPairVec
Definition: ITagInfoMgr.h:63
Athena::DBLock
Common database lock.
Definition: DBLock.h:46
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IOVDbSvc::m_par_cacheAlign
UnsignedIntegerProperty m_par_cacheAlign
Definition: IOVDbSvc.h:224
IOVDbSvc::m_par_crestServer
StringProperty m_par_crestServer
Definition: IOVDbSvc.h:232
IOVTime::reset
void reset() noexcept
Definition: IOVTime.cxx:108
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:201
IOVDbSvc::m_poolSvcContext
int m_poolSvcContext
Definition: IOVDbSvc.h:260
calibdata.exception
exception
Definition: calibdata.py:496
IOVDbSvc::checkEventSel
StatusCode checkEventSel()
Definition: IOVDbSvc.cxx:886
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IOVTime::MAXTIMESTAMP
static constexpr uint64_t MAXTIMESTAMP
Definition: IOVTime.h:58
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
IOVDbSvc::m_cresttagmap
std::map< std::string, std::string > m_cresttagmap
Definition: IOVDbSvc.h:234
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IOVDbSvc::m_par_managePoolConnections
BooleanProperty m_par_managePoolConnections
Definition: IOVDbSvc.h:207
IOVDbSvc::m_par_defaultConnection
Gaudi::Property< std::string > m_par_defaultConnection
Definition: IOVDbSvc.h:193
IOVTime::setRETime
void setRETime(uint64_t time) noexcept
Definition: IOVTime.cxx:84
run
Definition: run.py:1
fptr
std::vector< TFile * > fptr
Definition: hcg.cxx:48
IOVTime::setTimestamp
void setTimestamp(uint64_t timestamp) noexcept
Definition: IOVTime.cxx:72
IOVDbSvc::m_h_tagInfoMgr
ServiceHandle< ITagInfoMgr > m_h_tagInfoMgr
Definition: IOVDbSvc.h:251
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
python.dummyaccess.access
def access(filename, mode)
Definition: dummyaccess.py:18
checkRpcDigits.allGood
bool allGood
Loop over the SDOs & Digits.
Definition: checkRpcDigits.py:171
IOVDbSvc::m_par_onlineMode
BooleanProperty m_par_onlineMode
Definition: IOVDbSvc.h:226
IOVDbSvc::m_iovTime
IOVTime m_iovTime
Definition: IOVDbSvc.h:277
StoreID::DETECTOR_STORE
@ DETECTOR_STORE
Definition: StoreID.h:27
IOVDbConn::setInactive
void setInactive()
Definition: IOVDbConn.cxx:108
IOVDbSvc::m_connections
ConnVec m_connections
Definition: IOVDbSvc.h:287
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
IOVDbSvc::FolderMap
std::map< std::string, IOVDbFolder * > FolderMap
Definition: IOVDbSvc.h:289
IOVDbSvc::m_par_checklock
BooleanProperty m_par_checklock
Definition: IOVDbSvc.h:228
IOVDbConn
Definition: IOVDbConn.h:18
dumpBeamSpot.dbconn
dbconn
Definition: dumpBeamSpot.py:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IOVDbParser
Definition: IOVDbParser.h:19
IOVTime::run
uint32_t run() const noexcept
Definition: IOVTime.h:105
StoreClearedIncident::store
const StoreGateSvc * store() const
Return the store that was cleared.
Definition: StoreClearedIncident.cxx:33
IOVDbSvc::m_par_overrideTags
Gaudi::Property< std::vector< std::string > > m_par_overrideTags
Definition: IOVDbSvc.h:201
IOVDbSvc::m_outputToFile
BooleanProperty m_outputToFile
Definition: IOVDbSvc.h:238
IOVDbSvc::m_state
IOVDbSvc_state m_state
Definition: IOVDbSvc.h:274
python.checkUPD1.connstr
connstr
Definition: checkUPD1.py:78
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
IOVDbSvc::m_h_persSvc
ServiceHandle< IAddressCreator > m_h_persSvc
Definition: IOVDbSvc.h:247
IOVTime::MINEVENT
static constexpr uint32_t MINEVENT
Definition: IOVTime.h:50
IOVDbSvc::m_par_cacheRun
IntegerProperty m_par_cacheRun
Definition: IOVDbSvc.h:219
SG::TransientAddress::setAddress
void setAddress(IOpaqueAddress *pAddress)
Retrieve primary clid.
Definition: TransientAddress.cxx:172
IOVDbSvc::EVENT_LOOP
@ EVENT_LOOP
Definition: IOVDbSvc.h:271
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
IOVDbSvc::m_par_globalTag
Gaudi::Property< std::string > m_par_globalTag
Definition: IOVDbSvc.h:195
IOVDbSvc::m_par_dbinst
Gaudi::Property< std::string > m_par_dbinst
Definition: IOVDbSvc.h:197
IOVDbSvc::m_poolPayloadRequested
bool m_poolPayloadRequested
Definition: IOVDbSvc.h:256
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ReadNoiseFromCool.folder1
folder1
Definition: ReadNoiseFromCool.py:91
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
IIOVDbSvc::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: IIOVDbSvc.h:100
pool::ITransaction::READ
@ READ
Definition: ITransaction.h:29
IOVDbSvc::m_par_folders
Gaudi::Property< std::vector< std::string > > m_par_folders
Definition: IOVDbSvc.h:199
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Service >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
IOVTime::setRunEvent
void setRunEvent(uint32_t run, uint32_t event) noexcept
Definition: IOVTime.cxx:96
EventIDFromStore
const EventIDBase * EventIDFromStore(IProxyDict *store)
Retrieve the EventID from EventContext saved in store STORE.
Definition: EventIDFromStore.cxx:15
IIOVCondDbSvc
Definition: IIOVCondDbSvc.h:34
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
IOVTime::MINTIMESTAMP
static constexpr uint64_t MINTIMESTAMP
Definition: IOVTime.h:56
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
IOVDbSvc::m_iovslop
cool::ValidityKey m_iovslop
Definition: IOVDbSvc.h:283
IOVDbSvc::m_h_detStore
ServiceHandle< StoreGateSvc > m_h_detStore
Definition: IOVDbSvc.h:245
IOVDbSvc::loadCaches
StatusCode loadCaches(IOVDbConn *conn, const IOVTime *time=nullptr)
Definition: IOVDbSvc.cxx:1131
SG::DataProxy
Definition: DataProxy.h:44
IOVDbSvc::setupFolders
StatusCode setupFolders()
Definition: IOVDbSvc.cxx:946
IOVDbSvc::m_h_IOVSvc
ServiceHandle< IIOVSvc > m_h_IOVSvc
Definition: IOVDbSvc.h:243
SG::ConstIterator
Definition: SGIterator.h:163
IOVDbSvc::m_par_source
StringProperty m_par_source
Definition: IOVDbSvc.h:230
IOVDbSvc::m_h_sgSvc
ServiceHandle< StoreGateSvc > m_h_sgSvc
Definition: IOVDbSvc.h:244
IOVDbSvc::m_par_foldersToWrite
Gaudi::Property< std::vector< std::string > > m_par_foldersToWrite
Definition: IOVDbSvc.h:203
IOVDbSvc::m_globalTag
std::string m_globalTag
Definition: IOVDbSvc.h:280
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
IOVDbSvc::m_h_metaDataTool
PublicToolHandle< IIOVDbMetaDataTool > m_h_metaDataTool
Definition: IOVDbSvc.h:250
IOVDbSvc::m_par_forceTimestamp
IntegerProperty m_par_forceTimestamp
Definition: IOVDbSvc.h:213
IOVDbSvc::checkConfigConsistency
StatusCode checkConfigConsistency() const
Definition: IOVDbSvc.cxx:1177
ServiceHandle< Gaudi::Interfaces::IOptionsSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
IOVDbSvc::m_par_cacheTime
IntegerProperty m_par_cacheTime
Definition: IOVDbSvc.h:221
StoreClearedIncident
Incident sent after a store is cleared.
Definition: StoreClearedIncident.h:30