Skip to content

Commit 9bd5b79

Browse files
fabiocossmuzaffar
authored andcommitted
port the CMS additions
1 parent e7c9d90 commit 9bd5b79

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

JetCleanser/JetCleanser.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
3030
namespace contrib{
3131

3232
// Modification to satisfy C++11 (thanks to Gavin Salam)
33+
#if __cplusplus >= 201103L
34+
#else
3335
const double JetCleanser::jc_zero = 1.0e-6;
36+
#endif
3437

3538
/////////////////////////////
3639
// constructor

JetCleanser/JetCleanser.hh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,13 @@ public:
105105
private:
106106
// Modification to satisfy C++11 (thanks to Gavin Salam)
107107
//static const double jc_zero = 1.0e-6;
108+
//CMS change:
109+
// Change not endorsed by fastjet collaboration
110+
#if __cplusplus >= 201103L
111+
static constexpr double jc_zero = 1.0e-6;
112+
#else
108113
static const double jc_zero;
114+
#endif
109115

110116
double _rsub;
111117
double _fcut;

RecursiveTools/RecursiveSymmetryCutBase.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LimitedWarning RecursiveSymmetryCutBase::_mu2_gt1_warning;
3737
//LimitedWarning RecursiveSymmetryCutBase::_nonca_warning;
3838
LimitedWarning RecursiveSymmetryCutBase::_explicit_ghost_warning;
3939

40-
bool RecursiveSymmetryCutBase::_verbose = false;
40+
std::atomic<bool> RecursiveSymmetryCutBase::_verbose {false};
4141

4242
//----------------------------------------------------------------------
4343
PseudoJet RecursiveSymmetryCutBase::result(const PseudoJet & jet) const {

RecursiveTools/include/fastjet/contrib/RecursiveSymmetryCutBase.hh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#else
3838
#include "Recluster.hh"
3939
#endif
40+
#include <atomic>
41+
4042

4143
/** \mainpage RecursiveTools contrib
4244
@@ -215,7 +217,7 @@ public:
215217
class StructureType;
216218

217219
/// for testing
218-
static bool _verbose;
220+
static std::atomic<bool> _verbose;
219221

220222
protected:
221223
// the methods below have to be defined by deerived classes

0 commit comments

Comments
 (0)