Skip to content

Commit a38374d

Browse files
authored
Merge pull request cms-sw#34190 from guitargeek/ext_hash_map
Replace deprecated ext/hash_map with std::unordered_map
2 parents 17ae8de + 8d90540 commit a38374d

File tree

11 files changed

+11
-84
lines changed

11 files changed

+11
-84
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef SiStripQualityHistos_H
22
#define SiStripQualityHistos_H
33

4-
#include <ext/hash_map>
4+
#include <unordered_map>
55
#include "TH1F.h"
66

77
namespace SiStrip {
8-
typedef __gnu_cxx::hash_map<unsigned int, std::shared_ptr<TH1F> > QualityHistosMap;
8+
typedef std::unordered_map<unsigned int, std::shared_ptr<TH1F> > QualityHistosMap;
99
}
1010
#endif

CalibTracker/SiStripQuality/plugins/SiStripBadModuleByHandBuilder.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h"
1212
#include <vector>
1313

14-
#include <ext/hash_map>
15-
1614
class SiStripBadModuleByHandBuilder : public ConditionDBWriter<SiStripBadStrip> {
1715
public:
1816
explicit SiStripBadModuleByHandBuilder(const edm::ParameterSet&);

CondTools/SiPixel/test/SiPixelBadModuleByHandBuilder.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "Geometry/Records/interface/TrackerTopologyRcd.h"
1515

1616
#include <vector>
17-
#include <ext/hash_map>
1817

1918
class SiPixelBadModuleByHandBuilder : public ConditionDBWriter<SiPixelQuality> {
2019
public:

CondTools/SiStrip/plugins/SiStripBadChannelBuilder.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include <vector>
1717
#include <memory>
18-
#include <ext/hash_map>
1918

2019
class SiStripBadChannelBuilder : public ConditionDBWriter<SiStripBadStrip> {
2120
public:

CondTools/SiStrip/plugins/SiStripBadFiberBuilder.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "FWCore/ParameterSet/interface/FileInPath.h"
1212
#include <vector>
1313

14-
#include <ext/hash_map>
15-
1614
class SiStripBadFiberBuilder : public ConditionDBWriter<SiStripBadStrip> {
1715
public:
1816
explicit SiStripBadFiberBuilder(const edm::ParameterSet&);

L1Trigger/GlobalTrigger/interface/L1GtAlgorithmEvaluation.h

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,45 +15,17 @@
1515
*
1616
*/
1717

18-
// for L1GtLogicParser
18+
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapFwd.h"
1919
#include "DataFormats/L1GlobalTrigger/interface/L1GtLogicParser.h"
2020

21-
// system include files
2221
#include <iostream>
23-
2422
#include <map>
2523
#include <queue>
2624
#include <stack>
2725
#include <string>
26+
#include <unordered_map>
2827
#include <vector>
2928

30-
// if hash map is used
31-
32-
#include <ext/hash_map>
33-
34-
// how to hash std::string, using a "template specialization"
35-
namespace __gnu_cxx {
36-
37-
/**
38-
Explicit template specialization of hash of a string class,
39-
which just uses the internal char* representation as a wrapper.
40-
*/
41-
template <>
42-
struct hash<std::string> {
43-
size_t operator()(const std::string &x) const { return hash<const char *>()(x.c_str()); }
44-
};
45-
46-
} // namespace __gnu_cxx
47-
// end hash map
48-
49-
// user include files
50-
51-
// base class
52-
#include "DataFormats/L1GlobalTrigger/interface/L1GtLogicParser.h"
53-
54-
//
55-
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapFwd.h"
56-
5729
// forward declarations
5830
class L1GtAlgorithm;
5931
class L1GtConditionEvaluation;
@@ -79,7 +51,7 @@ class L1GtAlgorithmEvaluation {
7951

8052
// typedef std::map<std::string, L1GtConditionEvaluation*>
8153
// ConditionEvaluationMap;
82-
typedef __gnu_cxx ::hash_map<std::string, L1GtConditionEvaluation *> ConditionEvaluationMap;
54+
typedef std ::unordered_map<std::string, L1GtConditionEvaluation *> ConditionEvaluationMap;
8355
typedef ConditionEvaluationMap::const_iterator CItEvalMap;
8456
typedef ConditionEvaluationMap::iterator ItEvalMap;
8557

L1Trigger/GlobalTrigger/src/L1GlobalTriggerGTL.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
// this class header
1717
#include "L1Trigger/GlobalTrigger/interface/L1GlobalTriggerGTL.h"
1818

19-
// system include files
20-
#include <ext/hash_map>
21-
2219
// user include files
2320
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMap.h"
2421

L1Trigger/GlobalTrigger/src/L1GtAlgorithmEvaluation.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <iostream>
2727

2828
#include <boost/algorithm/string.hpp>
29-
#include <ext/hash_map>
3029

3130
// user include files
3231

L1Trigger/L1TGlobal/interface/AlgorithmEvaluation.h

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,45 +17,16 @@
1717
*
1818
*/
1919

20-
// for L1GtLogicParser
2120
#include "DataFormats/L1TGlobal/interface/GlobalLogicParser.h"
21+
#include "DataFormats/L1TGlobal/interface/GlobalObjectMapFwd.h"
2222

23-
// system include files
2423
#include <iostream>
25-
26-
#include <string>
27-
#include <vector>
2824
#include <map>
29-
#include <stack>
3025
#include <queue>
31-
32-
// if hash map is used
33-
34-
#include <ext/hash_map>
35-
#include "DataFormats/L1TGlobal/interface/GlobalObjectMapFwd.h"
36-
37-
// how to hash std::string, using a "template specialization"
38-
// DMP Comment out for not to prevent conflicts
39-
namespace __gnu_cxx {
40-
41-
/**
42-
Explicit template specialization of hash of a string class,
43-
which just uses the internal char* representation as a wrapper.
44-
*/
45-
template <>
46-
struct hash<std::string> {
47-
size_t operator()(const std::string& x) const { return hash<const char*>()(x.c_str()); }
48-
};
49-
50-
} // namespace __gnu_cxx
51-
// end hash map
52-
53-
// user include files
54-
55-
// base class
56-
#include "DataFormats/L1TGlobal/interface/GlobalLogicParser.h"
57-
58-
//
26+
#include <stack>
27+
#include <string>
28+
#include <unordered_map>
29+
#include <vector>
5930

6031
// forward declarations
6132
class GlobalAlgorithm;
@@ -84,7 +55,7 @@ namespace l1t {
8455
// virtual ~AlgorithmEvaluation();
8556

8657
//typedef std::map<std::string, ConditionEvaluation*> ConditionEvaluationMap;
87-
typedef __gnu_cxx ::hash_map<std::string, ConditionEvaluation*> ConditionEvaluationMap;
58+
typedef std::unordered_map<std::string, ConditionEvaluation*> ConditionEvaluationMap;
8859
typedef ConditionEvaluationMap::const_iterator CItEvalMap;
8960
typedef ConditionEvaluationMap::iterator ItEvalMap;
9061

L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
#include <iostream>
2626
#include <iomanip>
2727

28-
#include <boost/algorithm/string.hpp>
29-
#include <ext/hash_map>
30-
3128
// user include files
3229

3330
//

0 commit comments

Comments
 (0)