CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/CondCore/ORA/src/MultiIndexDataTrie.h

Go to the documentation of this file.
00001 #ifndef INCLUDE_ORA_MULTIINDEXDATATRIE_H
00002 #define INCLUDE_ORA_MULTIINDEXDATATRIE_H
00003 
00004 #include <string>
00005 #include <vector>
00006 //#include <memory>
00007 #include "CondCore/ORA/interface/Record.h"
00008 
00009 
00010 namespace ora {
00011 
00012 
00013     // class describing an elementary part of data to be stored 
00014   class MultiIndexDataTrie {
00015     public:
00016     MultiIndexDataTrie();
00017     virtual ~MultiIndexDataTrie();
00018 
00019     size_t push( const std::vector<int>& indexes, Record & data );
00020     //const Record& lookup( const std::vector<int>& indexes ) const;
00021     void lookupAndClear( const std::vector<int>& indexes, Record & rec );
00022 
00023     void clear();
00024     size_t size() const;
00025     size_t branchSize( const std::vector<int>& indexes, size_t depth = 0) const;
00026 
00027     size_t totalSize() const;
00028 
00029     //void print() const;
00030 
00031     //private:
00032     //void recursivePrint( const std::string& prev ) const;
00033     
00034     private:
00035 
00036     std::vector<MultiIndexDataTrie*> m_children;
00037     Record m_data;
00038     
00039   };
00040   
00041 }
00042 
00043 #endif
00044