Skip to content

Commit

Permalink
Weights name (#24)
Browse files Browse the repository at this point in the history
* fix CMAKE_BUILD_TYPE defaulting, change AT tag

* add weights into name of qa plot

* add weights into name of qa plot - for 2D as well
  • Loading branch information
lubynets committed Feb 15, 2024
1 parent 5062445 commit 99d50c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ set(AnalysisTreeQA_BUILD_TASKS OFF CACHE BOOL "Build user' AnalysisTreeQA tasks
set(AnalysisTreeQA_BUILD_EXAMPLES ON CACHE BOOL "Build AnalysisTreeQA examples (examples/)")
set(AnalysisTreeQA_BUILD_TESTS OFF CACHE BOOL "Build tests for AnalysisTreeQA")
set(AnalysisTreeQA_BUNDLED_AT ON CACHE BOOL "Get and build AnalysisTree")
set(AnalysisTreeQA_BUNDLED_AT_VERSION "v2.3.5" CACHE STRING "Bundled AnalysisTree version")
set(AnalysisTreeQA_BUNDLED_AT_VERSION "v2.3.4" CACHE STRING "Bundled AnalysisTree version")
set(AnalysisTreeQA_BUNDLED_AT_GIT_SHALLOW ON CACHE BOOL "Use CMake GIT_SHALLOW option")
set(AnalysisTreeQA_BUNDLED_CUTS ON CACHE BOOL "Get and build AnalysisTreeCuts")
set(AnalysisTreeQA_BUNDLED_CUTS_VERSION "v0.0.1" CACHE STRING "Bundled AnalysisTreeCuts version")

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

Expand All @@ -44,6 +44,7 @@ endif()
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -g -DDEBUG -D__DEBUG -Wall -Wextra")
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
10 changes: 10 additions & 0 deletions src/EntryConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ EntryConfig::EntryConfig(const Axis& axis, Variable& weight, Cuts* cuts, bool is
entry_cuts_(cuts) {
if (cuts)
name_ += "_" + cuts->GetName();
if (!var4weight_.GetName().empty() && var4weight_.GetFields().at(0).GetName() != "ones") {
name_ += "_weight_" + var4weight_.GetName();
}
if(is_integral){
name_ += "_integral";
}
Expand Down Expand Up @@ -131,6 +134,10 @@ void EntryConfig::Set2DName() {
if (entry_cuts_ != nullptr)
name_ += "_" + entry_cuts_->GetName();

if (!var4weight_.GetName().empty() && var4weight_.GetFields().at(0).GetName() != "ones") {
name_ += "_weight_" + var4weight_.GetName();
}

if (type_ == PlotType::kProfile) {
name_ += "_profile";
}
Expand Down Expand Up @@ -166,6 +173,9 @@ std::string EntryConfig::GetDirectoryName() const {
if (entry_cuts_) {
name += "_" + entry_cuts_->GetName();
}
if (!var4weight_.GetName().empty() && var4weight_.GetFields().at(0).GetName() != "ones") {
name += "_weight_" + var4weight_.GetName();
}
return name;
}

Expand Down

0 comments on commit 99d50c2

Please sign in to comment.