ATLAS Offline Software
Loading...
Searching...
No Matches
CondContMixedBase Class Referenceabstract

Base class for conditions containers for which keys are ranges in both Run+LBN and timestamp. More...

#include <CondCont.h>

Inheritance diagram for CondContMixedBase:
Collaboration diagram for CondContMixedBase:

Public Types

enum class  KeyType { SINGLE , TIMESTAMP , RUNLBN , MIXED }
 Type of key used for this container. More...
typedef void Payload
 Payload type held by this class.
typedef uint64_t key_type
 Type used to store an IOV time internally.

Public Member Functions

virtual void list (std::ostream &ost) const override final
 Dump the container contents for debugging.
virtual size_t entries () const override final
 Return the number of conditions objects in the container.
virtual std::vector< EventIDRange > ranges () const override final
 Return all IOV validity ranges defined in this container.
virtual StatusCode typelessInsert (const EventIDRange &r, void *obj, const EventContext &ctx) override final
 Insert a new conditions object.
virtual bool valid (const EventIDBase &t) const override final
 Test to see if a given IOV time is mapped in the container.
virtual bool range (const EventIDBase &t, EventIDRange &r) const override final
 Return the mapped validity range for an IOV time.
virtual StatusCode erase (const EventIDBase &t, const EventContext &ctx) override final
 Erase the first element not less than t.
virtual StatusCode extendLastRange (const EventIDRange &newRange, const EventContext &ctx) override final
 Extend the range of the last IOV.
CLID clid () const
 Return the CLID of the most-derived CondCont.
KeyType keyType () const
 Return the key type for this container.
const DataObjID & id () const
 Return CLID/key corresponding to this container.
SG::DataProxyproxy ()
 Return the associated DataProxy, if any.
const SG::DataProxyproxy () const
 Return the associated DataProxy, if any.
void setProxy (SG::DataProxy *)
 Set the associated DataProxy.
void print () const
 Dump the container to cout.
virtual size_t trim (const std::vector< key_type > &runLbnKeys, const std::vector< key_type > &TSKeys)
 Remove unused entries from the front of the list.
void clear ()
 Remove all entries in the container.
void quiescent (const EventContext &ctx)
 Mark that this thread is no longer accessing data from this container.
size_t nInserts () const
 Return the number times an item was inserted into the map.
size_t maxSize () const
 Return the maximum size of the map.
void addDep (CondContBase *dep)
 Declare another conditions container that depends on this one.
std::vector< CondContBase * > getDeps ()
 Return the list of conditions containers that depend on this one.

Static Public Member Functions

static key_type keyFromRunLBN (const EventIDBase &b)
 Make a run+lbn key from an EventIDBase.
static key_type keyFromTimestamp (const EventIDBase &b)
 Make a timestamp key from an EventIDBase.
static void setCleanerSvcName ATLAS_NOT_THREAD_SAFE (const std::string &name)
 Allow overriding the name of the global conditions cleaner service (for testing purposes).

Protected Types

typedef CxxUtils::ConcurrentRangeMap< RangeKey, key_type, void, Compare, Athena::RCUUpdaterCondContSet
typedef CondContSet::Updater_t Updater_t
typedef CondContSet::delete_function delete_function

Protected Member Functions

 CondContMixedBase (Athena::IRCUSvc &rcusvc, CLID clid, const DataObjID &id, SG::DataProxy *proxy, std::shared_ptr< CondContSet::IPayloadDeleter > payloadDeleter, size_t capacity)
 Internal constructor.
StatusCode insertMixed (const EventIDRange &r, CondContBase::CondContSet::payload_unique_ptr t, const EventContext &ctx)
 Insert a new conditions object.
const void * findMixed (const EventIDBase &t, EventIDRange const **r) const
 Internal lookup function.
delete_functionpayloadDelfcn () const
 Return the payload deletion function for this container.
StatusCode insertBase (const EventIDRange &r, CondContSet::payload_unique_ptr t, const EventContext &ctx)
 Insert a new conditions object.
StatusCode eraseBase (const EventIDBase &t, const EventContext &ctx)
 Erase the first element not less than t.
StatusCode extendLastRangeBase (const EventIDRange &newRange, const EventContext &ctx)
 Extend the range of the last IOV.
const void * findBase (const EventIDBase &t, EventIDRange const **r) const
 Internal lookup function.
const void * cast (CLID clid, const void *ptr) const
 Do pointer conversion for the payload type.
virtual const void * doCast (CLID clid, const void *ptr) const =0
 Do pointer conversion for the payload type.
template<class FUNC>
void forEach (const FUNC &func) const
 Call func on each entry in the container.
StatusCode inserted (const EventContext &ctx)
 Tell the cleaner that a new object was added to the container.
void insertError (CLID usedCLID) const
 Helper to report an error due to using a base class for insertion.
delete_functiondelfcn () const
 Return the deletion function for this container.
std::string title () const
 Description of this container to use for MsgStream.

Private Types

using DepSet = CxxUtils::ConcurrentPtrSet<CondContBase, CxxUtils::SimpleUpdater>
 Other conditions dependencies that depend on this one, as inferred by addDependency calls.

Private Attributes

Athena::IRCUSvcm_rcusvc
 Need to remember the RCU svc here in order to pass it to the TS maps.
std::shared_ptr< CondContSet::IPayloadDeleter > m_payloadDeleter
 Deletion object for actual payload objects.
std::mutex m_mutex
 Mutex for insertions.
std::atomic< KeyTypem_keyType
 Key type of this container.
CLID m_clid
 CLID of the most-derived CondCont.
DataObjID m_id
 CLID+key for this container.
SG::DataProxym_proxy
 Associated DataProxy.
CondContSet m_condSet
 Set of mapped objects.
ServiceHandle< Athena::IConditionsCleanerSvcm_cleanerSvc
 Handle to the cleaner service.
DepSet m_deps

Static Private Attributes

static std::string s_cleanerSvcName ATLAS_THREAD_SAFE
 Name of the global conditions cleaner service.

Detailed Description

Base class for conditions containers for which keys are ranges in both Run+LBN and timestamp.

Definition at line 1030 of file CondCont.h.

Member Typedef Documentation

◆ CondContSet

Definition at line 517 of file CondCont.h.

◆ delete_function

typedef CondContSet::delete_function CondContBase::delete_function
protectedinherited

Definition at line 520 of file CondCont.h.

◆ DepSet

Other conditions dependencies that depend on this one, as inferred by addDependency calls.

There should only be a few of them.

Definition at line 682 of file CondCont.h.

◆ key_type

typedef uint64_t CondContBase::key_type
inherited

Type used to store an IOV time internally.

For efficiency, we pack two 32-bit words into a 64-bit word Can be either run+lbn or a timestamp.

Definition at line 204 of file CondCont.h.

◆ Payload

typedef void CondContBase::Payload
inherited

Payload type held by this class.

Need to define this here for cast() to work properly.

Definition at line 198 of file CondCont.h.

◆ Updater_t

typedef CondContSet::Updater_t CondContBase::Updater_t
protectedinherited

Definition at line 519 of file CondCont.h.

Member Enumeration Documentation

◆ KeyType

enum class CondContBase::KeyType
stronginherited

Type of key used for this container.

Enumerator
SINGLE 

Either TIMESTAMP or RUNLBN, but nothing's been put in the container yet, so we don't know which one.

TIMESTAMP 

Container uses timestamp keys.

RUNLBN 

Container uses run+lbn keys.

MIXED 

Mixed Run+lbn / timestamp container.

Definition at line 179 of file CondCont.h.

180 {
183 SINGLE,
184
186 TIMESTAMP,
187
189 RUNLBN,
190
192 MIXED,
193 };

Constructor & Destructor Documentation

◆ CondContMixedBase()

CondContMixedBase::CondContMixedBase ( Athena::IRCUSvc & rcusvc,
CLID clid,
const DataObjID & id,
SG::DataProxy * proxy,
std::shared_ptr< CondContSet::IPayloadDeleter > payloadDeleter,
size_t capacity )
protected

Internal constructor.

Parameters
rcusvcRCU service instance.
CLIDof the most-derived CondCont.
idCLID+key for this object.
proxyDataProxy for this object.
payloadDeleterObject for deleting actual payload objects.
capacityInitial capacity of the container.

Definition at line 900 of file CondCont.cxx.

906 : CondContBase (rcusvc, KeyType::MIXED, clid, id, proxy,
907 std::make_shared<Athena::CondObjDeleter<CondContSet> > (rcusvc),
908 capacity),
909 m_rcusvc (rcusvc),
910 m_payloadDeleter (std::move(payloadDeleter))
911{
912}
@ MIXED
Mixed Run+lbn / timestamp container.
Definition CondCont.h:192
CondContBase(Athena::IRCUSvc &rcusvc, KeyType keytype, CLID clid, const DataObjID &id, SG::DataProxy *proxy, std::shared_ptr< CondContSet::IPayloadDeleter > payloadDeleter, size_t capacity)
Internal constructor.
Definition CondCont.cxx:408
CLID clid() const
Return the CLID of the most-derived CondCont.
SG::DataProxy * proxy()
Return the associated DataProxy, if any.
Athena::IRCUSvc & m_rcusvc
Need to remember the RCU svc here in order to pass it to the TS maps.
Definition CondCont.h:1185
std::shared_ptr< CondContSet::IPayloadDeleter > m_payloadDeleter
Deletion object for actual payload objects.
Definition CondCont.h:1188

Member Function Documentation

◆ addDep()

void CondContBase::addDep ( CondContBase * dep)
inherited

Declare another conditions container that depends on this one.

Parameters
depConditions container that depends on this one.

Definition at line 695 of file CondCont.cxx.

696{
697 m_deps.insert (dep);
698}
DepSet m_deps
Definition CondCont.h:683

◆ ATLAS_NOT_THREAD_SAFE()

void setCleanerSvcName CondContBase::ATLAS_NOT_THREAD_SAFE ( const std::string & name)
staticinherited

Allow overriding the name of the global conditions cleaner service (for testing purposes).

Parameters
nameThe name of the global conditions cleaner service.

◆ cast()

const void * CondContBase::cast ( CLID clid,
const void * ptr ) const
protectedinherited

Do pointer conversion for the payload type.

Parameters
clidCLID for the desired pointer type.
ptrPointer of type T*.

Converts ptr from T* to a pointer to the type given by clid. Returns nullptr if the conversion is not possible.

◆ clear()

void CondContBase::clear ( )
inherited

Remove all entries in the container.

Mostly for testing — should not normally be used.

Definition at line 360 of file CondCont.cxx.

361{
362 m_condSet.clear();
363}
CondContSet m_condSet
Set of mapped objects.
Definition CondCont.h:675

◆ clid()

CLID CondContBase::clid ( ) const
inherited

Return the CLID of the most-derived CondCont.

◆ delfcn()

CondContBase::delete_function * CondContBase::delfcn ( ) const
protectedinherited

Return the deletion function for this container.

Definition at line 739 of file CondCont.cxx.

740{
741 return m_condSet.deleter().delfcn();
742}

◆ doCast()

virtual const void * CondContBase::doCast ( CLID clid,
const void * ptr ) const
protectedpure virtualinherited

Do pointer conversion for the payload type.

Parameters
clidCLID for the desired pointer type.
ptrPointer of type T*.

Converts ptr from T* to a pointer to the type given by clid. Returns nullptr if the conversion is not possible.

This is a virtual function that calls cast from the most-derived class of the hierarchy.

Implemented in CondCont< T >, CondCont< ActsTrk::ActsVolumeIdToDetectorElementCollectionMap >, CondCont< ActsTrk::DetectorAlignStore >, CondCont< ALineContainer >, CondCont< Analysis::JetTagCalibCondData >, CondCont< AthenaAttributeList >, CondCont< AtlasFieldCacheCondObj >, CondCont< AtlasFieldMapCondObj >, CondCont< BLineContainer >, CondCont< BunchCrossingAverageCondData >, CondCont< BunchCrossingCondData >, CondCont< BunchCrossingIntensityCondData >, CondCont< BunchGroupCondData >, CondCont< BunchLumisCondData >, CondCont< calib_data_t >, CondCont< CaloAffectedRegionInfoVec >, CondCont< CaloBCIDCoeffs >, CondCont< CaloBCIDLumi >, CondCont< CaloCellPedShift >, CondCont< CaloDetDescrManager >, CondCont< CaloLocalHadCoeff >, CondCont< CaloNoise >, CondCont< CaloNoiseSigmaDiff >, CondCont< CaloRec::CaloCellPositionShift >, CondCont< CaloRec::ToolConstants >, CondCont< CaloSuperCellDetDescrManager >, CondCont< CaloTowerGeometry >, CondCont< CondAttrListVec >, CondCont< CONDDATA >, CondCont< CondDataObj >, CondCont< CondDataObjY >, CondCont< CondDataObjZ >, CondCont< CondMultChanCollection< AlignableTransform > >, CondCont< CscCondDbData >, CondCont< DataVector< HGTD_DetectorElement > >, CondCont< DetCondCFloat >, CondCont< DetCondKeyTrans >, CondCont< DMTest::S1 >, CondCont< DMTest::S2 >, CondCont< DMTest::S3 >, CondCont< external_detector_element_collection_t >, CondCont< FillParamsCondData >, CondCont< GeoAlignmentStore >, CondCont< HGTDMappingData >, CondCont< HTcalculator >, CondCont< IdentifierSet >, CondCont< ILArAutoCorr >, CondCont< ILArDAC2uA >, CondCont< ILArfSampl >, CondCont< ILArHVScaleCorr >, CondCont< ILArMinBias >, CondCont< ILArMinBiasAverage >, CondCont< ILArMphysOverMcal >, CondCont< ILArNoise >, CondCont< ILArOFC >, CondCont< ILArOFCBin >, CondCont< ILArPedestal >, CondCont< ILArRamp >, CondCont< ILArShape >, CondCont< ILAruA2MeV >, CondCont< InDet::BeamSpotData >, CondCont< InDet::SiDetectorElementStatus >, CondCont< InDet::SiDetElementBoundaryLinks_xk >, CondCont< InDet::SiElementPropertiesTable >, CondCont< InDet::SiliconPropertiesVector >, CondCont< InDet::TRT_DetElementsRoadData_xk >, CondCont< InDet::TRT_TrackSegmentsToolCondData_xk >, CondCont< InDet::TRTPIDNN >, CondCont< InDetDD::HGTD_DetectorElementCollection >, CondCont< InDetDD::SiDetectorElementCollection >, CondCont< InDetDD::TRT_DetElementContainer >, CondCont< ITk::PixelOfflineCalibData >, CondCont< ITkPixelCablingData >, CondCont< ITkPixFieldMaps >, CondCont< ITkStripCablingData >, CondCont< JGTowerMappingData >, CondCont< L1CaloDerivedRunParsContainer >, CondCont< L1CaloDisabledTowersContainer >, CondCont< L1CaloPpmDeadChannelsContainer >, CondCont< L1CaloPpmFineTimeRefsContainer >, CondCont< L1CaloPprChanCalibContainer >, CondCont< L1CaloPprChanDefaultsContainer >, CondCont< L1CaloPprChanStrategyContainer >, CondCont< L1CaloPprConditionsContainerRun2 >, CondCont< L1CaloPprDisabledChannelContainerRun2 >, CondCont< L1CaloReadoutConfigContainer >, CondCont< L1CaloReadoutConfigContainerJSON >, CondCont< L1CaloRunParametersContainer >, CondCont< LArADC2MeV >, CondCont< LArAutoCorrNoise >, CondCont< LArAutoCorrTotal >, CondCont< LArBadXCont< LArBadChannel > >, CondCont< LArBadXCont< LArBadFeb > >, CondCont< LArCalibLineMapping >, CondCont< LArCaliWaveContainer >, CondCont< LArDeadOTXCorrFactors >, CondCont< LArDSPThresholdsComplete >, CondCont< LArFebConfig >, CondCont< LArFebRodMapping >, CondCont< LArFEBTempData >, CondCont< LArfSamplSC >, CondCont< LArHVCorr >, CondCont< LArHVIdMapping >, CondCont< LArHVNMap >, CondCont< LArHVPathology >, CondCont< LArLATOMEMapping >, CondCont< LArMCSym >, CondCont< LArOFC >, CondCont< LArOFCweightSC >, CondCont< LArOnOffIdMapping >, CondCont< LArRinjComplete >, CondCont< LArRoIMap >, CondCont< LArXTalkWeight >, CondCont< LArXTalkWeightGlobal >, CondCont< LBDurationCondData >, CondCont< LuminosityCondData >, CondCont< LVL1::gFEXDBCondData >, CondCont< LVL1::jFEXDBCondData >, CondCont< LWTNNCollection >, CondCont< MC_t >, CondCont< MdtAsBuiltContainer >, CondCont< MdtCondDbData >, CondCont< Muon::DigitEffiData >, CondCont< Muon::MmCTPClusterCalibData >, CondCont< Muon::MuonIntersectGeoData >, CondCont< Muon::RpcCablingMap >, CondCont< Muon::TgcCablingMap >, CondCont< Muon::TwinTubeMap >, CondCont< MuonAlignmentErrorData >, CondCont< MuonCalib::MdtCalibDataContainer >, CondCont< MuonGM::MuonDetectorManager >, CondCont< MuonMDT_CablingMap >, CondCont< Nsw_CablingMap >, CondCont< NswAsBuiltDbData >, CondCont< NswCalibDbThresholdData >, CondCont< NswCalibDbTimeChargeData >, CondCont< NswDcsDbData >, CondCont< NswErrorCalibData >, CondCont< NswPassivationDbData >, CondCont< NswT0Data >, CondCont< OnlineLumiCalibrationCondData >, CondCont< OnnxNNCollection >, CondCont< PixelCablingCondData >, CondCont< PixelCalib::PixelOfflineCalibData >, CondCont< PixelChargeCalibCondData >, CondCont< PixelDCSHVData >, CondCont< PixelDCSStateData >, CondCont< PixelDCSStatusData >, CondCont< PixelDCSTempData >, CondCont< PixelDeadMapCondData >, CondCont< PixeldEdxData >, CondCont< PixelDistortionData >, CondCont< PixelHitDiscCnfgData >, CondCont< PixelModuleData >, CondCont< PixelRadiationDamageFluenceMapData >, CondCont< PixelReadoutSpeedData >, CondCont< PixelTDAQData >, CondCont< REFCONTAINER >, CondCont< RegSelCondData< IRegSelLUT > >, CondCont< RIO_OnTrackErrorScaling >, CondCont< RpcCablingCondData >, CondCont< RpcCondDbData >, CondCont< RtRelationContainer >, CondCont< SCT_AllGoodStripInfo >, CondCont< SCT_CablingData >, CondCont< SCT_CalibDefectData >, CondCont< SCT_CondParameterData >, CondCont< SCT_ConfigurationCondData >, CondCont< SCT_DCSFloatCondData >, CondCont< SCT_DCSStatCondData >, CondCont< SCT_GainCalibData >, CondCont< SCT_MajorityCondData >, CondCont< SCT_ModuleVetoCondData >, CondCont< SCT_MonitorCondData >, CondCont< SCT_NoiseCalibData >, CondCont< SCT_SensorsCondData >, CondCont< SCT_TdaqEnabledCondData >, CondCont< SiDetElementsLayerVectors_xk >, CondCont< SiLorentzAngleCondData >, CondCont< sTGCAsBuiltData >, CondCont< StrawT0Container >, CondCont< SYM_t >, CondCont< T_DefectsData >, CondCont< T_EmulatedDefects >, CondCont< TgcCondDbData >, CondCont< TgcDigitASDposData >, CondCont< TgcDigitCrosstalkData >, CondCont< TgcDigitJitterData >, CondCont< TgcDigitThresholdData >, CondCont< TgcDigitTimeOffsetData >, CondCont< TGCTriggerData >, CondCont< TGCTriggerLUTs >, CondCont< TileBadChannels >, CondCont< TileCalibData< TileCalibDrawerFlt > >, CondCont< TileCalibData< TileCalibDrawerOfc > >, CondCont< TileDCSState >, CondCont< TileEMScale >, CondCont< TileHid2RESrcID >, CondCont< TilePulse >, CondCont< TileSampleNoise >, CondCont< TileSamplingFraction >, CondCont< TileTiming >, CondCont< TrigConf::HLTPrescalesSet >, CondCont< TrigConf::L1BunchGroupSet >, CondCont< TrigConf::L1PrescalesSet >, CondCont< TrigLiveFractionCondData >, CondCont< Trk::LayerMaterialMap >, CondCont< Trk::SolenoidParametrization >, CondCont< Trk::TrackingGeometry >, CondCont< TRTCond::ActiveFraction >, CondCont< TRTCond::AliveStraws >, CondCont< TRTCond::AverageT0 >, CondCont< TRTCond::HWMap >, CondCont< TRTCond::RtRelationMultChanContainer >, CondCont< TRTCond::StrawDxContainer >, CondCont< TRTCond::StrawStatusData >, CondCont< TRTCond::StrawStatusMultChanContainer >, CondCont< TRTCond::StrawStatusSummary >, CondCont< TRTCond::StrawT0MultChanContainer >, CondCont< TRTDedxcorrection >, CondCont< TTrainedNetworkCollection >, and CondContMixed< T >.

◆ entries()

size_t CondContMixedBase::entries ( ) const
finaloverridevirtual

Return the number of conditions objects in the container.

Reimplemented from CondContBase.

Definition at line 942 of file CondCont.cxx.

943{
944 size_t nent = 0;
945 forEach ([&] (const CondContSet::value_type& ent) {
946 const CondContSet* tsmap =
947 reinterpret_cast<const CondContSet*> (ent.second);
948 nent += tsmap->size();
949 });
950 return nent;
951}
void forEach(const FUNC &func) const
Call func on each entry in the container.
CxxUtils::ConcurrentRangeMap< RangeKey, key_type, void, Compare, Athena::RCUUpdater > CondContSet
Definition CondCont.h:517

◆ erase()

StatusCode CondContMixedBase::erase ( const EventIDBase & t,
const EventContext & ctx )
finaloverridevirtual

Erase the first element not less than t.

Parameters
IOVtime of element to erase.
ctxEvent context for the current thread.

This is not implemented for mixed containers.

Implements CondContBase.

Definition at line 1032 of file CondCont.cxx.

1034{
1035 MsgStream msg (Athena::getMessageSvc(), title());
1036 msg << MSG::ERROR << "CondContMixedBase::erase: "
1037 << "erase() is not implemented for mixed containers."
1038 << endmsg;
1039 return StatusCode::FAILURE;
1040}
#define endmsg
std::string title() const
Description of this container to use for MsgStream.
Definition CondCont.cxx:748
IMessageSvc * getMessageSvc(bool quiet=false)
MsgStream & msg
Definition testRead.cxx:32

◆ eraseBase()

StatusCode CondContBase::eraseBase ( const EventIDBase & t,
const EventContext & ctx )
protectedinherited

Erase the first element not less than t.

Parameters
IOVtime of element to erase.
ctxEvent context for the current thread.

Definition at line 538 of file CondCont.cxx.

540{
541 switch (m_keyType) {
542 case KeyType::RUNLBN:
543 if (!t.isRunLumi()) {
544 MsgStream msg (Athena::getMessageSvc(), title());
545 msg << MSG::ERROR << "CondContBase::erase: "
546 << "Non-Run/LBN key used in Run/LBN container."
547 << endmsg;
548 return StatusCode::FAILURE;
549 }
550 m_condSet.erase (CondContBase::keyFromRunLBN (t), ctx);
551 break;
553 if (!t.isTimeStamp()) {
554 MsgStream msg (Athena::getMessageSvc(), title());
555 msg << MSG::ERROR << "CondContBase::erase: "
556 << "Non-Timestamp key used in timestamp container."
557 << endmsg;
558 return StatusCode::FAILURE;
559 }
561 break;
562 case KeyType::SINGLE:
563 break;
564 default:
565 std::abort();
566 }
567 return StatusCode::SUCCESS;
568}
@ SINGLE
Either TIMESTAMP or RUNLBN, but nothing's been put in the container yet, so we don't know which one.
Definition CondCont.h:183
@ TIMESTAMP
Container uses timestamp keys.
Definition CondCont.h:186
@ RUNLBN
Container uses run+lbn keys.
Definition CondCont.h:189
std::atomic< KeyType > m_keyType
Key type of this container.
Definition CondCont.h:663
static key_type keyFromTimestamp(const EventIDBase &b)
Make a timestamp key from an EventIDBase.
static key_type keyFromRunLBN(const EventIDBase &b)
Make a run+lbn key from an EventIDBase.

◆ extendLastRange()

StatusCode CondContMixedBase::extendLastRange ( const EventIDRange & newRange,
const EventContext & ctx )
finaloverridevirtual

Extend the range of the last IOV.

Parameters
newRangeNew validity range.
ctxEvent context.

Returns failure if the start time of newRange does not match the start time of the last IOV in the container. Otherwise, the end time for the last IOV is changed to the end time for newRange. (If the end time for newRange is before the end of the last IOV, then nothing is changed.)

This is not implemented for mixed containers.

Implements CondContBase.

Definition at line 1056 of file CondCont.cxx.

1058{
1059 MsgStream msg (Athena::getMessageSvc(), title());
1060 msg << MSG::ERROR << "CondContMixedBase::extendLastRange: "
1061 << "extendLastRange() is not implemented for mixed containers."
1062 << endmsg;
1063 return StatusCode::FAILURE;
1064}

◆ extendLastRangeBase()

StatusCode CondContBase::extendLastRangeBase ( const EventIDRange & newRange,
const EventContext & ctx )
protectedinherited

Extend the range of the last IOV.

Parameters
newRangeNew validity range.
ctxEvent context.

Returns failure if the start time of newRange does not match the start time of the last IOV in the container. Otherwise, the end time for the last IOV is changed to the end time for newRange. (If the end time for newRange is before the end of the last IOV, then nothing is changed.)

Definition at line 582 of file CondCont.cxx.

584{
587 switch (m_keyType) {
588 case KeyType::RUNLBN:
589 case KeyType::MIXED: // To handle the extension case of insertMixed().
590 if (!newRange.start().isRunLumi()) {
591 MsgStream msg (Athena::getMessageSvc(), title());
592 msg << MSG::ERROR << "CondContBase::extendLastRange: "
593 << "Non-Run/LBN range used in Run/LBN container."
594 << endmsg;
595 return StatusCode::FAILURE;
596 }
597 start = keyFromRunLBN (newRange.start());
598 stop = keyFromRunLBN (newRange.stop());
599 break;
601 if (!newRange.start().isTimeStamp()) {
602 MsgStream msg (Athena::getMessageSvc(), title());
603 msg << MSG::ERROR << "CondContBase::extendLastRange: "
604 << "Non-timestamp range used in timestamp container."
605 << endmsg;
606 return StatusCode::FAILURE;
607 }
608 start = keyFromTimestamp (newRange.start());
609 stop = keyFromTimestamp (newRange.stop());
610 break;
611 case KeyType::SINGLE:
612 // Empty container.
613 return StatusCode::FAILURE;
614 default:
615 std::abort();
616 }
617
618 if (m_condSet.extendLastRange (RangeKey (newRange, start, stop), ctx) >= 0)
619 {
620 return StatusCode::SUCCESS;
621 }
622 return StatusCode::FAILURE;
623}
uint64_t key_type
Type used to store an IOV time internally.
Definition CondCont.h:204
Range object to store in ConcurrentRangeMap.
Definition CondCont.h:425

◆ findBase()

const void * CondContBase::findBase ( const EventIDBase & t,
EventIDRange const ** r ) const
protectedinherited

Internal lookup function.

Parameters
tIOV time to find.
rIf non-null, copy validity range of the object here.

Looks up the conditions object corresponding to the IOV time t. If found, return the pointer (as a pointer to the payload type of the most-derived CondCont). Otherwise, return nullptr.

Parameters
clidCLID for the desired pointer type.
tIOV time to find.
rIf non-null, copy validity range of the object here.

Looks up the conditions object corresponding to the IOV time t. If found, convert the pointer to a pointer to the type identified by CLID and return it. Otherwise, return nullptr.

Definition at line 636 of file CondCont.cxx.

638{
639 const void* ptr = nullptr;
641 switch (m_keyType) {
642 case KeyType::RUNLBN:
643 case KeyType::MIXED:
644 if (!t.isRunLumi()) [[unlikely]] {
645 MsgStream msg (Athena::getMessageSvc(), title());
646 msg << MSG::ERROR << "CondContBase::findBase: "
647 << "Non-Run/LBN key used in Run/LBN container."
648 << endmsg;
649 return nullptr;
650 }
651 key = keyFromRunLBN (t);
652 break;
654 if (!t.isTimeStamp()) [[unlikely]] {
655 MsgStream msg (Athena::getMessageSvc(), title());
656 msg << MSG::ERROR << "CondContBase::findBase: "
657 << "Non-timestamp key used in timestamp container."
658 << endmsg;
659 return nullptr;
660 }
661 key = keyFromTimestamp (t);
662 break;
663 case KeyType::SINGLE:
664 // Empty container.
665 return nullptr;
666 default:
667 std::abort();
668 }
669
670 CondContSet::const_iterator it = m_condSet.find (key);
671 if (it && key < it->first.m_stop) {
672 if (r) {
673 *r = &it->first.m_range;
674 }
675 ptr = it->second;
676 }
677
678 return ptr;
679}
int r
Definition globals.cxx:22
bool first
Definition DeMoScan.py:534
void * ptr(T *p)
Definition SGImplSvc.cxx:74
#define unlikely(x)

◆ findMixed()

const void * CondContMixedBase::findMixed ( const EventIDBase & t,
EventIDRange const ** r ) const
protected

Internal lookup function.

Parameters
tIOV time to find.
rIf non-null, copy validity range of the object here.

Looks up the conditions object corresponding to the IOV time t. If found, return the pointer (as a pointer to the payload type of the most-derived CondCont). Otherwise, return nullptr.

Definition at line 1210 of file CondCont.cxx.

1212{
1213 if (!t.isTimeStamp()) {
1214 MsgStream msg (Athena::getMessageSvc(), title());
1215 msg << MSG::ERROR << "CondContMixedBase::findMixed: "
1216 << "No valid timestamp in key used with mixed container."
1217 << endmsg;
1218 return nullptr;
1219 }
1220
1221 auto dostall = []() { CxxUtils::stall(); return true; };
1222 const void* ptr = nullptr;
1223 CondContSet::const_iterator it;
1224 do {
1225 ptr = CondContBase::findBase (t, nullptr);
1226 if (!ptr) return nullptr;
1227
1228 const CondContSet* tsmap = reinterpret_cast<const CondContSet*> (ptr);
1230 it = tsmap->find (key);
1231
1232 if (it && key < it->first.m_stop) {
1233 if (r) {
1234 *r = &it->first.m_range;
1235 }
1236 ptr = it->second;
1237 }
1238 else {
1239 ptr = nullptr;
1240 }
1241
1242 // When we extend a range in a mixed container, the run/lbn fields
1243 // in the ts map are extended as a separate step. This means
1244 // that there is a window in which we can successfully look up
1245 // an entry, but the range we get will have the old, unextended
1246 // run/lbn. Work around here: if the run/lbn we're looking
1247 // for isn't in the range we get, then try again.
1248 } while (ptr &&
1249 keyFromRunLBN (t) >= keyFromRunLBN (it->first.m_range.stop()) &&
1250 dostall());
1251
1252 return ptr;
1253}
const void * findBase(const EventIDBase &t, EventIDRange const **r) const
Internal lookup function.
Definition CondCont.cxx:636

◆ forEach()

template<class FUNC>
void CondContBase::forEach ( const FUNC & func) const
protectedinherited

Call func on each entry in the container.

Parameters
funcFunctional to call on each entry.

func will be called on each container element (being passed const CondContSet::value_type&).

◆ getDeps()

std::vector< CondContBase * > CondContBase::getDeps ( )
inherited

Return the list of conditions containers that depend on this one.

Definition at line 704 of file CondCont.cxx.

705{
706 return std::vector<CondContBase*> (m_deps.begin(), m_deps.end());
707}

◆ id()

const DataObjID & CondContBase::id ( ) const
inherited

Return CLID/key corresponding to this container.

◆ insertBase()

StatusCode CondContBase::insertBase ( const EventIDRange & r,
CondContSet::payload_unique_ptr t,
const EventContext & ctx )
protectedinherited

Insert a new conditions object.

Parameters
rRange of validity of this object.
tPointer to the object being inserted.
ctxEvent context for the current thread.

Returns SUCCESS if the object was successfully inserted; EXTENDED if the last existing range in the container was extended to match the new range; OVERLAP if the object was inserted but the range partially overlaps with an existing one; DUPLICATE if the object wasn't inserted because the range duplicates an existing one, and FAILURE otherwise (ownership of the object will be taken in any case).

Definition at line 445 of file CondCont.cxx.

448{
449 EventIDBase start = r.start();
450 EventIDBase stop = r.stop();
451
452 key_type start_key, stop_key;
453
454 if (m_keyType == KeyType::MIXED) {
455 if (start.run_number() == EventIDBase::UNDEFNUM ||
456 stop.run_number() == EventIDBase::UNDEFNUM)
457 {
458 MsgStream msg (Athena::getMessageSvc(), title());
459 msg << MSG::ERROR << "CondContBase::insertBase: "
460 << "Run part of range invalid in mixed container."
461 << endmsg;
462 return StatusCode::FAILURE;
463 }
464
465 start_key = keyFromRunLBN (start);
466 stop_key = keyFromRunLBN (stop);
467 }
468 else if (start.isTimeStamp() && stop.isTimeStamp()) {
469 if (m_keyType == KeyType::SINGLE) {
471 }
472 else if (m_keyType != KeyType::TIMESTAMP) {
473 MsgStream msg (Athena::getMessageSvc(), title());
474 msg << MSG::ERROR << "CondContBase::insertBase: "
475 << "Timestamp key used in non-timestamp container."
476 << endmsg;
477 return StatusCode::FAILURE;
478 }
479
480 start_key = keyFromTimestamp (start);
481 stop_key = keyFromTimestamp (stop);
482 }
483
484 else if (start.run_number() != EventIDBase::UNDEFNUM &&
485 stop.run_number() != EventIDBase::UNDEFNUM)
486 {
487 if (m_keyType == KeyType::SINGLE) {
489 }
490 else if (m_keyType != KeyType::RUNLBN) {
491 MsgStream msg (Athena::getMessageSvc(), title());
492 msg << MSG::ERROR << "CondContBase::insertBase: "
493 << "Run/LBN key used in non-Run/LBN container."
494 << endmsg;
495 return StatusCode::FAILURE;
496 }
497
498 start_key = keyFromRunLBN (start);
499 stop_key = keyFromRunLBN (stop);
500 }
501
502 else {
503 MsgStream msg (Athena::getMessageSvc(), title());
504 msg << MSG::ERROR << "CondContBase::insertBase: EventIDRange " << r
505 << " is neither fully RunEvent nor TimeStamp"
506 << endmsg;
507 return StatusCode::FAILURE;
508 }
509
510 CondContSet::EmplaceResult reslt =
511 m_condSet.emplace( RangeKey(r, start_key, stop_key),
512 std::move(t),
514 ctx );
515
516 if (reslt == CondContSet::EmplaceResult::DUPLICATE)
517 {
519 }
520 else if (reslt == CondContSet::EmplaceResult::EXTENDED)
521 {
523 }
524 else if (reslt == CondContSet::EmplaceResult::OVERLAP) {
526 }
527
528 return this->inserted (ctx);
529}
StatusCode inserted(const EventContext &ctx)
Tell the cleaner that a new object was added to the container.
Definition CondCont.cxx:685

◆ inserted()

StatusCode CondContBase::inserted ( const EventContext & ctx)
protectedinherited

Tell the cleaner that a new object was added to the container.

Definition at line 685 of file CondCont.cxx.

686{
687 return m_cleanerSvc->condObjAdded (ctx, *this);
688}
ServiceHandle< Athena::IConditionsCleanerSvc > m_cleanerSvc
Handle to the cleaner service.
Definition CondCont.h:678

◆ insertError()

void CondContBase::insertError ( CLID usedCLID) const
protectedinherited

Helper to report an error due to using a base class for insertion.

Parameters
usedCLIDCLID of the class used for insertion.

Definition at line 726 of file CondCont.cxx.

727{
728 MsgStream msg (Athena::getMessageSvc(), title());
729 msg << MSG::ERROR << "CondCont<T>::insert: Not most-derived class; "
730 << "CLID used: " << usedCLID
731 << "; container CLID: " << m_clid
732 << endmsg;
733}
CLID m_clid
CLID of the most-derived CondCont.
Definition CondCont.h:666

◆ insertMixed()

StatusCode CondContMixedBase::insertMixed ( const EventIDRange & r,
CondContBase::CondContSet::payload_unique_ptr t,
const EventContext & ctx )
protected

Insert a new conditions object.

Parameters
rRange of validity of this object.
tPointer to the object being inserted.
ctxEvent context for the current thread.

Returns SUCCESS if the object was successfully inserted; OVERLAP if the object was inserted but the range partially overlaps with an existing one; DUPLICATE if the object wasn't inserted because the range duplicates an existing one, and FAILURE otherwise (ownership of the object will be taken in any case).

Parameters
rRange of validity of this object.
tPointer to the object being inserted.
ctxEvent context for the current thread.

Returns SUCCESS if the object was successfully inserted; EXTENDED if the last existing range in the container was extended to match the new range; OVERLAP if the object was inserted but the range partially overlaps with an existing one; DUPLICATE if the object wasn't inserted because the range duplicates an existing one, and FAILURE otherwise (ownership of the object will be taken in any case).

Definition at line 1083 of file CondCont.cxx.

1086{
1087 // Serialize insertions.
1088 std::lock_guard<std::mutex> lock (m_mutex);
1089
1090 const EventIDRange* range = nullptr;
1091 const void* tsmap_void = findBase (r.start(), &range);
1093 const_cast<CondContSet*>(reinterpret_cast<const CondContSet*> (tsmap_void));
1094
1095 // Only test start timestamp. stop timestamp may be missing
1096 // for open-ended ranges.
1097 key_type start_key=0; //If there is no TimeStamp in start, assume infinite range
1098 if (r.start().isTimeStamp() ) {
1099 start_key = keyFromTimestamp (r.start());
1100 }
1101
1102 key_type stop_key = keyFromTimestamp (r.stop());
1103
1104 StatusCode sc = StatusCode::SUCCESS;
1105 sc.ignore();
1106 if (tsmap) {
1107 if (r.start().run_number() != range->start().run_number() ||
1108 r.stop().run_number() != range->stop().run_number() ||
1109 r.start().lumi_block() != range->start().lumi_block() ||
1110 r.stop().lumi_block() != range->stop().lumi_block())
1111 {
1112 // Run+lbn part doesn't match. If this range contains only a single
1113 // timestamp range which matches the timestamp part of the key,
1114 // then try to extend it. Otherwise, give an error.
1115
1116 bool extended = false;
1117 if (tsmap->size() == 1) {
1118 CondContSet::const_iterator elt = tsmap->find (start_key);
1119 if (elt) {
1120 if (elt->first.m_start == start_key &&
1121 elt->first.m_stop == stop_key)
1122 {
1123 if (extendLastRangeBase (r, ctx).isSuccess())
1124 {
1126 sc.ignore();
1127 extended = true;
1128
1129 // We also need to update the ending run+lbn value
1130 // for each entry in the tsmap.
1131 // (This doesn't affect sorting within the tsmap.)
1132 // There's a potential race here: a lookup happening
1133 // between the extendLastRangeBase above and the updateRanges
1134 // below can get a range with an unupdated run/lbn.
1135 // It would be cleaner to do the extend/update as a single
1136 // operation, but for now we work around by having findMixed
1137 // retry if the run/lbn being sought is in the range
1138 // of the entry that's actually found.
1139 tsmap->updateRanges ([&] (RangeKey& k)
1140 { EventIDBase start = k.m_range.start();
1141 EventIDBase stop = k.m_range.stop();
1142 stop.set_run_number(r.stop().run_number());
1143 stop.set_lumi_block(r.stop().lumi_block());
1144 k.m_range = EventIDRange (start, stop);
1145 },
1146 ctx);
1147 }
1148 }
1149 }
1150 }
1151
1152 if (!extended) {
1153 MsgStream msg (Athena::getMessageSvc(), title());
1154 msg << MSG::ERROR << "CondContMixedBase::insertMixed: "
1155 << "Run+lbn part of new range doesn't match existing range, "
1156 << "or can't extend. "
1157 << "New: " << r << "; existing: " << *range
1158 << endmsg;
1159 return StatusCode::FAILURE;
1160 }
1161 }
1162 }
1163 else {
1164 auto newmap = std::make_unique<CondContSet>
1166 tsmap = newmap.get();
1167 sc = insertBase (r, std::move (newmap), ctx);
1168 if (sc.isFailure()) {
1169 return sc;
1170 }
1171 else if (Category::isDuplicate (sc)) {
1172 // Shouldn't happen...
1173 std::abort();
1174 }
1175 }
1176
1177 CondContSet::EmplaceResult reslt =
1178 tsmap->emplace ( RangeKey(r, start_key, stop_key),
1179 std::move(t), false, ctx );
1180
1181 if (reslt == CondContSet::EmplaceResult::OVERLAP) {
1183 }
1184 else if (Category::isExtended (sc)) {
1185 return sc;
1186 }
1187 else if (reslt == CondContSet::EmplaceResult::DUPLICATE)
1188 {
1190 }
1191 else if (reslt == CondContSet::EmplaceResult::EXTENDED)
1192 {
1193 std::abort(); // Shouldn't happen.
1194 }
1195 return this->inserted (ctx);
1196 //return sc;
1197}
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
static Double_t sc
CondContSet::Updater_t Updater_t
Definition CondCont.h:519
static std::string s_cleanerSvcName ATLAS_THREAD_SAFE
Name of the global conditions cleaner service.
Definition CondCont.h:686
StatusCode extendLastRangeBase(const EventIDRange &newRange, const EventContext &ctx)
Extend the range of the last IOV.
Definition CondCont.cxx:582
StatusCode insertBase(const EventIDRange &r, CondContSet::payload_unique_ptr t, const EventContext &ctx)
Insert a new conditions object.
Definition CondCont.cxx:445
std::mutex m_mutex
Mutex for insertions.
Definition CondCont.h:1191
virtual bool range(const EventIDBase &t, EventIDRange &r) const override final
Return the mapped validity range for an IOV time.
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ keyFromRunLBN()

key_type CondContBase::keyFromRunLBN ( const EventIDBase & b)
staticinherited

Make a run+lbn key from an EventIDBase.

Parameters
EventID to convert.

◆ keyFromTimestamp()

key_type CondContBase::keyFromTimestamp ( const EventIDBase & b)
staticinherited

Make a timestamp key from an EventIDBase.

Parameters
EventID to convert.

◆ keyType()

KeyType CondContBase::keyType ( ) const
inherited

Return the key type for this container.

◆ list()

void CondContMixedBase::list ( std::ostream & ost) const
finaloverridevirtual

Dump the container contents for debugging.

Parameters
ostStream to which to write the dump.

Implements CondContBase.

Definition at line 919 of file CondCont.cxx.

920{
921 ost << "id: " << id() << " proxy: " << proxy() << " ["
922 << CondContBase::entries() << "] run+lbn entries" << std::endl;
923 forEach ([&] (const CondContSet::value_type& ent)
924 {
925 const CondContSet* tsmap =
926 reinterpret_cast<const CondContSet*> (ent.second);
927 if (tsmap->empty()) {
928 ost << ent.first.m_range << " (empty tsmap)" << std::endl;
929 }
930 else {
931 for (const CondContSet::value_type& ent2 : tsmap->range()) {
932 ost << ent2.first.m_range << " " << ent2.second << std::endl;
933 }
934 }
935 });
936}
virtual size_t entries() const
Return the number of conditions objects in the container.
Definition CondCont.cxx:293
const DataObjID & id() const
Return CLID/key corresponding to this container.

◆ maxSize()

size_t CondContBase::maxSize ( ) const
inherited

Return the maximum size of the map.

Definition at line 392 of file CondCont.cxx.

393{
394 return m_condSet.maxSize();
395}

◆ nInserts()

size_t CondContBase::nInserts ( ) const
inherited

Return the number times an item was inserted into the map.

Definition at line 383 of file CondCont.cxx.

384{
385 return m_condSet.nInserts();
386}

◆ payloadDelfcn()

CondContBase::delete_function * CondContMixedBase::payloadDelfcn ( ) const
protected

Return the payload deletion function for this container.

Definition at line 1259 of file CondCont.cxx.

1260{
1261 return m_payloadDeleter->delfcn();
1262}

◆ print()

void CondContBase::print ( ) const
inherited

Dump the container to cout.

For calling from the debugger.

Definition at line 284 of file CondCont.cxx.

285{
286 list (std::cout);
287}
virtual void list(std::ostream &ost) const =0
Dump the container contents for debugging.

◆ proxy() [1/2]

SG::DataProxy * CondContBase::proxy ( )
inherited

Return the associated DataProxy, if any.

◆ proxy() [2/2]

const SG::DataProxy * CondContBase::proxy ( ) const
inherited

Return the associated DataProxy, if any.

◆ quiescent()

void CondContBase::quiescent ( const EventContext & ctx)
inherited

Mark that this thread is no longer accessing data from this container.

Parameters
ctxEvent context for the current thread.

This would normally be done through RCU service. Defined here for purposes of testing.

Definition at line 374 of file CondCont.cxx.

375{
376 m_condSet.quiescent (ctx);
377}

◆ range()

bool CondContMixedBase::range ( const EventIDBase & t,
EventIDRange & r ) const
finaloverridevirtual

Return the mapped validity range for an IOV time.

Parameters
tIOV time to check.
r[out]The range containing t.

Returns true if t is mapped; false otherwise.

Implements CondContBase.

Definition at line 1013 of file CondCont.cxx.

1014{
1015 const EventIDRange* rp = nullptr;
1016 if (findMixed (t, &rp) != nullptr) {
1017 r = *rp;
1018 return true;
1019 }
1020 return false;
1021}
ReadCards * rp
const void * findMixed(const EventIDBase &t, EventIDRange const **r) const
Internal lookup function.

◆ ranges()

std::vector< EventIDRange > CondContMixedBase::ranges ( ) const
finaloverridevirtual

Return all IOV validity ranges defined in this container.

Implements CondContBase.

Definition at line 958 of file CondCont.cxx.

959{
960 std::vector<EventIDRange> r;
961 r.reserve (entries()*2);
962
963 forEach ([&] (const CondContSet::value_type& ent)
964 {
965 const CondContSet* tsmap =
966 reinterpret_cast<const CondContSet*> (ent.second);
967 for (const CondContSet::value_type& ent2 : tsmap->range()) {
968 r.push_back (ent2.first.m_range);
969 }
970 });
971
972 return r;
973}
virtual size_t entries() const override final
Return the number of conditions objects in the container.
Definition CondCont.cxx:942

◆ setProxy()

void CondContBase::setProxy ( SG::DataProxy * proxy)
inherited

Set the associated DataProxy.

Parameters
proxyThe proxy to set.

Definition at line 275 of file CondCont.cxx.

276{
277 m_proxy = proxy;
278}
SG::DataProxy * m_proxy
Associated DataProxy.
Definition CondCont.h:672

◆ title()

std::string CondContBase::title ( ) const
protectedinherited

Description of this container to use for MsgStream.

Definition at line 748 of file CondCont.cxx.

749{
750 return m_id.fullKey();
751}
DataObjID m_id
CLID+key for this container.
Definition CondCont.h:669

◆ trim()

size_t CondContBase::trim ( const std::vector< key_type > & runLbnKeys,
const std::vector< key_type > & TSKeys )
virtualinherited

Remove unused entries from the front of the list.

Parameters
runLbnKeysList of Run-Lumi keys that may still be in use. (Must be sorted.)
TSKeysList of time-stamp keys that may still be in use. (Must be sorted.)

We examine the objects in the container, starting with the earliest one. If none of the keys in keys match the range for this object, then it is removed from the container. We stop when we either find an object with a range matching a key in keys or when there is only one object left. Mixed containers are trimmed recursivly.

The list runLbnKeys should contain keys as computed by keyFromRunLBN, the list TSKey should contain keys from keyFromTimestamp. Depending on the type (RUNLUMI, TIMESTAMP, MIXED) only one of the lists or both are used. The list must be sorted.

Removed objects are queued for deletion once all slots have been marked as quiescent.

Returns the number of objects that were removed.

Parameters
keysList of keys that may still be in use. (Must be sorted.)

We examine the objects in the container, starting with the earliest one. If none of the keys in keys match the range for this object, then it is removed from the container. We stop when we either find an object with a range matching a key in keys or when there is only one object left.

The list keys should contain keys as computed by keyFromRunLBN or keyFromTimestamp, as appropriate for the container's key type (as returned from keyType()). The list must be sorted.

Removed objects are queued for deletion once all slots have been marked as quiescent.

Returns the number of objects that were removed.

Definition at line 319 of file CondCont.cxx.

320{
321 if (m_keyType == KeyType::RUNLBN) {
322 return m_condSet.trim (runLbnKeys);
323 }
324
326 return m_condSet.trim ( TSKeys );
327 }
328
329
330 if (m_keyType == KeyType::MIXED) {
331 //For mixed containers, first trim inner container based in TimeStamps
332 size_t nTrimmed=0;
333 for (const typename CondContSet::value_type& ent : m_condSet.range()) {
334 const CondContSet* tsmap = reinterpret_cast<const CondContSet*> (ent.second);
335 //size_t before=tsmap->size();
336 CondContSet* tsmap_nc ATLAS_THREAD_SAFE = const_cast<CondContSet*>(tsmap);
337 // Trim inner containers, allowing the removal of all elements.
338 // See ATLASRECTS-7421.
339 size_t ntrim=tsmap_nc->trim (TSKeys, true);
340 nTrimmed+=ntrim;
341 //std::cout << "WL: Trimming inner container for clid " << m_clid << " (" << ntrim << " out of " << before << ", nKeys= " << TSKeys.size() << ")" << std::endl;
342 }
343 // Then trim outer container based on run-LB.
344 size_t outerTrimmed=m_condSet.trim(runLbnKeys);
345 //std::cout << "WL: Removing outer sets " << outerTrimmed << ", remaining " << m_condSet.size() << std::endl;
346 //FIXME: The number returned may be inaccurate, only correct if the outer container
347 //has exactly one element left by the time it gets removed.
348 return nTrimmed+outerTrimmed;
349 }
350
351//Arrive here for KeyType::SINGLE .. do nothing.
352 return 0;
353}

◆ typelessInsert()

StatusCode CondContMixedBase::typelessInsert ( const EventIDRange & r,
void * obj,
const EventContext & ctx )
finaloverridevirtual

Insert a new conditions object.

Parameters
rRange of validity of this object.
objPointer to the object being inserted.
ctxEvent context for the current thread.

obj must point to an object of type T, except in the case of inheritance, where the type of obj must correspond to the most-derived CondCont type. The container will take ownership of this object.

Returns SUCCESS if the object was successfully inserted; OVERLAP if the object was inserted but the range partially overlaps with an existing one; DUPLICATE if the object wasn't inserted because the range duplicates an existing one, and FAILURE otherwise (ownership of the object will be taken in any case).

Implements CondContBase.

Definition at line 995 of file CondCont.cxx.

998{
999 return insertMixed (r,
1000 CondContSet::payload_unique_ptr (obj, payloadDelfcn()),
1001 ctx);
1002}
delete_function * payloadDelfcn() const
Return the payload deletion function for this container.
StatusCode insertMixed(const EventIDRange &r, CondContBase::CondContSet::payload_unique_ptr t, const EventContext &ctx)
Insert a new conditions object.

◆ valid()

virtual bool CondContMixedBase::valid ( const EventIDBase & t) const
finaloverridevirtual

Test to see if a given IOV time is mapped in the container.

Parameters
tIOV time to check.

Implements CondContBase.

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::string s_cleanerSvcName CondContBase::ATLAS_THREAD_SAFE
staticprivateinherited

Name of the global conditions cleaner service.

Definition at line 686 of file CondCont.h.

◆ m_cleanerSvc

ServiceHandle<Athena::IConditionsCleanerSvc> CondContBase::m_cleanerSvc
privateinherited

Handle to the cleaner service.

Definition at line 678 of file CondCont.h.

◆ m_clid

CLID CondContBase::m_clid
privateinherited

CLID of the most-derived CondCont.

Definition at line 666 of file CondCont.h.

◆ m_condSet

CondContSet CondContBase::m_condSet
privateinherited

Set of mapped objects.

Definition at line 675 of file CondCont.h.

◆ m_deps

DepSet CondContBase::m_deps
privateinherited

Definition at line 683 of file CondCont.h.

◆ m_id

DataObjID CondContBase::m_id
privateinherited

CLID+key for this container.

Definition at line 669 of file CondCont.h.

◆ m_keyType

std::atomic<KeyType> CondContBase::m_keyType
privateinherited

Key type of this container.

Definition at line 663 of file CondCont.h.

◆ m_mutex

std::mutex CondContMixedBase::m_mutex
private

Mutex for insertions.

Definition at line 1191 of file CondCont.h.

◆ m_payloadDeleter

std::shared_ptr<CondContSet::IPayloadDeleter> CondContMixedBase::m_payloadDeleter
private

Deletion object for actual payload objects.

Definition at line 1188 of file CondCont.h.

◆ m_proxy

SG::DataProxy* CondContBase::m_proxy
privateinherited

Associated DataProxy.

Definition at line 672 of file CondCont.h.

◆ m_rcusvc

Athena::IRCUSvc& CondContMixedBase::m_rcusvc
private

Need to remember the RCU svc here in order to pass it to the TS maps.

Definition at line 1185 of file CondCont.h.


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