Skip to content

Commit

Permalink
run pre-commit on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Feb 10, 2023
1 parent e09a8d1 commit 889ac5a
Show file tree
Hide file tree
Showing 18 changed files with 174 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defaults:
jobs:
framework-validation:
uses: rest-for-physics/framework/.github/workflows/validation.yml@master

libCheck:
name: Validate library
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,3 @@ Load REST Libraries:
except:
variables:
- $CRONJOB


28 changes: 17 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
set(LibraryVersion "1.9")
add_definitions(-DLIBRARY_VERSION="${LibraryVersion}")

#find garfield libs and includes
IF (NOT DEFINED REST_GARFIELD)
# find garfield libs and includes
if (NOT DEFINED REST_GARFIELD)
set(REST_GARFIELD OFF)
ENDIF ()
endif ()

if (${REST_GARFIELD} MATCHES "ON")
add_definitions(-DUSE_Garfield)
Expand All @@ -14,9 +14,11 @@ if (${REST_GARFIELD} MATCHES "ON")
message(STATUS "Using new Garfield CMake")
set(GARFIELD_INSTALL $ENV{GARFIELD_INSTALL})
find_package(Garfield REQUIRED)
set(external_include_dirs ${external_include_dirs} ${GARFIELD_INSTALL}/include/Garfield)
set(external_include_dirs ${external_include_dirs}
${GARFIELD_INSTALL}/include/Garfield)
set(external_libs ${external_libs} Garfield::Garfield)
# recommended CMake way does not work, we need to delete the "FindGarfield.cmake" script
# recommended CMake way does not work, we need to delete the
# "FindGarfield.cmake" script
elseif (DEFINED ENV{GARFIELD_HOME})
# Old way, for backwards compatibility
message(STATUS "Using old Garfield CMake")
Expand All @@ -25,8 +27,10 @@ if (${REST_GARFIELD} MATCHES "ON")
message(STATUS Garfield_INCLUDE_DIRS ${Garfield_INCLUDE_DIRS})
message(STATUS Garfield_INCLUDE_DIRS ${Garfield_INCLUDE_Heed_DIRS})
message(STATUS Garfield_LIBRARIES ${Garfield_LIBRARIES})
set(external_include_dirs ${external_include_dirs} ${Garfield_INCLUDE_DIRS})
set(external_include_dirs ${external_include_dirs} ${Garfield_INCLUDE_Heed_DIRS})
set(external_include_dirs ${external_include_dirs}
${Garfield_INCLUDE_DIRS})
set(external_include_dirs ${external_include_dirs}
${Garfield_INCLUDE_Heed_DIRS})
set(external_libs ${external_libs} ${Garfield_LIBRARIES})
add_definitions(-DUSE_Garfield_OLD)
else ()
Expand All @@ -36,7 +40,9 @@ if (${REST_GARFIELD} MATCHES "ON")
message(STATUS "GARFIELD INSTALLATION: ${GARFIELD_INSTALL}")

set(feature_added "Garfield")
set(feature_added ${feature_added} PARENT_SCOPE)
set(feature_added
${feature_added}
PARENT_SCOPE)
else ()
set(REST_GARFIELD OFF)
endif (${REST_GARFIELD} MATCHES "ON")
Expand All @@ -45,9 +51,9 @@ if (NOT ${REST_EVE} MATCHES "ON")
set(excludes ${excludes} TRestDetectorHitsEventViewer)
endif ()

COMPILELIB("")
compilelib("")

file(GLOB_RECURSE MAC "${CMAKE_CURRENT_SOURCE_DIR}/macros/*")
INSTALL(FILES ${MAC} DESTINATION ./macros/detector)
install(FILES ${MAC} DESTINATION ./macros/detector)

ADD_LIBRARY_TEST()
add_library_test()
3 changes: 2 additions & 1 deletion inc/TRestDetectorDaqChannelSwitchingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class TRestDetectorDaqChannelSwitchingProcess : public TRestEventProcess {
RESTMetadata << "module's daq channel re-definition: " << RESTendl;
auto iter = fFirstDaqChannelDef.begin();
while (iter != fFirstDaqChannelDef.end()) {
RESTMetadata << "module id: " << iter->first << " first daq channel: " << iter->second << RESTendl;
RESTMetadata << "module id: " << iter->first << " first daq channel: " << iter->second
<< RESTendl;
iter++;
}
RESTMetadata << RESTendl;
Expand Down
6 changes: 4 additions & 2 deletions inc/TRestDetectorHitsAnalysisProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ class TRestDetectorHitsAnalysisProcess : public TRestEventProcess {
RESTMetadata << " -------------------" << RESTendl;
RESTMetadata << " Fiducial parameters" << RESTendl;
RESTMetadata << " -------------------" << RESTendl;
RESTMetadata << " x0 : (" << fFid_x0.X() << " , " << fFid_x0.Y() << " , " << fFid_x0.Z() << ")" << RESTendl;
RESTMetadata << " x1 : (" << fFid_x1.X() << " , " << fFid_x1.Y() << " , " << fFid_x1.Z() << ")" << RESTendl;
RESTMetadata << " x0 : (" << fFid_x0.X() << " , " << fFid_x0.Y() << " , " << fFid_x0.Z() << ")"
<< RESTendl;
RESTMetadata << " x1 : (" << fFid_x1.X() << " , " << fFid_x1.Y() << " , " << fFid_x1.Z() << ")"
<< RESTendl;
RESTMetadata << " R : " << fFid_R << RESTendl;
RESTMetadata << " sX : " << fFid_sX << RESTendl;
RESTMetadata << " sY : " << fFid_sY << RESTendl;
Expand Down
6 changes: 3 additions & 3 deletions inc/TRestDetectorPositionMappingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class TRestDetectorPositionMappingProcess : public TRestEventProcess {

RESTMetadata << "the mode is:" << RESTendl;
RESTMetadata << (fApplyGainCorrection ? "> " : " ")
<< "Apply position correction std::map for spectrum " << RESTendl;
RESTMetadata << (fCreateGainMap ? "> " : " ") << "Create new correction std::map for each position"
<< RESTendl;
<< "Apply position correction std::map for spectrum " << RESTendl;
RESTMetadata << (fCreateGainMap ? "> " : " ")
<< "Create new correction std::map for each position" << RESTendl;
RESTMetadata << "output mapping file: " << fMappingSave << RESTendl;
RESTMetadata << "Energy cut for Threshold integral: " << any(fEnergyCutRange) << RESTendl;
RESTMetadata << "Energy cut for NGoodSignals: " << any(fNHitsCutRange) << RESTendl;
Expand Down
2 changes: 1 addition & 1 deletion inc/TRestDetectorReadoutEventViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "TRestDetectorSignalEvent.h"
#include "TRestEventViewer.h"
//#include "TRestDecoding.h"
// #include "TRestDecoding.h"
#include "TH2Poly.h"
#include "TRestDetectorReadout.h"

Expand Down
6 changes: 3 additions & 3 deletions inc/TRestDetectorSingleChannelAnalysisProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class TRestDetectorSingleChannelAnalysisProcess : public TRestEventProcess {

RESTMetadata << "the mode is:" << RESTendl;
RESTMetadata << (fApplyGainCorrection ? "> " : " ")
<< "Apply channel correction std::map for spectrum " << RESTendl;
RESTMetadata << (fCreateGainMap ? "> " : " ") << "Create new correction std::map for each channel"
<< RESTendl;
<< "Apply channel correction std::map for spectrum " << RESTendl;
RESTMetadata << (fCreateGainMap ? "> " : " ")
<< "Create new correction std::map for each channel" << RESTendl;
RESTMetadata << "output mapping file: " << fCalibSave << RESTendl;
RESTMetadata << "Energy cut for Threshold integral: " << any(fThrIntegralCutRange) << RESTendl;
RESTMetadata << "Energy cut for NGoodSignals: " << any(fNGoodSignalsCutRange) << RESTendl;
Expand Down
2 changes: 1 addition & 1 deletion macros/REST_Detector_ViewHitsEvent.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "TRestBrowser.h"
#include "TRestTask.h"
#include "TRestDetectorHitsEvent.h"
#include "TRestTask.h"

#ifndef RestTask_ViewHitsEvents
#define RestTask_ViewHitsEvents
Expand Down
1 change: 0 additions & 1 deletion pipeline/clang-format/clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ if [ "-" = "$1" ] ; then
}"' '"${file}"'
done
fi

1 change: 0 additions & 1 deletion pipeline/clang-format/clangformattest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ fi
git reset HEAD --hard

exit 1

Loading

0 comments on commit 889ac5a

Please sign in to comment.