Skip to content

Commit

Permalink
* Add serialization for unordered map
Browse files Browse the repository at this point in the history
  • Loading branch information
ianna committed Apr 18, 2016
1 parent f9c8c0d commit 1e75792
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CondFormats/GeometryObjects/interface/PHGCalParameters.h
Expand Up @@ -4,6 +4,7 @@
#include "CondFormats/Serialization/interface/Serializable.h"
#include <string>
#include <vector>
#include <unordered_map>

class PHGCalParameters {

Expand Down Expand Up @@ -67,7 +68,8 @@ class PHGCalParameters {
int nCells_;
int nSectors_;
int mode_;

std::vector< std::unordered_map<uint32_t, uint32_t> > copiesInLayers_;

COND_SERIALIZABLE;
};

Expand Down
3 changes: 2 additions & 1 deletion CondFormats/GeometryObjects/src/classes_def.xml
Expand Up @@ -143,6 +143,7 @@
<field name="waferR_" mapping="blob"/>
<field name="nCells_" mapping="blob"/>
<field name="nSectors_" mapping="blob"/>
<field name="mode_" mapping="blob"/>
<field name="mode_" mapping="blob"/>
<field name="copiesInLayers_" mapping="blob"/>
</class>
</lcgdict>
1 change: 1 addition & 0 deletions CondFormats/Serialization/interface/Serializable.h
Expand Up @@ -20,6 +20,7 @@
#include <boost/serialization/map.hpp>
#include <boost/serialization/bitset.hpp>
#include <boost/serialization/shared_ptr.hpp>
#include <boost/serialization/unordered_map.hpp>

// We cannot include Equal.h here since it is C++11
namespace cond {
Expand Down

0 comments on commit 1e75792

Please sign in to comment.