File indexing completed on 2025-01-18 09:14:49
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef DETECTOR_DETECTORELEMENT_INL_H
0016 #define DETECTOR_DETECTORELEMENT_INL_H 1
0017
0018
0019 #include "Detector/DetectorElement.h"
0020 #include "DD4hep/ConditionsMap.h"
0021 #include "DD4hep/Printout.h"
0022
0023 template<typename T> std::map<dd4hep::DetElement, T*>
0024 gaudi::DeHelpers::getChildConditions(ConditionsMap& m, DetElement de, itemkey_type key, int flags) {
0025 std::map<dd4hep::DetElement, T*> cache;
0026 auto children = de.children();
0027 for(const auto& c : children) {
0028 T* p = dynamic_cast<T*>(m.get(c.second, Keys::deKey).ptr());
0029 if ( p ) {
0030 cache.insert(std::make_pair(c.second,p));
0031 continue;
0032 }
0033 if ( 0 != (flags&ALL) ) {
0034 except("DeStatic","fillCache> No such condition:%d for detector element:%s",
0035 key, de.path().c_str());
0036 }
0037 }
0038 return cache;
0039 }
0040
0041 #endif