Skip to content

Commit edeceec

Browse files
authored
Merge branch 'master' into dependabot/github_actions/actions/upload-artifact-4
2 parents 850395d + 8a8be27 commit edeceec

17 files changed

+549
-45
lines changed

cmake/cmake_uninstall.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ foreach(file ${files})
99
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
1010
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
1111
execute_process(
12-
"${CMAKE_COMMAND}" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
12+
COMMAND ${CMAKE_COMMAND} -E rm -f $ENV{DESTDIR}${file}
1313
OUTPUT_VARIABLE rm_out
14-
RETURN_VALUE rm_retval
14+
RESULT_VARIABLE rm_retval
1515
)
1616
if(NOT "${rm_retval}" STREQUAL 0)
1717
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")

cmake/thisREST.cmake

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Write thisREST.[c]sh to INSTALL directory
22

3+
# Check if the LCG environment was loaded. Then it will be sourced in
4+
# thisREST.sh
5+
set(loadLCG "")
6+
if (DEFINED ENV{LCG_VERSION})
7+
# Retrieve the value of the environment variable
8+
set(LCG_VERSION $ENV{LCG_VERSION})
9+
10+
# Print the value of the environment variable in CMake
11+
message(STATUS "Found LCG environment! Version: ${LCG_VERSION}")
12+
13+
set(C_INCLUDE_PATH "$ENV{C_INCLUDE_PATH}")
14+
15+
string(FIND "${C_INCLUDE_PATH}" ":" COLON_POSITION)
16+
17+
if (COLON_POSITION GREATER_EQUAL 0)
18+
# Extract the substring from the beginning up to the position of the
19+
# first ':'
20+
string(SUBSTRING "${C_INCLUDE_PATH}" 0 "${COLON_POSITION}" C_CLEAN)
21+
else ()
22+
# If ':' is not found, use the entire string
23+
set(C_CLEAN "${C_INCLUDE_PATH}")
24+
endif ()
25+
26+
string(REPLACE "include" "setup.sh" LCG_SETUP "${C_CLEAN}")
27+
28+
# Print the modified string
29+
message(STATUS "Original path: ${C_CLEAN}")
30+
message(STATUS "Modified path: ${LCG_SETUP}")
31+
32+
set(loadLCG
33+
"\# We load the LCG_${LCG_VERSION} environment.\necho \\\"Loading\ LCG_${LCG_VERSION}\ environment\\\"\nsource ${LCG_SETUP}\n"
34+
)
35+
36+
endif ()
37+
338
# We identify the thisroot.sh script for the corresponding ROOT version
439
execute_process(
540
COMMAND root-config --prefix
@@ -97,6 +132,8 @@ file( WRITE \${CMAKE_INSTALL_PREFIX}/thisREST.sh
97132
98133
\"\#!/bin/bash
99134
135+
${loadLCG}
136+
100137
\# check active shell by checking for existence of _VERSION variable
101138
if [[ -n \\\"\\\${BASH_VERSION}\\\" ]]; then
102139
thisdir=\\\$(cd \\\$(dirname \\\${BASH_ARGV[0]}); pwd)

data/distributions/Fe55.root

4.47 KB
Binary file not shown.

projects/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ List of projects included:
1010

1111
----
1212

13-
**⚠ WARNING: REST is under continous development.** This README is offered to you by the REST community. Your HELP is needed to keep this file up to date. You are very welcome to contribute fixing typos, updating information or adding new contributions to REST. See also our [Contribution Guide](https://lfna.unizar.es/rest-development/REST_v2/-/blob/master/CONTRIBUTING.md).
13+
**⚠ WARNING: REST is under continuous development.** This README is offered to you by the REST community. Your HELP is needed to keep this file up to date. You are very welcome to contribute fixing typos, updating information or adding new contributions to REST. See also our [Contribution Guide](https://lfna.unizar.es/rest-development/REST_v2/-/blob/master/CONTRIBUTING.md).
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*************************************************************************
2+
* This file is part of the REST software framework. *
3+
* *
4+
* Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5+
* For more information see http://gifna.unizar.es/trex *
6+
* *
7+
* REST is free software: you can redistribute it and/or modify *
8+
* it under the terms of the GNU General Public License as published by *
9+
* the Free Software Foundation, either version 3 of the License, or *
10+
* (at your option) any later version. *
11+
* *
12+
* REST is distributed in the hope that it will be useful, *
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15+
* GNU General Public License for more details. *
16+
* *
17+
* You should have a copy of the GNU General Public License along with *
18+
* REST in $REST_PATH/LICENSE. *
19+
* If not, see http://www.gnu.org/licenses/. *
20+
* For the list of contributors see $REST_PATH/CREDITS. *
21+
*************************************************************************/
22+
23+
#ifndef RestProcess_TRestEventTimeSelectionProcess
24+
#define RestProcess_TRestEventTimeSelectionProcess
25+
26+
#include <TRestEventProcess.h>
27+
28+
#include <iostream>
29+
30+
class TRestEventTimeSelectionProcess : public TRestEventProcess {
31+
private:
32+
TRestEvent* fEvent; //!
33+
std::string fFileWithTimes;
34+
Bool_t fIsActiveTime;
35+
Char_t fDelimiter;
36+
Long_t fTimeOffsetInSeconds;
37+
Long_t fTimeStartMarginInSeconds;
38+
Long_t fTimeEndMarginInSeconds;
39+
std::vector<std::pair<std::string, std::string>> fStartEndTimes;
40+
41+
/// Information about the events processed
42+
43+
Int_t fNEventsRejected;
44+
Int_t fNEventsSelected;
45+
Double_t fTotalTimeInSeconds;
46+
47+
void Initialize() override;
48+
49+
protected:
50+
public:
51+
RESTValue GetInputEvent() const override { return fEvent; }
52+
RESTValue GetOutputEvent() const override { return fEvent; }
53+
54+
void InitProcess() override;
55+
TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
56+
void EndProcess() override;
57+
58+
void PrintMetadata() override;
59+
60+
// Constructor
61+
TRestEventTimeSelectionProcess();
62+
// Destructor
63+
~TRestEventTimeSelectionProcess() {}
64+
65+
const char* GetProcessName() const override { return "EventTimeSelectionProcess"; }
66+
67+
std::string GetFileWithTimes() const { return fFileWithTimes; }
68+
69+
Bool_t GetIsActiveTime() const { return fIsActiveTime; }
70+
Char_t GetDelimiter() const { return fDelimiter; }
71+
72+
std::vector<std::pair<std::string, std::string>> GetStartEndTimes() const { return fStartEndTimes; }
73+
std::string GetTimeStampCut(std::string timeStampObsName = "timeStamp", Bool_t useOffset = true,
74+
Bool_t useMargins = true, Int_t nTimes = -1);
75+
Int_t GetNEventsRejected() const { return fNEventsRejected; }
76+
Int_t GetNEventsSelected() const { return fNEventsSelected; }
77+
Double_t GetTotalTimeInSeconds() const { return fTotalTimeInSeconds; }
78+
Long_t GetTimeOffsetInSeconds() const { return fTimeOffsetInSeconds; }
79+
Long_t GetTimeStartMarginInSeconds() const { return fTimeStartMarginInSeconds; }
80+
Long_t GetTimeEndMarginInSeconds() const { return fTimeEndMarginInSeconds; }
81+
82+
Double_t CalculateTotalTimeInSeconds();
83+
static std::vector<std::pair<std::string, std::string>> ReadFileWithTimes(std::string fileWithTimes,
84+
Char_t delimiter = ',');
85+
86+
void SetAsActiveTime() { fIsActiveTime = true; }
87+
void SetAsDeadTime() { fIsActiveTime = false; }
88+
void SetFileWithTimes(const std::string& fileWithTimes) { fFileWithTimes = fileWithTimes; }
89+
void SetIsActiveTime(Bool_t isActiveTime) { fIsActiveTime = isActiveTime; }
90+
void SetDelimiter(Char_t delimiter) { fDelimiter = delimiter; }
91+
void SetStartEndTimes(const std::vector<std::pair<std::string, std::string>>& startEndTimes) {
92+
fStartEndTimes = startEndTimes;
93+
}
94+
void SetTimeOffsetInSeconds(Long_t timeOffsetInSeconds) { fTimeOffsetInSeconds = timeOffsetInSeconds; }
95+
void SetTimeStartMarginInSeconds(Long_t timeStartMarginInSeconds) {
96+
fTimeStartMarginInSeconds = timeStartMarginInSeconds;
97+
}
98+
void SetTimeEndMarginInSeconds(Long_t timeEndMarginInSeconds) {
99+
fTimeEndMarginInSeconds = timeEndMarginInSeconds;
100+
}
101+
102+
ClassDefOverride(TRestEventTimeSelectionProcess, 1);
103+
};
104+
#endif

source/framework/analysis/src/TRestEventRateAnalysisProcess.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
///
6666
/// <hr>
6767
///
68-
/// \warning **⚠ REST is under continous development.** This documentation
68+
/// \warning **⚠ REST is under continuous development.** This documentation
6969
/// is offered to you by the REST community. Your HELP is needed to keep this
7070
/// code up to date. Your feedback will be worth to support this software, please
7171
/// report any problems/suggestions you may find will using it at [The REST Framework

source/framework/analysis/src/TRestEventSelectionProcess.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
///
4747
/// <hr>
4848
///
49-
/// \warning ** REST is under continous development.** This documentation
49+
/// \warning ** REST is under continuous development.** This documentation
5050
/// is offered to you by the REST community. Your HELP is needed to keep this code
5151
/// up to date. Your feedback will be worth to support this software, please report
5252
/// any problems/suggestions you may find while using it at [The REST Framework

0 commit comments

Comments
 (0)