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 xml-modifiers for folders like <prefix>/My/Folder</prefix><tag>MyFolderTag</tag>","OrderedSet<std::string>"}
 
Gaudi::Property< std::vector< std::string > > m_par_foldersToWrite {this,"FoldersToMetaData",{},"list of folders to write to file meta data","OrderedSet<std::string>"}
 
BooleanProperty m_par_manageConnections {this,"ManageConnections",true,"flag to trigger the connections management"}
 
BooleanProperty m_par_managePoolConnections {this,"ManagePoolConnections",true,"flag to manage pool connections"}
 
IntegerProperty m_par_forceRunNumber {this,"forceRunNumber",0,"globally force run-number (default: no force)"}
 
IntegerProperty m_par_forceLumiblockNumber {this,"forceLumiblockNumber",0,"globally force LB-number (default: no force)"}
 
IntegerProperty m_par_forceTimestamp {this,"forceTimeStamp",0,"globally force time-stamp (default: no force)"}
 
IntegerProperty m_par_maxNumPoolFiles {this,"MaxPoolFilesOpen",5,"max number of pool files open allowed (0 means no limit)"}
 
FloatProperty m_par_timeStampSlop {this,"TimeStampSlop",0.0,"backdata timestamp IOVs by this many seconds"}
 
IntegerProperty m_par_cacheRun {this,"CacheRun",0,"force larger numbers of runs to be cached"}
 
IntegerProperty m_par_cacheTime {this,"CacheTime",0,"force larger timeranges to be cached (seconds)"}
 
UnsignedIntegerProperty m_par_cacheAlign {this,"CacheAlign",0,"cache alignment - divide cache into N slices and align queries on slice"}
 
BooleanProperty m_par_onlineMode {this,"OnlineMode",false,"online mode flag to ignore missing channels outside cache range"}
 
BooleanProperty m_par_checklock {this,"CheckLock",false,"check to ensure global/HVS tags are locked (for production)"}
 
StringProperty m_par_source {this,"Source","COOL_DATABASE","source of data as a string (default COOL_DATABASE)"}
 
StringProperty m_par_crestServer {this,"crestServer","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_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 76 of file IOVDbSvc.h.

Member Typedef Documentation

◆ ConnVec

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

Definition at line 277 of file IOVDbSvc.h.

◆ FolderMap

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

Definition at line 280 of file IOVDbSvc.h.

◆ tadList

Definition at line 102 of file IOVDbSvc.h.

◆ tadListIterator

Definition at line 103 of file IOVDbSvc.h.

Member Enumeration Documentation

◆ IOVDbSvc_state

Enumerator
INITIALIZATION 
BEGIN_RUN 
EVENT_LOOP 
FINALIZE_ALG 

Definition at line 259 of file IOVDbSvc.h.

259  {
260  INITIALIZATION = 0,
261  BEGIN_RUN,
262  EVENT_LOOP,
264  };

Constructor & Destructor Documentation

◆ ~IOVDbSvc()

IOVDbSvc::~IOVDbSvc ( )
virtualdefault

Member Function Documentation

◆ checkConfigConsistency()

StatusCode IOVDbSvc::checkConfigConsistency ( ) const
private

Definition at line 1174 of file IOVDbSvc.cxx.

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

◆ checkEventSel()

StatusCode IOVDbSvc::checkEventSel ( )
private

Definition at line 875 of file IOVDbSvc.cxx.

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

◆ dropObject()

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

Definition at line 847 of file IOVDbSvc.cxx.

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

◆ fillTagInfo()

StatusCode IOVDbSvc::fillTagInfo ( )
private

Definition at line 1093 of file IOVDbSvc.cxx.

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

◆ finalize()

StatusCode IOVDbSvc::finalize ( )
overridevirtual

Service finalize.

Definition at line 258 of file IOVDbSvc.cxx.

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

◆ getDatabase()

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

Access to COOL database for a given folder.

Definition at line 297 of file IOVDbSvc.cxx.

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

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

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

◆ getKeyList()

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

Definition at line 819 of file IOVDbSvc.cxx.

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

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

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

◆ handle()

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

Incident service handle for EndEvent.

Definition at line 756 of file IOVDbSvc.cxx.

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

◆ initialize()

StatusCode IOVDbSvc::initialize ( )
overridevirtual

Service init.

Definition at line 160 of file IOVDbSvc.cxx.

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

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

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

◆ loadCaches()

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

Definition at line 1128 of file IOVDbSvc.cxx.

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

◆ poolSvcContext()

int IOVDbSvc::poolSvcContext ( )
private

Definition at line 141 of file IOVDbSvc.cxx.

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

◆ postConditionsLoad()

void IOVDbSvc::postConditionsLoad ( )
overridevirtual

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

Definition at line 731 of file IOVDbSvc.cxx.

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

◆ preLoadAddresses()

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

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

Definition at line 315 of file IOVDbSvc.cxx.

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

◆ processTagInfo()

StatusCode IOVDbSvc::processTagInfo ( )
overridevirtual

Process TagInfo.

Definition at line 777 of file IOVDbSvc.cxx.

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

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

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

◆ setupFolders()

StatusCode IOVDbSvc::setupFolders ( )
private

Definition at line 935 of file IOVDbSvc.cxx.

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

◆ signalBeginRun()

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

Set time for begin run.

Definition at line 656 of file IOVDbSvc.cxx.

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

◆ signalEndProxyPreload()

void IOVDbSvc::signalEndProxyPreload ( )
overridevirtual

Signal that callback has been fired.

Definition at line 727 of file IOVDbSvc.cxx.

727  {
728  // this method does nothing
729 }

◆ updateAddress()

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

Update a transient Address.

Definition at line 447 of file IOVDbSvc.cxx.

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

Member Data Documentation

◆ m_abort

bool IOVDbSvc::m_abort {false}
private

Definition at line 283 of file IOVDbSvc.h.

◆ m_connections

ConnVec IOVDbSvc::m_connections
private

Definition at line 278 of file IOVDbSvc.h.

◆ m_crestCoolToFile

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

Definition at line 231 of file IOVDbSvc.h.

◆ m_cresttagmap

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

Definition at line 226 of file IOVDbSvc.h.

◆ m_foldermap

FolderMap IOVDbSvc::m_foldermap
private

Definition at line 281 of file IOVDbSvc.h.

◆ m_globalTag

std::string IOVDbSvc::m_globalTag {}
private

Definition at line 271 of file IOVDbSvc.h.

◆ m_h_clidSvc

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

Definition at line 239 of file IOVDbSvc.h.

◆ m_h_detStore

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

Definition at line 236 of file IOVDbSvc.h.

◆ m_h_IOVSvc

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

Definition at line 234 of file IOVDbSvc.h.

◆ m_h_metaDataStore

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

Definition at line 237 of file IOVDbSvc.h.

◆ m_h_metaDataTool

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

Definition at line 241 of file IOVDbSvc.h.

◆ m_h_persSvc

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

Definition at line 238 of file IOVDbSvc.h.

◆ m_h_poolSvc

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

Definition at line 240 of file IOVDbSvc.h.

◆ m_h_sgSvc

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

Definition at line 235 of file IOVDbSvc.h.

◆ m_h_tagInfoMgr

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

Definition at line 242 of file IOVDbSvc.h.

◆ m_iovslop

cool::ValidityKey IOVDbSvc::m_iovslop {}
private

Definition at line 274 of file IOVDbSvc.h.

◆ m_iovTime

IOVTime IOVDbSvc::m_iovTime {}
private

Definition at line 268 of file IOVDbSvc.h.

◆ m_outputToFile

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

Definition at line 230 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 216 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 211 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 213 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 220 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 224 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 189 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 185 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 191 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 195 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 203 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 201 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 205 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 228 of file IOVDbSvc.h.

◆ m_par_globalTag

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

Definition at line 187 of file IOVDbSvc.h.

◆ m_par_manageConnections

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

Definition at line 197 of file IOVDbSvc.h.

◆ m_par_managePoolConnections

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

Definition at line 199 of file IOVDbSvc.h.

◆ m_par_maxNumPoolFiles

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

Definition at line 207 of file IOVDbSvc.h.

◆ m_par_onlineMode

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

Definition at line 218 of file IOVDbSvc.h.

◆ m_par_overrideTags

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

Definition at line 193 of file IOVDbSvc.h.

◆ m_par_source

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

Definition at line 222 of file IOVDbSvc.h.

◆ m_par_timeStampSlop

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

Definition at line 209 of file IOVDbSvc.h.

◆ m_poolPayloadRequested

bool IOVDbSvc::m_poolPayloadRequested {false}
private

Definition at line 247 of file IOVDbSvc.h.

◆ m_poolSvcContext

int IOVDbSvc::m_poolSvcContext {-1}
private

Definition at line 251 of file IOVDbSvc.h.

◆ m_state

IOVDbSvc_state IOVDbSvc::m_state {INITIALIZATION}
private

Definition at line 265 of file IOVDbSvc.h.


The documentation for this class was generated from the following files:
IOVDbSvc::postConditionsLoad
virtual void postConditionsLoad() override
May be called once conditions are loaded to let IOVDbSvc release resources.
Definition: IOVDbSvc.cxx:731
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IOVDbSvc::INITIALIZATION
@ INITIALIZATION
Definition: IOVDbSvc.h:260
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:407
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
IOVDbSvc::m_crestCoolToFile
BooleanProperty m_crestCoolToFile
Definition: IOVDbSvc.h:231
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IOVDbSvc::m_abort
bool m_abort
Definition: IOVDbSvc.h:283
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:1093
initialize
void initialize()
Definition: run_EoverP.cxx:894
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
IOVDbSvc::m_par_maxNumPoolFiles
IntegerProperty m_par_maxNumPoolFiles
Definition: IOVDbSvc.h:207
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
IOVDbSvc::poolSvcContext
int poolSvcContext()
Definition: IOVDbSvc.cxx:141
IOVDbSvc::m_foldermap
FolderMap m_foldermap
Definition: IOVDbSvc.h:281
AtlasMcWeight::number_type
unsigned int number_type
Definition: AtlasMcWeight.h:20
IOVDbSvc::m_h_poolSvc
ServiceHandle< IPoolSvc > m_h_poolSvc
Definition: IOVDbSvc.h:240
pool::IFileCatalog::commit
void commit()
Save catalog to file.
Definition: IFileCatalog.h:49
IOVDbSvc::m_par_timeStampSlop
FloatProperty m_par_timeStampSlop
Definition: IOVDbSvc.h:209
IOVDbSvc::m_par_manageConnections
BooleanProperty m_par_manageConnections
Definition: IOVDbSvc.h:197
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::FINALIZE_ALG
@ FINALIZE_ALG
Definition: IOVDbSvc.h:263
IOVDbSvc::m_h_metaDataStore
ServiceHandle< StoreGateSvc > m_h_metaDataStore
Definition: IOVDbSvc.h:237
CoralCrestManager::getGlobalTagMap
static std::map< std::string, std::string > getGlobalTagMap(const std::string &crest_path, const std::string &globaltag)
Definition: CoralCrestManager.cxx:57
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:239
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:217
IOVDbSvc::m_par_forceRunNumber
IntegerProperty m_par_forceRunNumber
Definition: IOVDbSvc.h:201
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:203
lumiFormat.i
int i
Definition: lumiFormat.py:85
IOVDbSvc::BEGIN_RUN
@ BEGIN_RUN
Definition: IOVDbSvc.h:261
ITagInfoMgr::NameTagPairVec
std::vector< NameTagPair > NameTagPairVec
Definition: ITagInfoMgr.h:66
Athena::DBLock
Common database lock.
Definition: DBLock.h:46
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:216
IOVDbSvc::m_par_crestServer
StringProperty m_par_crestServer
Definition: IOVDbSvc.h:224
IOVTime::reset
void reset() noexcept
Definition: IOVTime.cxx:108
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:210
IOVDbSvc::m_poolSvcContext
int m_poolSvcContext
Definition: IOVDbSvc.h:251
calibdata.exception
exception
Definition: calibdata.py:495
IOVDbSvc::checkEventSel
StatusCode checkEventSel()
Definition: IOVDbSvc.cxx:875
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
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:226
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:199
IOVDbSvc::m_par_defaultConnection
Gaudi::Property< std::string > m_par_defaultConnection
Definition: IOVDbSvc.h:185
hist_file_dump.f
f
Definition: hist_file_dump.py:140
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:242
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:218
IOVDbSvc::m_iovTime
IOVTime m_iovTime
Definition: IOVDbSvc.h:268
StoreID::DETECTOR_STORE
@ DETECTOR_STORE
Definition: StoreID.h:27
IOVDbConn::setInactive
void setInactive()
Definition: IOVDbConn.cxx:114
IOVDbSvc::m_connections
ConnVec m_connections
Definition: IOVDbSvc.h:278
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
IOVDbSvc::FolderMap
std::map< std::string, IOVDbFolder * > FolderMap
Definition: IOVDbSvc.h:280
IOVDbSvc::m_par_checklock
BooleanProperty m_par_checklock
Definition: IOVDbSvc.h:220
IOVDbConn
Definition: IOVDbConn.h:18
dumpBeamSpot.dbconn
dbconn
Definition: dumpBeamSpot.py:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
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:193
IOVDbSvc::m_outputToFile
BooleanProperty m_outputToFile
Definition: IOVDbSvc.h:230
IOVDbSvc::m_state
IOVDbSvc_state m_state
Definition: IOVDbSvc.h:265
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:238
IOVTime::MINEVENT
static constexpr uint32_t MINEVENT
Definition: IOVTime.h:50
IOVDbSvc::m_par_cacheRun
IntegerProperty m_par_cacheRun
Definition: IOVDbSvc.h:211
SG::TransientAddress::setAddress
void setAddress(IOpaqueAddress *pAddress)
Retrieve primary clid.
Definition: TransientAddress.cxx:194
IOVDbSvc::EVENT_LOOP
@ EVENT_LOOP
Definition: IOVDbSvc.h:262
python.Dumpers.tlist
list tlist
Definition: Dumpers.py:5561
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:66
IOVDbSvc::m_par_globalTag
Gaudi::Property< std::string > m_par_globalTag
Definition: IOVDbSvc.h:187
IOVDbSvc::m_par_dbinst
Gaudi::Property< std::string > m_par_dbinst
Definition: IOVDbSvc.h:189
IOVDbSvc::m_poolPayloadRequested
bool m_poolPayloadRequested
Definition: IOVDbSvc.h:247
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:191
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:55
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
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:23
makeDTCalibBlob_pickPhase.theTag
def theTag
Definition: makeDTCalibBlob_pickPhase.py:384
IOVDbSvc::m_iovslop
cool::ValidityKey m_iovslop
Definition: IOVDbSvc.h:274
IOVDbSvc::m_h_detStore
ServiceHandle< StoreGateSvc > m_h_detStore
Definition: IOVDbSvc.h:236
IOVDbSvc::loadCaches
StatusCode loadCaches(IOVDbConn *conn, const IOVTime *time=nullptr)
Definition: IOVDbSvc.cxx:1128
SG::DataProxy
Definition: DataProxy.h:45
IOVDbSvc::setupFolders
StatusCode setupFolders()
Definition: IOVDbSvc.cxx:935
IOVDbSvc::m_h_IOVSvc
ServiceHandle< IIOVSvc > m_h_IOVSvc
Definition: IOVDbSvc.h:234
SG::ConstIterator
Definition: SGIterator.h:164
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
IOVDbSvc::m_par_source
StringProperty m_par_source
Definition: IOVDbSvc.h:222
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
IOVDbSvc::m_h_sgSvc
ServiceHandle< StoreGateSvc > m_h_sgSvc
Definition: IOVDbSvc.h:235
IOVDbSvc::m_par_foldersToWrite
Gaudi::Property< std::vector< std::string > > m_par_foldersToWrite
Definition: IOVDbSvc.h:195
IOVDbSvc::m_globalTag
std::string m_globalTag
Definition: IOVDbSvc.h:271
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:241
IOVDbSvc::m_par_forceTimestamp
IntegerProperty m_par_forceTimestamp
Definition: IOVDbSvc.h:205
IOVDbSvc::checkConfigConsistency
StatusCode checkConfigConsistency() const
Definition: IOVDbSvc.cxx:1174
ServiceHandle< Gaudi::Interfaces::IOptionsSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
IOVDbSvc::m_par_cacheTime
IntegerProperty m_par_cacheTime
Definition: IOVDbSvc.h:213
StoreClearedIncident
Incident sent after a store is cleared.
Definition: StoreClearedIncident.h:30