Skip to content

Commit

Permalink
Entries weights (#124)
Browse files Browse the repository at this point in the history
* fix CMAKE_BUILD_TYPE defaulting

* split entries if they differ with weights
  • Loading branch information
lubynets authored Feb 15, 2024
1 parent 231d111 commit 8f1ef1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ project(AnalysisTree
LANGUAGES CXX)

# by default build optimized code
if(NOT DEFINED CMAKE_BUILD_TYPE)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RELEASE)
endif()

Expand Down Expand Up @@ -50,6 +50,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -g -DDEBUG -D__DEBUG -Wall -Wextra")
#set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -g -DDEBUG -D__DEBUG -Wall -Wextra --coverage")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ftree-vectorize -ffast-math -DNODEBUG")
message(STATUS "Using CXX flags for ${CMAKE_BUILD_TYPE}: ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}")
message(STATUS "Using CXX standard " ${CMAKE_CXX_STANDARD})

list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
list(APPEND CMAKE_PREFIX_PATH ${ROOTSYS})
Expand Down
2 changes: 1 addition & 1 deletion infra/AnalysisTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ std::pair<int, std::vector<int>> AnalysisTask::AddEntry(const AnalysisEntry& var
std::vector<int> var_ids(vars.GetVariables().size());

for (size_t ivar = 0; ivar < entries_.size(); ++ivar) {
if (vars.GetBranchNames() == entries_[ivar].GetBranchNames() && Cuts::Equal(vars.GetCuts(), entries_[ivar].GetCuts())) {//branch exists
if (vars.GetBranchNames() == entries_[ivar].GetBranchNames() && Cuts::Equal(vars.GetCuts(), entries_[ivar].GetCuts()) && vars.GetVariableForWeight() == entries_[ivar].GetVariableForWeight()) {//branch exists
for (size_t i = 0; i < vars.GetVariables().size(); ++i) {
var_ids[i] = entries_[ivar].AddVariable(vars.GetVariables()[i]);
}
Expand Down

0 comments on commit 8f1ef1e

Please sign in to comment.