Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROOT 6.22 - test TBB 2021.1.1 #6570

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions dd4hep.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### RPM external dd4hep v01-14x
### RPM external dd4hep v01-15x

%define tag 934ce101148be15cce7725caad8c25084a272938
%define tag 12caacb209af70835dbdd48efa7ef8d0b77b3dcd
%define branch master
%define github_user AIDASoft
%define keep_archives true
Expand All @@ -23,8 +23,7 @@ CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX='%{i}' \
-DDD4HEP_USE_PYROOT=ON \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=Release \
-DDD4HEP_USE_TBB=ON \
-DCMAKE_PREFIX_PATH=${TBB_ROOT}/cmake/TBB;${CLHEP_ROOT};${XERCES_C_ROOT}"
-DCMAKE_PREFIX_PATH=${CLHEP_ROOT};${XERCES_C_ROOT}"

#Build normal Shared D4Hep without Geant4
rm -rf ../build; mkdir ../build; cd ../build
Expand Down
26 changes: 0 additions & 26 deletions rivet-1.4.0.patch

This file was deleted.

88 changes: 88 additions & 0 deletions rivet-140-313-weightnames.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
--- src/Core/AnalysisLoader.cc
+++ src/Core/AnalysisLoader.cc
@@ -90,6 +90,7 @@ namespace Rivet {
// Find plugin module library files
const string libsuffix = ".so";
vector<string> pluginfiles;
+ vector<string> pluginfileNames;
for (const string& d : dirs) {
if (d.empty()) continue;
oslink::directory dir(d);
@@ -103,8 +104,13 @@ namespace Rivet {
/// @todo Sys-dependent path separator instead of "/"
const string path = d + "/" + filename;
// Ensure no duplicate paths
- if (find(pluginfiles.begin(), pluginfiles.end(), path) == pluginfiles.end()) {
+ // CMS PATCH: ensure also no duplicate library names. Ensures that only the first plugin library in the RIVET_ANALYIS_PATH is taken.
+ // This ensures that, when the same library is both in the developer area and in the release, only the first one is taken.
+ // The developer area preceeds the release in the RIVET_ANALYSIS_PATH
+ if (find(pluginfiles.begin(), pluginfiles.end(), path) == pluginfiles.end() &&
+ find(pluginfileNames.begin(), pluginfileNames.end(), filename) == pluginfileNames.end()){
pluginfiles += path;
+ pluginfileNames += filename;
}
}
}
diff --git analyses/pluginCESR/CLEOII_1997_I446031.cc analyses/pluginCESR/CLEOII_1997_I446031.cc
index 85fc07e..ab1a2be 100644
--- analyses/pluginCESR/CLEOII_1997_I446031.cc
+++ analyses/pluginCESR/CLEOII_1997_I446031.cc
@@ -66,7 +66,7 @@ namespace Rivet {
void analyze(const Event& event) {
// find scattered leptons and calc Q2
const Beam & beams = apply<Beam>(event, "Beams");
- double Q12,Q22;
+ double Q12 = 0.,Q22 = 0.;
if(!findScattered(beams.beams().first ,Q12)) vetoEvent;
if(!findScattered(beams.beams().second,Q22)) vetoEvent;
double scale = max(Q12,Q22);
diff --git include/Rivet/AnalysisHandler.hh include/Rivet/AnalysisHandler.hh
index 4add600a2..d5c6cb633 100644
--- include/Rivet/AnalysisHandler.hh
+++ include/Rivet/AnalysisHandler.hh
@@ -68,6 +68,8 @@ namespace Rivet {

/// Set the weight names from a GenEvent
void setWeightNames(const GenEvent& ge);
+ /// Set the weight names from vector<string>
+ void setWeightNames(vector<string> weightNames) { _weightNames = weightNames; }

/// Get the index of the nominal weight-stream
size_t defaultWeightIndex() const { return _rivetDefaultWeightIdx; }
@@ -221,7 +223,7 @@ namespace Rivet {
/// @{

/// Initialize a run, with the run beams taken from the example event.
- void init(const GenEvent& event);
+ void init(const GenEvent& event, const vector<string>& externalWeightNames = vector<string>());

/// @brief Analyze the given \a event by reference.
///
diff --git src/Core/AnalysisHandler.cc src/Core/AnalysisHandler.cc
index f8769a4ad..3c908fd2f 100644
--- src/Core/AnalysisHandler.cc
+++ src/Core/AnalysisHandler.cc
@@ -71,7 +71,7 @@ namespace Rivet {
}


- void AnalysisHandler::init(const GenEvent& ge) {
+ void AnalysisHandler::init(const GenEvent& ge, const vector<string>& externalWeightNames) {
if (_initialised)
throw UserError("AnalysisHandler::init has already been called: cannot re-initialize!");

@@ -81,7 +81,12 @@ namespace Rivet {
MSG_DEBUG("Initialising the analysis handler");
_eventNumber = ge.event_number();

- setWeightNames(ge);
+ if (externalWeightNames.empty()) {
+ setWeightNames(ge);
+ }
+ else {
+ setWeightNames(externalWeightNames);
+ }
if (_skipWeights)
MSG_INFO("Only using nominal weight. Variation weights will be ignored.");
else if (haveNamedWeights())

50 changes: 0 additions & 50 deletions rivet-weightnames.patch

This file was deleted.

4 changes: 1 addition & 3 deletions rivet.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}
Requires: hepmc fastjet fastjet-contrib yoda
BuildRequires: python py2-cython py2-setuptools

Patch0: rivet-1.4.0
Patch1: rivet-weightnames
Patch0: rivet-140-313-weightnames

%prep
## OLD GENSER: %setup -n rivet/%{realversion}
%setup -n %{n}-%{realversion}
%patch0 -p0
%patch1 -p1

# remove analyses that do not compile
rm analyses/pluginLEP/L3_2008_I825820.cc
Expand Down
4 changes: 2 additions & 2 deletions root.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## INITENV +PATH PYTHON3PATH %{i}/lib
## INITENV SET ROOTSYS %{i}

%define tag 9496c05e656f9c18c83cce6658f9f8914eaf2244
%define branch cms/v6-22-00-patches/v6-22-06
%define tag c40b57f68f6690c4a38ba53324a143ecbda97200
%define branch cms/v6-22-00-patches/98ff530
%define github_user cms-sw
Source: git+https://github.com/%{github_user}/root.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz

Expand Down