-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from joequant/dev/fcalccluster
fix #43 to compile with c++17
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git source/BeamCalReco/src/BeamCalBkgPregen.cpp source/BeamCalReco/src/BeamCalBkgPregen.cpp | ||
index 80b217e..839cf13 100644 | ||
--- a/source/BeamCalReco/src/BeamCalBkgPregen.cpp | ||
+++ b/source/BeamCalReco/src/BeamCalBkgPregen.cpp | ||
@@ -29,6 +29,7 @@ | ||
#include <map> | ||
#include <set> | ||
#include <stdexcept> | ||
+#include <random> | ||
|
||
using std::vector; | ||
using std::string; | ||
@@ -67,7 +67,7 @@ void BeamCalBkgPregen::init(vector<string> &bg_files, const int n_bx) | ||
m_backgroundBX = new TChain("bcTree"); | ||
|
||
//mix up the files, because the random numbers are ordered to avoid repeating | ||
- std::random_shuffle(bg_files.begin(), bg_files.end()); | ||
+ std::shuffle(bg_files.begin(), bg_files.end(), std::mt19937(std::random_device()())); | ||
|
||
for (std::vector<std::string>::iterator file = bg_files.begin(); file != bg_files.end(); ++file) { | ||
streamlog_out(DEBUG1) << *file << std::endl; |