36 template <
class N,
class I,
class K=I>
59 typedef typename registry_type::iterator
iterator;
119 template<
class N,
class I,
class K>
124 std::pair<typename registry_type::iterator,bool>
result
125 = reg_.insert(std::make_pair(n,tmp));
127 if (readOnly_)
throw cms::Exception(
"DetectorDescriptionStore")<<
" Store has been locked. Illegal attempt to add " << n <<
" to a global store.";
129 result.first->second =
new Rep_type(n,(
I)0);
131 return result.first->second;
135 template<
class N,
class I,
class K>
140 if (readOnly_)
throw cms::Exception(
"DetectorDescriptionStore")<<
" Store has been locked. Illegal attempt to add " << n <<
" to a global store.";
143 std::pair<typename registry_type::iterator,bool>
result
144 = reg_.insert(std::make_pair(n,tmp));
145 if (!result.second) {
146 delete result.first->second->second;
147 result.first->second->second =
p;
151 result.first->second =
new Rep_type(n,p);
153 return result.first->second;
156 template<
class N,
class I,
class K>
159 typename registry_type::iterator it = reg_.begin();
160 for(; it != reg_.end(); ++it) {
162 delete it->second->second; it->second->second = 0;
163 delete it->second; it->second = 0;
175 template<
class N,
class I,
class K>
178 if (readOnly_)
edm::LogWarning(
"DetectorDescriptionStore") <<
" Store is locked and most likely empty. isDefined will be false.";
179 typename registry_type::const_iterator it = reg_.find(n);
181 if (it != reg_.end()) {
182 if (it->second->second) {
189 template<
class N,
class I,
class K>
191 reg_.swap(storeToSwap.
reg_);
Store & operator=(const Store &)
registry_type::iterator iterator
prep_type create(const name_type &)
std::map< name_type, prep_type > registry_type
rep_type< name_type, pimpl_type > Rep_type
const_iterator begin() const
const std::complex< double > I
registry_type::size_type size_type
std::vector< std::vector< double > > tmp
const_iterator end() const
registry_type::const_iterator const_iterator
volatile std::atomic< bool > shutdown_flag false
bool isDefined(const name_type &n) const