ATLAS Offline Software
Public Types | 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:

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 cool::IDatabasePtr getDatabase (bool readOnly) override
 Access to COOL database for a given folder. More...
 
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...
 

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

◆ FolderMap

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

Definition at line 282 of file IOVDbSvc.h.

◆ tadList

Definition at line 103 of file IOVDbSvc.h.

◆ tadListIterator

Definition at line 104 of file IOVDbSvc.h.

Member Enumeration Documentation

◆ IOVDbSvc_state

Enumerator
INITIALIZATION 
BEGIN_RUN 
EVENT_LOOP 
FINALIZE_ALG 

Definition at line 261 of file IOVDbSvc.h.

261  {
262  INITIALIZATION = 0,
263  BEGIN_RUN,
264  EVENT_LOOP,
266  };

Constructor & Destructor Documentation

◆ ~IOVDbSvc()

IOVDbSvc::~IOVDbSvc ( )
virtualdefault

Member Function Documentation

◆ checkConfigConsistency()

StatusCode IOVDbSvc::checkConfigConsistency ( ) const
private

Definition at line 1163 of file IOVDbSvc.cxx.

1163  {
1164 // check consistency of global tag and database instance, if set
1165  // catch most common user misconfigurations
1166  // this is only done here as need global tag to be set even if read from file
1167  // @TODO should this not be done during initialize
1168  if (!m_par_dbinst.empty() && !m_globalTag.empty() and (m_par_source!="CREST")) {
1169  const std::string_view tagstub=std::string_view(m_globalTag).substr(0,7);
1170  ATH_MSG_DEBUG( "Checking " << m_par_dbinst << " against " <<tagstub );
1171  if (((m_par_dbinst=="COMP200" || m_par_dbinst=="CONDBR2") &&
1172  (tagstub!="COMCOND" && tagstub!="CONDBR2")) ||
1173  (m_par_dbinst=="OFLP200" && (tagstub!="OFLCOND" && tagstub!="CMCCOND"))) {
1174  ATH_MSG_FATAL( "Likely incorrect conditions DB configuration! "
1175  << "Attached to database instance " << m_par_dbinst <<
1176  " but global tag begins " << tagstub );
1177  ATH_MSG_FATAL( "See Atlas/CoolTroubles wiki for details," <<
1178  " or set IOVDbSvc.DBInstance=\"\" to disable check" );
1179  return StatusCode::FAILURE;
1180  }
1181  }
1182  return StatusCode::SUCCESS;
1183 }

◆ checkEventSel()

StatusCode IOVDbSvc::checkEventSel ( )
private

Definition at line 872 of file IOVDbSvc.cxx.

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

◆ dropObject()

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

Definition at line 844 of file IOVDbSvc.cxx.

844  {
845  // find the folder corresponding to this object
846  FolderMap::const_iterator itr=m_foldermap.find(key);
847  if (itr!=m_foldermap.end()) {
848  IOVDbFolder* folder=itr->second;
849  CLID clid=folder->clid();
850  SG::DataProxy* proxy=m_h_detStore->proxy(clid,key);
851  if (proxy!=nullptr) {
852  m_h_detStore->clearProxyPayload(proxy);
853  ATH_MSG_DEBUG("Dropped payload for key " << key );
854  folder->setDropped(true);
855  if (resetCache) {
856  folder->resetCache();
857  ATH_MSG_DEBUG( "Cache reset done for folder " << folder->folderName() );
858  }
859  return true;
860  } else {
861  return false;
862  }
863  } else {
864  return false;
865  }
866 }

◆ fillTagInfo()

StatusCode IOVDbSvc::fillTagInfo ( )
private

Definition at line 1082 of file IOVDbSvc.cxx.

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

◆ 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  float readtime=0.;
261  // accumulate a map of readtime by connection
262  typedef std::map<IOVDbConn*,float> CTMap;
263  CTMap ctmap;
264  for (const auto & namePtrPair : m_foldermap) {
265  IOVDbFolder* folder=namePtrPair.second;
266  folder->summary();
267  const float& fread=folder->readTime();
268  readtime+=fread;
269  IOVDbConn* cptr=folder->conn();
270  CTMap::iterator citr=ctmap.find(cptr);
271  if (citr!=ctmap.end()) {
272  (citr->second)+=fread;
273  } else {
274  ctmap.insert(CTMap::value_type(cptr,fread));
275  }
276  delete folder;
277  }
278  ATH_MSG_INFO( " bytes in (( " << std::fixed << std::setw(9) << std::setprecision(2) <<
279  readtime << " ))s" );
280 
281  // close and delete connections, printing time in each one
282  for (auto & pThisConnection : m_connections) {
283  float fread=0;
284  CTMap::iterator citr=ctmap.find(pThisConnection);
285  if (citr!=ctmap.end()) fread=citr->second;
286  pThisConnection->setInactive();
287  pThisConnection->summary(fread);
288  delete pThisConnection;
289  }
290  // finally remove the msg svc
291  //delete m_log;
292  return AthService::finalize();
293 }

◆ getDatabase()

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

Access to COOL database for a given folder.

Definition at line 295 of file IOVDbSvc.cxx.

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

◆ 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 824 of file IOVDbSvc.cxx.

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

◆ getKeyList()

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

Definition at line 816 of file IOVDbSvc.cxx.

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

◆ 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 562 of file IOVDbSvc.cxx.

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

◆ handle()

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

Incident service handle for EndEvent.

Definition at line 754 of file IOVDbSvc.cxx.

754  {
755  // Handle incidents:
756  // BeginEvent to set IOVDbSvc state to EVENT_LOOP
757  // StoreCleared/EndProcessing to close any open POOL files
758  ATH_MSG_VERBOSE( "entering handle(), incident type " << inc.type() << " from " << inc.source() );
759  if (inc.type()=="BeginEvent") {
761  } else {
762  Athena::DBLock dblock;
763 
764  const StoreClearedIncident* sinc = dynamic_cast<const StoreClearedIncident*>(&inc);
765  if( (inc.type()=="StoreCleared" && sinc!=nullptr && sinc->store()==&*m_h_sgSvc)
766  or inc.type()==IncidentType::EndProcessing )
767  {
770  }
771  }
772 }

◆ initialize()

StatusCode IOVDbSvc::initialize ( )
overridevirtual

Service init.

Definition at line 159 of file IOVDbSvc.cxx.

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

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

◆ loadAddresses()

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

Get all new addresses from Provider for this Event.

Definition at line 439 of file IOVDbSvc.cxx.

439  {
440  // this method does nothing
441  return StatusCode::SUCCESS;
442 }

◆ loadCaches()

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

Definition at line 1117 of file IOVDbSvc.cxx.

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

◆ poolSvcContext()

int IOVDbSvc::poolSvcContext ( )
private

Definition at line 140 of file IOVDbSvc.cxx.

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

◆ postConditionsLoad()

void IOVDbSvc::postConditionsLoad ( )
overridevirtual

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

Definition at line 729 of file IOVDbSvc.cxx.

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

◆ 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 313 of file IOVDbSvc.cxx.

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

◆ processTagInfo()

StatusCode IOVDbSvc::processTagInfo ( )
overridevirtual

Process TagInfo.

Definition at line 774 of file IOVDbSvc.cxx.

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

◆ 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 646 of file IOVDbSvc.cxx.

649  {
650  // this method does nothing
651  return StatusCode::SUCCESS;
652 }

◆ setupFolders()

StatusCode IOVDbSvc::setupFolders ( )
private

Definition at line 932 of file IOVDbSvc.cxx.

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

◆ signalBeginRun()

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

Set time for begin run.

Definition at line 654 of file IOVDbSvc.cxx.

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

◆ signalEndProxyPreload()

void IOVDbSvc::signalEndProxyPreload ( )
overridevirtual

Signal that callback has been fired.

Definition at line 725 of file IOVDbSvc.cxx.

725  {
726  // this method does nothing
727 }

◆ updateAddress()

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

Update a transient Address.

Definition at line 445 of file IOVDbSvc.cxx.

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

Member Data Documentation

◆ m_abort

bool IOVDbSvc::m_abort {false}
private

Definition at line 285 of file IOVDbSvc.h.

◆ m_connections

ConnVec IOVDbSvc::m_connections
private

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

◆ m_cresttagmap

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

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

◆ m_foldermap

FolderMap IOVDbSvc::m_foldermap
private

Definition at line 283 of file IOVDbSvc.h.

◆ m_globalTag

std::string IOVDbSvc::m_globalTag {}
private

Definition at line 273 of file IOVDbSvc.h.

◆ m_h_clidSvc

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

Definition at line 241 of file IOVDbSvc.h.

◆ m_h_detStore

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

Definition at line 238 of file IOVDbSvc.h.

◆ m_h_IOVSvc

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

Definition at line 236 of file IOVDbSvc.h.

◆ m_h_metaDataStore

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

Definition at line 239 of file IOVDbSvc.h.

◆ m_h_metaDataTool

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

Definition at line 243 of file IOVDbSvc.h.

◆ m_h_persSvc

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

Definition at line 240 of file IOVDbSvc.h.

◆ m_h_poolSvc

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

Definition at line 242 of file IOVDbSvc.h.

◆ m_h_sgSvc

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

Definition at line 237 of file IOVDbSvc.h.

◆ m_h_tagInfoMgr

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

Definition at line 244 of file IOVDbSvc.h.

◆ m_iovslop

cool::ValidityKey IOVDbSvc::m_iovslop {}
private

Definition at line 276 of file IOVDbSvc.h.

◆ m_iovTime

IOVTime IOVDbSvc::m_iovTime {}
private

Definition at line 270 of file IOVDbSvc.h.

◆ m_outputToFile

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

Definition at line 231 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 217 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 212 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 214 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 221 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 225 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 190 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 186 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 192 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 196 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 204 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 202 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 206 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 229 of file IOVDbSvc.h.

◆ m_par_globalTag

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

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

◆ m_par_managePoolConnections

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

Definition at line 200 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 208 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 219 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 194 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 223 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 210 of file IOVDbSvc.h.

◆ m_poolPayloadRequested

bool IOVDbSvc::m_poolPayloadRequested {false}
private

Definition at line 249 of file IOVDbSvc.h.

◆ m_poolSvcContext

int IOVDbSvc::m_poolSvcContext {-1}
private

Definition at line 253 of file IOVDbSvc.h.

◆ m_state

IOVDbSvc_state IOVDbSvc::m_state {INITIALIZATION}
private

Definition at line 267 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:729
grepfile.info
info
Definition: grepfile.py:38
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IOVDbSvc::INITIALIZATION
@ INITIALIZATION
Definition: IOVDbSvc.h:262
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
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:233
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IOVDbSvc::m_abort
bool m_abort
Definition: IOVDbSvc.h:285
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:1082
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:208
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
IOVDbSvc::poolSvcContext
int poolSvcContext()
Definition: IOVDbSvc.cxx:140
IOVDbSvc::m_foldermap
FolderMap m_foldermap
Definition: IOVDbSvc.h:283
AtlasMcWeight::number_type
unsigned int number_type
Definition: AtlasMcWeight.h:20
IOVDbSvc::m_h_poolSvc
ServiceHandle< IPoolSvc > m_h_poolSvc
Definition: IOVDbSvc.h:242
pool::IFileCatalog::commit
void commit()
Save catalog to file.
Definition: IFileCatalog.h:49
IOVDbSvc::m_par_timeStampSlop
FloatProperty m_par_timeStampSlop
Definition: IOVDbSvc.h:210
IOVDbSvc::m_par_manageConnections
BooleanProperty m_par_manageConnections
Definition: IOVDbSvc.h:198
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:52
IOVDbSvc::m_crestToFile
BooleanProperty m_crestToFile
Definition: IOVDbSvc.h:232
IOVDbSvc::FINALIZE_ALG
@ FINALIZE_ALG
Definition: IOVDbSvc.h:265
IOVDbSvc::m_h_metaDataStore
ServiceHandle< StoreGateSvc > m_h_metaDataStore
Definition: IOVDbSvc.h:239
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:241
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:202
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:204
lumiFormat.i
int i
Definition: lumiFormat.py:85
IOVDbNamespace::CrestFunctions
Definition: CrestFunctions.h:31
IOVDbSvc::BEGIN_RUN
@ BEGIN_RUN
Definition: IOVDbSvc.h:263
ITagInfoMgr::NameTagPairVec
std::vector< NameTagPair > NameTagPairVec
Definition: ITagInfoMgr.h:66
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:217
IOVDbSvc::m_par_crestServer
StringProperty m_par_crestServer
Definition: IOVDbSvc.h:225
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:253
calibdata.exception
exception
Definition: calibdata.py:496
IOVDbSvc::checkEventSel
StatusCode checkEventSel()
Definition: IOVDbSvc.cxx:872
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:227
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:200
IOVDbSvc::m_par_defaultConnection
Gaudi::Property< std::string > m_par_defaultConnection
Definition: IOVDbSvc.h:186
hist_file_dump.f
f
Definition: hist_file_dump.py:135
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:244
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:219
IOVDbSvc::m_iovTime
IOVTime m_iovTime
Definition: IOVDbSvc.h:270
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:280
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
IOVDbSvc::FolderMap
std::map< std::string, IOVDbFolder * > FolderMap
Definition: IOVDbSvc.h:282
IOVDbSvc::m_par_checklock
BooleanProperty m_par_checklock
Definition: IOVDbSvc.h:221
IOVDbConn
Definition: IOVDbConn.h:18
dumpBeamSpot.dbconn
dbconn
Definition: dumpBeamSpot.py:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
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:194
IOVDbSvc::m_outputToFile
BooleanProperty m_outputToFile
Definition: IOVDbSvc.h:231
IOVDbSvc::m_state
IOVDbSvc_state m_state
Definition: IOVDbSvc.h:267
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:240
IOVTime::MINEVENT
static constexpr uint32_t MINEVENT
Definition: IOVTime.h:50
IOVDbSvc::m_par_cacheRun
IntegerProperty m_par_cacheRun
Definition: IOVDbSvc.h:212
SG::TransientAddress::setAddress
void setAddress(IOpaqueAddress *pAddress)
Retrieve primary clid.
Definition: TransientAddress.cxx:172
IOVDbSvc::EVENT_LOOP
@ EVENT_LOOP
Definition: IOVDbSvc.h:264
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
IOVDbSvc::m_par_globalTag
Gaudi::Property< std::string > m_par_globalTag
Definition: IOVDbSvc.h:188
IOVDbSvc::m_par_dbinst
Gaudi::Property< std::string > m_par_dbinst
Definition: IOVDbSvc.h:190
IOVDbSvc::m_poolPayloadRequested
bool m_poolPayloadRequested
Definition: IOVDbSvc.h:249
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
pool::ITransaction::READ
@ READ
Definition: ITransaction.h:29
IOVDbSvc::m_par_folders
Gaudi::Property< std::vector< std::string > > m_par_folders
Definition: IOVDbSvc.h:192
DEBUG
#define DEBUG
Definition: page_access.h:11
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
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:798
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
makeDTCalibBlob_pickPhase.theTag
def theTag
Definition: makeDTCalibBlob_pickPhase.py:384
IOVDbSvc::m_iovslop
cool::ValidityKey m_iovslop
Definition: IOVDbSvc.h:276
IOVDbSvc::m_h_detStore
ServiceHandle< StoreGateSvc > m_h_detStore
Definition: IOVDbSvc.h:238
IOVDbSvc::loadCaches
StatusCode loadCaches(IOVDbConn *conn, const IOVTime *time=nullptr)
Definition: IOVDbSvc.cxx:1117
SG::DataProxy
Definition: DataProxy.h:44
IOVDbSvc::setupFolders
StatusCode setupFolders()
Definition: IOVDbSvc.cxx:932
IOVDbSvc::m_h_IOVSvc
ServiceHandle< IIOVSvc > m_h_IOVSvc
Definition: IOVDbSvc.h:236
SG::ConstIterator
Definition: SGIterator.h:163
IOVDbSvc::m_par_source
StringProperty m_par_source
Definition: IOVDbSvc.h:223
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
IOVDbSvc::m_h_sgSvc
ServiceHandle< StoreGateSvc > m_h_sgSvc
Definition: IOVDbSvc.h:237
IOVDbSvc::m_par_foldersToWrite
Gaudi::Property< std::vector< std::string > > m_par_foldersToWrite
Definition: IOVDbSvc.h:196
IOVDbSvc::m_globalTag
std::string m_globalTag
Definition: IOVDbSvc.h:273
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:243
IOVDbSvc::m_par_forceTimestamp
IntegerProperty m_par_forceTimestamp
Definition: IOVDbSvc.h:206
IOVDbSvc::checkConfigConsistency
StatusCode checkConfigConsistency() const
Definition: IOVDbSvc.cxx:1163
ServiceHandle< Gaudi::Interfaces::IOptionsSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
IOVDbSvc::m_par_cacheTime
IntegerProperty m_par_cacheTime
Definition: IOVDbSvc.h:214
StoreClearedIncident
Incident sent after a store is cleared.
Definition: StoreClearedIncident.h:30