![]() |
|
|||
File indexing completed on 2025-02-21 09:58:04
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DDCOND_CONDITIONSIOVPOOL_H 0014 #define DDCOND_CONDITIONSIOVPOOL_H 0015 0016 // Framework include files 0017 #include "DDCond/ConditionsPool.h" 0018 0019 // C/C++ include files 0020 #include <map> 0021 #include <memory> 0022 0023 /// Namespace for the AIDA detector description toolkit 0024 namespace dd4hep { 0025 0026 /// Namespace for implementation details of the AIDA detector description toolkit 0027 namespace cond { 0028 0029 /// Pool of conditions satisfying one IOV type (epoch, run, fill, etc) 0030 /** 0031 * Purely internal class to the conditions manager implementation. 0032 * Not at all to be accessed by clients! 0033 * 0034 * \author M.Frank 0035 * \version 1.0 0036 * \ingroup DD4HEP_CONDITIONS 0037 */ 0038 class ConditionsIOVPool { 0039 public: 0040 /// Shortcut name for the actual container elements 0041 typedef std::shared_ptr<ConditionsPool> Element; 0042 /// Shortcut name for the actual conditions container 0043 typedef std::map<IOV::Key, Element > Elements; 0044 0045 /// Container of IOV dependent conditions pools 0046 Elements elements; //! Not ROOT persistent 0047 /// Reference to the IOV container 0048 const IOVType* type; //! Not ROOT persistent 0049 0050 public: 0051 /// Default constructor 0052 ConditionsIOVPool(const IOVType* type); 0053 /// Default destructor 0054 virtual ~ConditionsIOVPool(); 0055 /// Retrieve a condition set given the key according to their validity 0056 size_t select(Condition::key_type key, const IOV& req_validity, RangeConditions& result); 0057 /// Retrieve a condition set given the key according to their validity 0058 size_t selectRange(Condition::key_type key, const IOV& req_validity, RangeConditions& result); 0059 /// Select all ACTIVE conditions, which do match the IOV requirement 0060 size_t select(const IOV& req_validity, RangeConditions& valid, IOV& cond_validity); 0061 /// Select all ACTIVE conditions, which do match the IOV requirement 0062 size_t select(const IOV& req_validity, 0063 const ConditionsSelect& valid, 0064 IOV& cond_validity); 0065 /// Select all ACTIVE conditions pools, which do match the IOV requirement 0066 size_t select(const IOV& req_validity, Elements& valid, IOV& cond_validity); 0067 /// Select all ACTIVE conditions pools, which do match the IOV requirement (faster) 0068 size_t select(const IOV& req_validity, Elements& valid); 0069 /// Select all ACTIVE conditions pools, which do match the IOV requirement 0070 size_t select(const IOV& req_validity, std::vector<Element>& valid, IOV& cond_validity); 0071 /// Select all ACTIVE conditions pools, which do match the IOV requirement (faster) 0072 size_t select(const IOV& req_validity, std::vector<Element>& valid); 0073 0074 /// Remove all key based pools with an age beyon the minimum age. 0075 /** @return Number of conditions cleaned up and removed. */ 0076 int clean(int max_age); 0077 0078 /// Invoke cache cleanup with user defined policy 0079 /** @return pair<Number of pools cleared, Number of conditions cleaned up and removed> */ 0080 int clean(const ConditionsCleanup& cleaner); 0081 }; 0082 0083 } /* End namespace cond */ 0084 } /* End namespace dd4hep */ 0085 0086 #endif // DDCOND_CONDITIONSIOVPOOL_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |