CMS 3D CMS Logo

FFTJetDict.h
Go to the documentation of this file.
1 #ifndef JetMETCorrections_FFTJetObjects_FFTJetDict_h
2 #define JetMETCorrections_FFTJetObjects_FFTJetDict_h
3 
4 //
5 // This template provides a variation of std::map with
6 // subscripting operator which does not automatically
7 // insert default values
8 //
9 // I. Volobouev
10 // 08/03/2012
11 
12 #include <map>
14 
15 template <class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T> > >
16 struct FFTJetDict : public std::map<Key, T, Compare, Allocator> {
17  inline T& operator[](const Key&);
18  inline const T& operator[](const Key&) const;
19 };
20 
21 template <class Key, class T, class Compare, class Allocator>
25  throw cms::Exception("KeyNotFound") << "FFTJetDict: key \"" << key << "\" not found\n";
26  return const_cast<T&>(it->second);
27 }
28 
29 template <class Key, class T, class Compare, class Allocator>
33  throw cms::Exception("KeyNotFound") << "FFTJetDict: key \"" << key << "\" not found\n";
34  return it->second;
35 }
36 #endif // JetMETCorrections_FFTJetObjects_FFTJetDict_h
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
Key
Definition: GoldenPattern.h:15
FFTJetDict
Definition: FFTJetDict.h:16
FFTJetDict::operator[]
T & operator[](const Key &)
Definition: FFTJetDict.h:22
mps_fire.end
end
Definition: mps_fire.py:242
T
long double T
Definition: Basic3DVectorLD.h:48
Exception
Definition: hltDiff.cc:245
Exception.h
genParticles_cff.map
map
Definition: genParticles_cff.py:11
crabWrapper.key
key
Definition: crabWrapper.py:19