ATLAS Offline Software
CondCont.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
66 #ifndef ATHENAKERNEL_CONDCONT_H
67 #define ATHENAKERNEL_CONDCONT_H
68 
70 #include "AthenaKernel/CLASS_DEF.h"
71 #include "AthenaKernel/BaseInfo.h"
77 #include "CxxUtils/SimpleUpdater.h"
79 
80 #include "GaudiKernel/EventIDBase.h"
81 #include "GaudiKernel/EventIDRange.h"
82 #include "GaudiKernel/DataObjID.h"
83 #include "GaudiKernel/StatusCode.h"
84 #include "GaudiKernel/ServiceHandle.h"
85 #include "boost/preprocessor/facilities/overload.hpp"
86 
87 #include <iostream>
88 #include <set>
89 #include <vector>
90 #include <typeinfo>
91 #include <mutex>
92 #include <type_traits>
93 
94 
95 namespace SG {
96  class DataProxy;
97 }
98 namespace Athena {
99  class IRCUSvc;
100 }
101 
102 
107 enum class CondContStatusCode : StatusCode::code_t
108 {
109  FAILURE = 0,
110  SUCCESS = 1,
111  RECOVERABLE = 2,
112 
113  // Attempt to insert an item in a CondCont with a range duplicating
114  // an existing one. The original contents of the container are unchanged,
115  // and the new item has been deleted.
116  // This is classified as Success.
117  DUPLICATE = 10,
118 
119  // Attempt to insert an item in a CondCont with a range that partially
120  // overlaps with an existing one.
121  // This is classified as Success.
122  OVERLAP = 11,
123 
124  // Attempt to insert an item in a CondCont where the new range is an extension
125  // of the last range. That is, the start time of the new range matches
126  // that of the last range in the container, and the end time of the new range
127  // is larger than that of the last range in the container. The end time
128  // of the last range has been extended to match the new range.
129  // The payload of the existing range is unchanged, and the new
130  // item has been deleted.
131  EXTENDED = 12
132 };
133 STATUSCODE_ENUM_DECL (CondContStatusCode)
134 
135 
136 
140 {
141 public:
148  {
149  public:
150  typedef StatusCode::code_t code_t;
151 
153  virtual const char* name() const override;
154 
156  virtual std::string message (code_t code) const override;
157 
159  virtual bool isSuccess (code_t code) const override;
160 
162  static bool isDuplicate (code_t code);
164  static bool isDuplicate (StatusCode code);
165 
167  static bool isOverlap (code_t code);
169  static bool isOverlap (StatusCode code);
170 
172  static bool isExtended (code_t code);
174  static bool isExtended (StatusCode code);
175  };
176 
177 
179  enum class KeyType
180  {
183  SINGLE,
184 
186  TIMESTAMP,
187 
189  RUNLBN,
190 
192  MIXED,
193  };
194 
195 
198  typedef void Payload;
199 
200 
205 
206 
208  virtual ~CondContBase() {};
209 
210 
214  CLID clid() const;
215 
216 
220  KeyType keyType() const;
221 
222 
226  const DataObjID& id() const;
227 
228 
233 
234 
238  const SG::DataProxy* proxy() const;
239 
240 
245  void setProxy(SG::DataProxy*);
246 
247 
252  virtual
253  void list (std::ostream& ost) const = 0;
254 
255 
259  void print() const;
260 
261 
265  virtual size_t entries() const;
266 
267 
271  virtual
272  std::vector<EventIDRange> ranges() const = 0;
273 
274 
295  virtual
296  StatusCode typelessInsert (const EventIDRange& r,
297  void* obj,
298  const EventContext& ctx = Gaudi::Hive::currentContext()) = 0;
299 
300 
305  virtual
306  bool valid( const EventIDBase& t) const = 0;
307 
308 
316  virtual
317  bool range (const EventIDBase& t, EventIDRange& r) const = 0;
318 
319 
325  virtual
326  StatusCode erase (const EventIDBase& t,
327  const EventContext& ctx = Gaudi::Hive::currentContext()) = 0;
328 
329 
353  virtual
354  size_t trim (const std::vector<key_type>& runLbnKeys, const std::vector<key_type>& TSKeys);
355 
356 
361  void clear();
362 
363 
371  void quiescent (const EventContext& ctx = Gaudi::Hive::currentContext());
372 
373 
377  size_t nInserts() const;
378 
379 
383  size_t maxSize() const;
384 
385 
396  virtual
397  StatusCode extendLastRange (const EventIDRange& newRange,
398  const EventContext& ctx = Gaudi::Hive::currentContext()) = 0;
399 
400 
405  static
406  key_type keyFromRunLBN (const EventIDBase& b);
407 
408 
413  static
414  key_type keyFromTimestamp (const EventIDBase& b);
415 
416 
424  struct RangeKey
425  {
428 
430  RangeKey (const EventIDRange& r,
431  key_type start,
432  key_type stop);
433 
434 
437 
440 
442  EventIDRange m_range;
443  };
444 
445 
449  struct Compare
450  {
451  bool operator() (const RangeKey& r1, const RangeKey& r2) const
452  { return r1.m_start < r2.m_start; }
453  bool operator() (key_type t, const RangeKey& r2) const
454  { return t < r2.m_start; }
455  bool inRange (key_type t, const RangeKey& r) const
456  {
457  return t >= r.m_start && t< r.m_stop;
458  }
459 
460 
475  int overlap (const EventContext& ctx,
476  const RangeKey& oldRange, RangeKey& newRange) const;
477 
478 
489  int extendRange (RangeKey& range, const RangeKey& newRange) const;
490  };
491 
492 
497  void addDep (CondContBase* dep);
498 
499 
503  std::vector<CondContBase*> getDeps();
504 
505 
511  static void setCleanerSvcName ATLAS_NOT_THREAD_SAFE (const std::string& name);
512 
513 
514 protected:
515  typedef CxxUtils::ConcurrentRangeMap<RangeKey, key_type, void, Compare,
518 
519  typedef CondContSet::Updater_t Updater_t;
520  typedef CondContSet::delete_function delete_function;
521 
532  CondContBase (Athena::IRCUSvc& rcusvc,
533  KeyType keytype,
534  CLID clid,
535  const DataObjID& id,
537  std::shared_ptr<CondContSet::IPayloadDeleter> payloadDeleter,
538  size_t capacity);
539 
540 
556  StatusCode insertBase (const EventIDRange& r,
557  CondContSet::payload_unique_ptr t,
558  const EventContext& ctx = Gaudi::Hive::currentContext());
559 
560 
566  StatusCode eraseBase (const EventIDBase& t,
567  const EventContext& ctx = Gaudi::Hive::currentContext());
568 
569 
580  StatusCode
581  extendLastRangeBase (const EventIDRange& newRange,
582  const EventContext& ctx = Gaudi::Hive::currentContext());
583 
584 
594  const void* findBase (const EventIDBase& t,
595  EventIDRange const** r) const;
596 
597 
607  const void* cast (CLID clid, const void* ptr) const;
608 
609 
622  virtual const void* doCast (CLID clid, const void* ptr) const = 0;
623 
624 
632  template <class FUNC>
633  void forEach (const FUNC& func) const;
634 
635 
639  StatusCode inserted (const EventContext& ctx);
640 
641 
646  void insertError (CLID usedCLID) const;
647 
648 
652  delete_function* delfcn() const;
653 
654 
658  std::string title() const;
659 
660 
661 private:
663  std::atomic<KeyType> m_keyType;
664 
667 
669  DataObjID m_id;
670 
673 
676 
679 
684 
686  static std::string s_cleanerSvcName ATLAS_THREAD_SAFE;
687 };
688 
689 
690 CLASS_DEF( CondContBase , 34480459 , 1 )
691 
692 
693 
695 
696 
701  : public CondContBase
702 {
703 public:
708  virtual
709  void list (std::ostream& ost) const override final;
710 
711 
715  virtual
716  std::vector<EventIDRange> ranges() const override final;
717 
718 
739  virtual
740  StatusCode typelessInsert (const EventIDRange& r,
741  void* obj,
742  const EventContext& ctx = Gaudi::Hive::currentContext()) override final;
743 
744 
749  virtual
750  bool valid( const EventIDBase& t) const override final;
751 
752 
760  virtual
761  bool range (const EventIDBase& t, EventIDRange& r) const override final;
762 
763 
769  virtual
770  StatusCode erase (const EventIDBase& t,
771  const EventContext& ctx = Gaudi::Hive::currentContext()) override final;
772 
773 
784  virtual
785  StatusCode extendLastRange (const EventIDRange& newRange,
786  const EventContext& ctx = Gaudi::Hive::currentContext()) override final;
787 
788 
789 protected:
799  CondContSingleBase (Athena::IRCUSvc& rcusvc,
800  CLID clid,
801  const DataObjID& id,
802  SG::DataProxy* proxy,
803  std::shared_ptr<CondContSet::IPayloadDeleter> payloadDeleter,
804  size_t capacity);
805 };
806 
807 
809 
810 
811 template <class T> class CondCont;
812 
813 
823 {
824 public:
826 };
827 
828 
829 namespace SG {
830 template <typename T>
831 struct Bases<CondCont<T> >
832 {
834 };
835 } // namespace SG
836 
837 
838 
839 
846 #define CONDCONT_BASE(D, B) \
847 template <> \
848 class CondContBaseInfo<D> \
849 { \
850 public: \
851  typedef CondCont<B> Base; \
852 }; \
853 SG_BASES(CondCont<D>, CondCont<B>);\
854 SG_BASES(D, B)
855 
856 
857 
858 
887 template <typename T>
888 class CondCont : public CondContBaseInfo<T>::Base
889 {
890 public:
892  typedef typename CondContBaseInfo<T>::Base Base;
893 
894  typedef typename Base::CondContSet CondContSet;
895 
897  typedef T Payload;
898 
900 
901 
910  const DataObjID& id,
911  SG::DataProxy* proxy = nullptr,
912  size_t capacity = 16);
913 
914 
916  virtual ~CondCont();
917 
919  CondCont (const CondCont&) = delete;
920  CondCont& operator= (const CondCont&) = delete;
921 
922 
942  StatusCode insert (const EventIDRange& r,
943  std::unique_ptr<T> obj,
944  const EventContext& ctx = Gaudi::Hive::currentContext());
945 
946 
955  bool find (const EventIDBase& t,
956  T const*& obj,
957  EventIDRange const** r = nullptr) const;
958 
959 
968  const T* find (const EventIDBase& t) const;
969 
970 
971 protected:
982  CLID clid,
983  const DataObjID& id,
985  std::shared_ptr<typename CondContSet::IPayloadDeleter> payloadDeleter,
986  size_t capacity);
987 
988 
998  const void* cast (CLID clid, const void* ptr) const;
999 
1000 
1013  virtual const void* doCast (CLID clid, const void* ptr) const override;
1014 
1015 
1016 public:
1019  static void registerBaseInit();
1020 };
1021 
1022 
1024 
1025 
1031  : public CondContBase
1032 {
1033 public:
1038  virtual
1039  void list (std::ostream& ost) const override final;
1040 
1041 
1045  virtual size_t entries() const override final;
1046 
1047 
1051  virtual
1052  std::vector<EventIDRange> ranges() const override final;
1053 
1054 
1073  virtual
1074  StatusCode typelessInsert (const EventIDRange& r,
1075  void* obj,
1076  const EventContext& ctx = Gaudi::Hive::currentContext()) override final;
1077 
1078 
1083  virtual
1084  bool valid( const EventIDBase& t) const override final;
1085 
1086 
1094  virtual
1095  bool range (const EventIDBase& t, EventIDRange& r) const override final;
1096 
1097 
1105  virtual
1106  StatusCode erase (const EventIDBase& t,
1107  const EventContext& ctx = Gaudi::Hive::currentContext()) override final;
1108 
1109 
1122  virtual
1123  StatusCode extendLastRange (const EventIDRange& newRange,
1124  const EventContext& ctx = Gaudi::Hive::currentContext()) override final;
1125 
1126 
1127 protected:
1137  CondContMixedBase (Athena::IRCUSvc& rcusvc,
1138  CLID clid,
1139  const DataObjID& id,
1140  SG::DataProxy* proxy,
1141  std::shared_ptr<CondContSet::IPayloadDeleter> payloadDeleter,
1142  size_t capacity);
1143 
1144 
1158  StatusCode insertMixed (const EventIDRange& r,
1159  CondContBase::CondContSet::payload_unique_ptr t,
1160  const EventContext& ctx = Gaudi::Hive::currentContext());
1161 
1162 
1172  const void* findMixed (const EventIDBase& t,
1173  EventIDRange const** r) const;
1174 
1175 
1180 
1181 
1182 private:
1185  Athena::IRCUSvc& m_rcusvc;
1186 
1188  std::shared_ptr<CondContSet::IPayloadDeleter> m_payloadDeleter;
1189 
1192 };
1193 
1194 
1196 
1197 
1198 template <class T> class CondContMixed;
1199 
1200 
1210 {
1211 public:
1213 };
1214 
1215 
1216 namespace SG {
1217 template <typename T>
1219 {
1221 };
1222 } // namespace SG
1223 
1224 
1231 #define CONDCONT_MIXED_BASE(D, B) \
1232 template <> \
1233 class CondContMixedBaseInfo<D> \
1234 { \
1235 public: \
1236  static_assert (std::is_base_of_v<CondContMixed<B>, CondCont<B> >, \
1237  "CondCont<" #B "> is not a mixed conditions container."); \
1238  typedef CondCont<B> Base; \
1239 }; \
1240 SG_BASES(CondContMixed<D>, CondCont<B>); \
1241 SG_BASES(D, B)
1242 
1243 
1244 
1245 
1253 template <typename T>
1255 {
1256 public:
1259 
1260  typedef typename Base::CondContSet CondContSet;
1261 
1263  typedef T Payload;
1264 
1266 
1267 
1269  virtual ~CondContMixed();
1270 
1272  CondContMixed (const CondContMixed&) = delete;
1273  CondContMixed& operator= (const CondContMixed&) = delete;
1274 
1275 
1293  StatusCode insert (const EventIDRange& r,
1294  std::unique_ptr<T> obj,
1295  const EventContext& ctx = Gaudi::Hive::currentContext());
1296 
1297 
1306  bool find (const EventIDBase& t,
1307  T const*& obj,
1308  EventIDRange const** r = nullptr) const;
1309 
1310 
1319  const T* find (const EventIDBase& t) const;
1320 
1321 
1322 protected:
1333  CLID clid,
1334  const DataObjID& id,
1336  std::shared_ptr<typename CondContSet::IPayloadDeleter> payloadDeleter,
1337  size_t capacity);
1338 
1339 
1349  CLID clid,
1350  const DataObjID& id,
1352  size_t capacity);
1353 
1354 
1364  const void* cast (CLID clid, const void* ptr) const;
1365 
1366 
1379  virtual const void* doCast (CLID clid, const void* ptr) const override;
1380 
1381 
1382 public:
1385  static void registerBaseInit();
1386 };
1387 
1388 
1390 
1391 
1392 #include "AthenaKernel/CondCont.icc"
1394 
1395 #define CONCATUNF_(x,y) x##y
1396 #define CONCATUNF(x,y) CONCATUNF_(x,y)
1397 #define UNIQUEVARNAME CONCATUNF(CONCATUNF(REGCCM_,__COUNTER__),__LINE__)
1399 
1401 // For a conditions container not deriving from another, do
1402 // CONDCONT_DEF(TYPE, CLID);
1403 //
1404 // For a conditions container with a payload deriving from BASE, do
1405 // CONDCONT_DEF(TYPE, CLID, BASE);
1406 //
1407 #define CONDCONT_DEF_2(T, CLID_) \
1408  CLASS_DEF( CondCont<T>, CLID_, 1) \
1409  static CondContainer::CondContMaker<T> maker_ ## CLID_ {}
1410 #define CONDCONT_DEF_3(T, CLID_, BASE) \
1411  CONDCONT_BASE(T, BASE); \
1412  CONDCONT_DEF_2(T, CLID_)
1413 #define CONDCONT_DEF(...) \
1414  BOOST_PP_OVERLOAD(CONDCONT_DEF_, __VA_ARGS__)(__VA_ARGS__)
1415 
1416 
1418 // For a conditions container not deriving from another, do
1419 // CONDCONT_MIXED_DEF(TYPE, CLID);
1420 //
1421 // For a conditions container with a payload deriving from BASE, do
1422 // CONDCONT_MIXED_DEF(TYPE, CLID, BASE);
1423 //
1424 // The BASE class must have earlier been named in another CONDCONT_MIXED_DEF.
1425 //
1426 #define CONDCONT_MIXED_DEF_2(T, CLID_) \
1427  template<> class CondCont<T> : public CondContMixed<T> { \
1428  public: \
1429  CondCont (Athena::IRCUSvc& rcusvc, const DataObjID& id, \
1430  SG::DataProxy* proxy =nullptr, size_t capacity = 16) \
1431  : CondContMixed<T> (rcusvc, CLID_, id, proxy, capacity) {} \
1432  protected: \
1433  CondCont (Athena::IRCUSvc& rcusvc, CLID clid, const DataObjID& id, \
1434  SG::DataProxy* proxy, \
1435  std::shared_ptr<typename CondContSet::IPayloadDeleter> payloadDeleter, \
1436  size_t capacity = 16) \
1437  : CondContMixed<T> (rcusvc, clid, id, proxy, \
1438  payloadDeleter, capacity) {} \
1439  }; \
1440  CLASS_DEF( CondCont<T>, CLID_, 1) \
1441  SG_BASES(CondCont<T>, CondContMixed<T>); \
1442  static CondContainer::CondContMaker<T> maker_ ## CLID_ {}
1443 #define CONDCONT_MIXED_DEF_3(T, CLID_, BASE) \
1444  CONDCONT_MIXED_BASE(T, BASE); \
1445  CONDCONT_MIXED_DEF_2(T, CLID_)
1446 #define CONDCONT_MIXED_DEF(...) \
1447  BOOST_PP_OVERLOAD(CONDCONT_MIXED_DEF_, __VA_ARGS__)(__VA_ARGS__)
1448 
1449 
1450 #endif // not ATHENAKERNEL_CONDCONT_H
1451 
CondContBase::RangeKey
Range object to store in ConcurrentRangeMap.
Definition: CondCont.h:425
CondContMixed::CondContMixed
CondContMixed(const CondContMixed &)=delete
No copying.
HTXS::Stage0::Category
Category
Definition: HiggsTemplateCrossSectionsDefs.h:43
CondContMixedBase::m_mutex
std::mutex m_mutex
Mutex for insertions.
Definition: CondCont.h:1191
CondContMixedBaseInfo
Traits class to find the base for CondContMixed.
Definition: CondCont.h:1210
beamspotman.r
def r
Definition: beamspotman.py:676
CondContMixed::CondContMixed
CondContMixed(Athena::IRCUSvc &rcusvc, CLID clid, const DataObjID &id, SG::DataProxy *proxy, std::shared_ptr< typename CondContSet::IPayloadDeleter > payloadDeleter, size_t capacity)
Internal Constructor.
trigbs_pickEvents.ranges
ranges
Definition: trigbs_pickEvents.py:60
CondContMixed::find
bool find(const EventIDBase &t, T const *&obj, EventIDRange const **r=nullptr) const
Look up a conditions object for a given time.
CondContBase::keyFromTimestamp
static key_type keyFromTimestamp(const EventIDBase &b)
Make a timestamp key from an EventIDBase.
CondContBaseInfo
Traits class to find the base for CondCont.
Definition: CondCont.h:823
CondContBase::ATLAS_NOT_THREAD_SAFE
static void setCleanerSvcName ATLAS_NOT_THREAD_SAFE(const std::string &name)
Allow overriding the name of the global conditions cleaner service (for testing purposes).
CondContMixedBase::ranges
virtual std::vector< EventIDRange > ranges() const override final
Return all IOV validity ranges defined in this container.
Definition: CondCont.cxx:959
CondContBase::typelessInsert
virtual StatusCode typelessInsert(const EventIDRange &r, void *obj, const EventContext &ctx=Gaudi::Hive::currentContext())=0
Insert a new conditions object.
CondContMixed::doCast
virtual const void * doCast(CLID clid, const void *ptr) const override
Do pointer conversion for the payload type.
CondContBaseInfo::Base
CondContSingleBase Base
Definition: CondCont.h:825
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
IConditionsCleanerSvc.h
Interface for doing garbage collection of conditions objects.
CondObjDeleter.h
Deletion object for conditions payloads.
CondContBase::doCast
virtual const void * doCast(CLID clid, const void *ptr) const =0
Do pointer conversion for the payload type.
CondContBase::keyFromRunLBN
static key_type keyFromRunLBN(const EventIDBase &b)
Make a run+lbn key from an EventIDBase.
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
CondContMixed::CondContMixed
CondContMixed(Athena::IRCUSvc &rcusvc, CLID clid, const DataObjID &id, SG::DataProxy *proxy, size_t capacity)
Internal Constructor.
CondContMixedBase
Base class for conditions containers for which keys are ranges in both Run+LBN and timestamp.
Definition: CondCont.h:1032
CondContMixedBase::payloadDelfcn
delete_function * payloadDelfcn() const
Return the payload deletion function for this container.
Definition: CondCont.cxx:1260
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
CondCont::insert
StatusCode insert(const EventIDRange &r, std::unique_ptr< T > obj, const EventContext &ctx=Gaudi::Hive::currentContext())
Insert a new conditions object.
CondContMixedBase::m_payloadDeleter
std::shared_ptr< CondContSet::IPayloadDeleter > m_payloadDeleter
Deletion object for actual payload objects.
Definition: CondCont.h:1188
taskman.template
dictionary template
Definition: taskman.py:317
CondContBase::Payload
void Payload
Payload type held by this class.
Definition: CondCont.h:198
CondContSingleBase
Base class for conditions containers that are either Run+LBN or timestamp.
Definition: CondCont.h:702
CondContBase::Updater_t
CondContSet::Updater_t Updater_t
Definition: CondCont.h:519
CondCont::operator=
CondCont & operator=(const CondCont &)=delete
CondContBase::KeyType
KeyType
Type of key used for this container.
Definition: CondCont.h:180
CondContSingleBase::valid
virtual bool valid(const EventIDBase &t) const override final
Test to see if a given IOV time is mapped in the container.
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
CondCont::find
bool find(const EventIDBase &t, T const *&obj, EventIDRange const **r=nullptr) const
Look up a conditions object for a given time.
CondContBase::keyType
KeyType keyType() const
Return the key type for this container.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CondContBase::valid
virtual bool valid(const EventIDBase &t) const =0
Test to see if a given IOV time is mapped in the container.
CondContBase::RangeKey::m_start
key_type m_start
Packed start time.
Definition: CondCont.h:436
CondContBase::list
virtual void list(std::ostream &ost) const =0
Dump the container contents for debugging.
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
CondContBase::m_id
DataObjID m_id
CLID+key for this container.
Definition: CondCont.h:669
CondCont::Payload
T Payload
Payload type held by this class.
Definition: CondCont.h:897
ReweightUtils.message
message
Definition: ReweightUtils.py:15
CondContMixed::Payload
T Payload
Payload type held by this class.
Definition: CondCont.h:1263
CondContBase::delete_function
CondContSet::delete_function delete_function
Definition: CondCont.h:520
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
CondContBase::~CondContBase
virtual ~CondContBase()
Destructor.
Definition: CondCont.h:208
CondCont::CondContSet
Base::CondContSet CondContSet
Definition: CondCont.h:894
CondContMixed::key_type
CondContBase::key_type key_type
Definition: CondCont.h:1265
CondContBase::RangeKey::RangeKey
RangeKey(const EventIDRange &r, key_type start, key_type stop)
Constructor from range+start/stop.
CondCont::CondCont
CondCont(Athena::IRCUSvc &rcusvc, const DataObjID &id, SG::DataProxy *proxy=nullptr, size_t capacity=16)
Constructor.
CondContMixed::find
const T * find(const EventIDBase &t) const
Look up a conditions object for a given time.
CondContMixedBase::insertMixed
StatusCode insertMixed(const EventIDRange &r, CondContBase::CondContSet::payload_unique_ptr t, const EventContext &ctx=Gaudi::Hive::currentContext())
Insert a new conditions object.
Definition: CondCont.cxx:1084
CondContStatusCode::DUPLICATE
@ DUPLICATE
CondContMixed
Conditions container for which keys are ranges in both Run+LBN and timestamp.
Definition: CondCont.h:1198
CondContMixed::~CondContMixed
virtual ~CondContMixed()
Destructor.
CondContMixed::CondContSet
Base::CondContSet CondContSet
Definition: CondCont.h:1260
histSizes.code
code
Definition: histSizes.py:129
CondContBase::ranges
virtual std::vector< EventIDRange > ranges() const =0
Return all IOV validity ranges defined in this container.
CondContStatusCode::OVERLAP
@ OVERLAP
CondContMaker.h
CondContMixedBase::list
virtual void list(std::ostream &ost) const override final
Dump the container contents for debugging.
Definition: CondCont.cxx:920
CondContBase::erase
virtual StatusCode erase(const EventIDBase &t, const EventContext &ctx=Gaudi::Hive::currentContext())=0
Erase the first element not less than t.
CondContBase::range
virtual bool range(const EventIDBase &t, EventIDRange &r) const =0
Return the mapped validity range for an IOV time.
CondContMixedBase::typelessInsert
virtual StatusCode typelessInsert(const EventIDRange &r, void *obj, const EventContext &ctx=Gaudi::Hive::currentContext()) override final
Insert a new conditions object.
Definition: CondCont.cxx:996
CondContMixedBaseInfo::Base
CondContMixedBase Base
Definition: CondCont.h:1212
CondContBase::id
const DataObjID & id() const
Return CLID/key corresponding to this container.
CondContBase::forEach
void forEach(const FUNC &func) const
Call func on each entry in the container.
BaseInfo.h
Provide an interface for finding inheritance information at run time.
CondContMixedBase::erase
virtual StatusCode erase(const EventIDBase &t, const EventContext &ctx=Gaudi::Hive::currentContext()) override final
Erase the first element not less than t.
Definition: CondCont.cxx:1033
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
CondContMixedBase::range
virtual bool range(const EventIDBase &t, EventIDRange &r) const override final
Return the mapped validity range for an IOV time.
Definition: CondCont.cxx:1014
ClassID_traits.h
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CondContMixedBase::m_rcusvc
Athena::IRCUSvc & m_rcusvc
Need to remember the RCU svc here in order to pass it to the TS maps.
Definition: CondCont.h:1185
CondContBase
Base class for all conditions containers.
Definition: CondCont.h:140
Base
CondContBase::Compare::inRange
bool inRange(key_type t, const RangeKey &r) const
Definition: CondCont.h:455
covarianceTool.title
title
Definition: covarianceTool.py:542
DataProxy
DataProxy provides the registry services for StoreGate.
Definition: DataProxy.h:32
SG::Bases
Traits class to hold derivation information.
Definition: Bases.h:115
CondContBase::m_clid
CLID m_clid
CLID of the most-derived CondCont.
Definition: CondCont.h:666
CondContMixed::Base
CondContMixedBaseInfo< T >::Base Base
Base class.
Definition: CondCont.h:1258
CondContMixedBase::extendLastRange
virtual StatusCode extendLastRange(const EventIDRange &newRange, const EventContext &ctx=Gaudi::Hive::currentContext()) override final
Extend the range of the last IOV.
Definition: CondCont.cxx:1057
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
Athena::RCUUpdater
Implementation of Updater for RCUSvc.
Definition: RCUUpdater.h:39
Athena::IRCUSvc
Interface for RCU service.
Definition: IRCUSvc.h:40
CondContBase::Compare
Comparison object needed by ConcurrentRangeMap.
Definition: CondCont.h:450
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
CondContMixed::insert
StatusCode insert(const EventIDRange &r, std::unique_ptr< T > obj, const EventContext &ctx=Gaudi::Hive::currentContext())
Insert a new conditions object.
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
CondContBase::RangeKey::m_stop
key_type m_stop
Packed stop time.
Definition: CondCont.h:439
CondContBase::m_proxy
SG::DataProxy * m_proxy
Associated DataProxy.
Definition: CondCont.h:672
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
CondContBase::cast
const void * cast(CLID clid, const void *ptr) const
Do pointer conversion for the payload type.
jet::JetTopology::MIXED
@ MIXED
Definition: UncertaintyEnum.h:214
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
CondContMixed::cast
const void * cast(CLID clid, const void *ptr) const
Do pointer conversion for the payload type.
CondContBase::RangeKey::RangeKey
RangeKey()
Default constructor.
CondContStatusCode::SUCCESS
@ SUCCESS
CondContBase::CondContSet
CxxUtils::ConcurrentRangeMap< RangeKey, key_type, void, Compare, Athena::RCUUpdater > CondContSet
Definition: CondCont.h:517
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
CxxUtils::ConcurrentPtrSet< CondContBase, CxxUtils::SimpleUpdater >
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
CondContMixedBase::valid
virtual bool valid(const EventIDBase &t) const override final
Test to see if a given IOV time is mapped in the container.
CondContBase::extendLastRange
virtual StatusCode extendLastRange(const EventIDRange &newRange, const EventContext &ctx=Gaudi::Hive::currentContext())=0
Extend the range of the last IOV.
CondCont::registerBaseInit
static void registerBaseInit()
Helper to ensure that the inheritance information for this class gets initialized.
CondCont::CondCont
CondCont(Athena::IRCUSvc &rcusvc, CLID clid, const DataObjID &id, SG::DataProxy *proxy, std::shared_ptr< typename CondContSet::IPayloadDeleter > payloadDeleter, size_t capacity)
Internal constructor.
CondContBase::ATLAS_THREAD_SAFE
static std::string s_cleanerSvcName ATLAS_THREAD_SAFE
Name of the global conditions cleaner service.
Definition: CondCont.h:686
CondContStatusCode::RECOVERABLE
@ RECOVERABLE
python.Dumpers.typename
def typename(t)
Definition: Dumpers.py:194
CondCont::key_type
CondContBase::key_type key_type
Definition: CondCont.h:899
CondContStatusCode
CondContStatusCode
Define extended status codes used by CondCont.
Definition: CondCont.h:108
CondContBase::m_cleanerSvc
ServiceHandle< Athena::IConditionsCleanerSvc > m_cleanerSvc
Handle to the cleaner service.
Definition: CondCont.h:678
CondCont::Base
CondContBaseInfo< T >::Base Base
Base class.
Definition: CondCont.h:892
CondContBase::Category::code_t
StatusCode::code_t code_t
Definition: CondCont.h:150
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
CondCont
Hold mapping of ranges to condition objects.
Definition: CondCont.h:811
SimpleUpdater.h
Simple (non-deleting) Updater implementation.
CondContBase::proxy
const SG::DataProxy * proxy() const
Return the associated DataProxy, if any.
CondCont::find
const T * find(const EventIDBase &t) const
Look up a conditions object for a given time.
CondContMixedBase::findMixed
const void * findMixed(const EventIDBase &t, EventIDRange const **r) const
Internal lookup function.
Definition: CondCont.cxx:1211
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
CondCont::cast
const void * cast(CLID clid, const void *ptr) const
Do pointer conversion for the payload type.
CondContBase::clid
CLID clid() const
Return the CLID of the most-derived CondCont.
GRLStrUtil::trim
void trim(std::string &input)
Definition: StrUtil.cxx:12
entries
double entries
Definition: listroot.cxx:49
CondContBase::key_type
uint64_t key_type
Type used to store an IOV time internally.
Definition: CondCont.h:204
CondCont::~CondCont
virtual ~CondCont()
Destructor.
CondCont::CondCont
CondCont(const CondCont &)=delete
No copying.
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
CondContBase::m_condSet
CondContSet m_condSet
Set of mapped objects.
Definition: CondCont.h:675
CondContStatusCode::FAILURE
@ FAILURE
ConcurrentRangeMap.h
Map from range to payload object, allowing concurrent, lockless reads.
CondContBase::proxy
SG::DataProxy * proxy()
Return the associated DataProxy, if any.
CondContBase::m_deps
DepSet m_deps
Definition: CondCont.h:683
CondCont.icc
CondContStatusCode::EXTENDED
@ EXTENDED
checker_macros.h
Define macros for attributes used to control the static checker.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::DataProxy
Definition: DataProxy.h:45
CLASS_DEF.h
macros to associate a CLID to a type
RCUUpdater.h
Implementation of Updater for RCUSvc.
CondCont::doCast
virtual const void * doCast(CLID clid, const void *ptr) const override
Do pointer conversion for the payload type.
CondContMixedBase::entries
virtual size_t entries() const override final
Return the number of conditions objects in the container.
Definition: CondCont.cxx:943
CondContMixed::registerBaseInit
static void registerBaseInit()
Helper to ensure that the inheritance information for this class gets initialized.
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
CondContBase::Category
Status code category for ContCont.
Definition: CondCont.h:148
CondContBase::RangeKey::m_range
EventIDRange m_range
Original range object.
Definition: CondCont.h:442
ConcurrentPtrSet.h
A set of pointers, alowing concurrent, lockless reads.
CondContBase::m_keyType
std::atomic< KeyType > m_keyType
Key type of this container.
Definition: CondCont.h:663
SG::BaseList
Represent a list of base classes.
Definition: Bases.h:79
ServiceHandle< Athena::IConditionsCleanerSvc >