CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTBufferTree.h
Go to the documentation of this file.
1 #ifndef DTBufferTree_H
2 #define DTBufferTree_H
3 
14 //----------------------
15 // Base Class Headers --
16 //----------------------
17 
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
22 
23 
24 //---------------
25 // C++ Headers --
26 //---------------
27 #include <map>
28 #include <vector>
29 
30 // ---------------------
31 // -- Class Interface --
32 // ---------------------
33 
34 template <class Key, class Content>
35 class DTBufferTree {
36 
37 public:
38 
39  typedef typename std::vector<Key> CompositeKey;
40  typedef typename std::vector<Key>::const_iterator ElementKey;
41 
44  DTBufferTree();
45 
48  virtual ~DTBufferTree();
49 
52  int insert( ElementKey fKey, ElementKey lKey, const Content& cont );
54  int insert( const Key& k, const Content& cont );
55  int find( ElementKey fKey, ElementKey lKey, Content& cont );
56  int find( const Key& k, Content& cont );
57  std::vector<Content> contList();
58  static void setDefault( const Content& def );
59 
60  private:
61 
63  typedef typename std::map<Key,DTBufferTree<Key,Content>*> map_cont;
64  typedef typename std::map<Key,DTBufferTree<Key,Content>*>::iterator map_iter;
65 
66  Content bufferContent;
68 
69  static Content defaultContent;
70 
71  void treeCont( std::vector<Content>& contentList );
72  void leafCont( std::vector<Content>& contentList );
73 
74 };
75 
76 #include "CondFormats/DTObjects/interface/DTBufferTree.icc"
77 
78 #endif // DTBufferTree_H
79 
int def(FILE *, FILE *, int)
std::vector< Key > CompositeKey
Definition: DTBufferTree.h:39
void leafCont(std::vector< Content > &contentList)
std::map< Key, DTBufferTree< Key, Content > * >::iterator map_iter
Definition: DTBufferTree.h:64
int insert(ElementKey fKey, ElementKey lKey, const Content &cont)
virtual ~DTBufferTree()
void treeCont(std::vector< Content > &contentList)
Content bufferContent
Definition: DTBufferTree.h:66
static void setDefault(const Content &def)
map_cont bufferMap
Definition: DTBufferTree.h:67
std::vector< Content > contList()
int k[5][pyjets_maxn]
int find(ElementKey fKey, ElementKey lKey, Content &cont)
std::map< Key, DTBufferTree< Key, Content > * > map_cont
Definition: DTBufferTree.h:63
int cont
std::vector< Key >::const_iterator ElementKey
Definition: DTBufferTree.h:40
static Content defaultContent
Definition: DTBufferTree.h:69
DTBufferTree< Key, Content > map_node
Definition: DTBufferTree.h:62