LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
IndexMap.h
1 #ifndef LCIO_INDEXMAP_H
2 #define LCIO_INDEXMAP_H 1
3 
4 #include "EVENT/LCCollection.h"
5 #include "EVENT/LCParameters.h"
6 
7 #include "LCIOSTLTypes.h"
8 
9 #include <string>
10 
11 namespace UTIL{
12 
21  class IndexMap{
22 
23  public:
24 
58  IndexMap(const EVENT::LCCollection* col, const std::string& key1, const std::string& key2);
59 
60  //destructor
61  ~IndexMap();
62 
64  int encode(const std::string name);
65 
67  const std::string& decode(int type) const;
68 
69  protected:
70  const EVENT::LCCollection* _col;
71  const std::string _key1;
72  const std::string _key2;
73  EVENT::StringVec _strvec;
74  EVENT::IntVec _intvec;
75  }; // class
76 
77 }//namespace
78 
79 #endif /* ifndef LCIO_INDEXMAP_H */
const std::string & decode(int type) const
decode int to string (e.g.
Definition: IndexMap.cc:41
std::vector< std::string > StringVec
Vector of strings.
Definition: LCIOSTLTypes.h:16
int encode(const std::string name)
encode string to index (e.g.
Definition: IndexMap.cc:20
std::vector< int > IntVec
Vector of ints.
Definition: LCIOSTLTypes.h:22
The generic collection used in LCIO.
Definition: LCCollection.h:29
IndexMap(const EVENT::LCCollection *col, const std::string &key1, const std::string &key2)
Constructor: takes as arguments the collection where the parameters are stored and the parameter name...
Definition: IndexMap.cc:11
utility class to manage indexes according to Collection Parameters
Definition: IndexMap.h:21