Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis authored Jun 25, 2024
2 parents 4fbfaca + fc06755 commit 7cbca43
Show file tree
Hide file tree
Showing 40 changed files with 1,993 additions and 369 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ jobs:
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.REST_PATH }}/examples/restG4/07.FullChainDecay/
restG4 fullChain.rml -o Run00001_U238_FullChainDecay.root
restRoot -b -q Validate.C'("Run00001_U238_FullChainDecay.root", 15)'
restRoot -b -q Validate.C'("Run00001_U238_FullChainDecay.root", 16)'
restG4 singleDecay.rml -o Run00002_U238_SingleChainDecay.root
restRoot -b -q Validate.C'("Run00002_U238_SingleChainDecay.root", 1)'
export REST_ISOTOPE=Be7
Expand Down
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ endif ()
set(external_include_dirs)
set(external_libs)

if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(external_include_dirs ${external_include_dirs} "/usr/local/include/")
message(STATUS "Adding BREW include directory: /usr/local/include")
endif (CMAKE_SYSTEM_NAME MATCHES "Darwin")

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${DECAY_PATH}/cmake
${CMAKE_MODULE_PATH})
set(CMAKE_MACOSX_RPATH 1)
Expand Down Expand Up @@ -356,7 +361,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") # we must call library install here in
endif ()

# Copy pcm files
if (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR CMAKE_SYSTEM_NAME MATCHES "Windows")
if (CMAKE_SYSTEM_NAME MATCHES "Windows")

# Copy pcm files to bin
install(
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The REST Framework
[![DOI](https://zenodo.org/badge/324291710.svg)](http://doi.org/10.5281/zenodo.4528985)
[![pipeline status](https://gitlab.cern.ch/rest-for-physics/framework/badges/master/pipeline.svg)](https://gitlab.cern.ch/rest-for-physics/framework/-/commits/master)
[![pipeline status](https://github.com/rest-for-physics/framework/actions/workflows/validation.yml/badge.svg)](https://github.com/rest-for-physics/framework)
[![website](https://img.shields.io/badge/user-guide-E8B6FF.svg)](https://rest-for-physics.github.io)
[![api](https://img.shields.io/badge/user-API-FFCA78.svg)](https://rest-for-physics.github.io/framework/)
[![forum](https://img.shields.io/badge/user-forum-AAFF90.svg)](https://rest-forum.unizar.es/)
Expand Down Expand Up @@ -77,6 +77,8 @@ A major change at 2.3 will prevent from backwards compatibility, since class nam
- PandaX-III: Searching for neutrinoless double beta decay with high pressure 136Xe gas time projection chambers. [X. Chen et al., Science China Physics, Mechanics & Astronomy 60, 061011 (2017)](https://doi.org/10.1007/s11433-017-9028-0) [arXiv:1610.08883](https://arxiv.org/abs/1610.08883).

## Presentations
- Background model studies for IAXO using the REST-for-Physics framework, Luis Obis, [2024-Apr, VIEnna Workshop on Simulations 2024 (VIEWS24), Vienna](https://indico.cern.ch/event/1275551/contributions/5858816/).
- REST-for-Physics framework for Geant4 simulations and data analysis, Álvaro Ezquerro, [2024-Apr, VIEnna Workshop on Simulations 2024 (VIEWS24), Vienna](https://indico.cern.ch/event/1275551/contributions/5858814/).
- REST-for-Physics, Luis Obis, [2022-May, ROOT Users Workshop, FermiLab](https://indico.fnal.gov/event/23628/contributions/240755/).
- REST v2.0 : A data analysis and simulation framework for micro-patterned readout detectors., Javier Galan, [2016-Dec, 8th Symposium on Large TPCs for low-energy rare event detection, Paris](https://indico.cern.ch/event/473362/contributions/2334838/).

Expand Down
2 changes: 1 addition & 1 deletion cmake/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
execute_process(
"${CMAKE_COMMAND}" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
Expand Down
Binary file added data/distributions/CosmicsCry.root
Binary file not shown.
Binary file added doc/doxygen/images/radialstrippedmask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions examples/masks.rml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
<parameter name="stripsGap" value="12mm"/>
<parameter name="stripsThickness" value="1.2mm"/>
</TRestStrippedMask>
<TRestRadialStrippedMask name="radialStrips" verboseLevel="warning">
<parameter name="maskRadius" value="19.4cm" />
<parameter name="offset" value="(0,0)cm" />
<parameter name="rotationAngle" value="30degrees" />

<parameter name="initialRadius" value="5.4cm" />
<parameter name="internalRegionRadius" value="0cm" />

<parameter name="stripsAngle" value="60degrees" />
<parameter name="stripsThickness" value="0.7cm" />
</TRestRadialStrippedMask>
<TRestRingsMask name="rings" verboseLevel="warning">
<parameter name="maskRadius" value="9cm"/>
<parameter name="offset" value="(3,3)mm"/>
Expand Down
84 changes: 56 additions & 28 deletions macros/REST_ListMacros.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,21 @@ using namespace std;
//*** Lists all the official macros together with its documentation
//***
//*******************************************************************************************************
Int_t REST_ListMacros() {
Int_t REST_ListMacros(int details = 0, std::string onlyThisMacro = "") {
string macrosPath = (string)getenv("REST_PATH") + "/macros";
vector<string> directories = TRestTools::GetSubdirectories(macrosPath);

cout << "Directory : " << macrosPath << endl;
cout << endl;
cout << "Entering directory : " << macrosPath << endl;
vector<string> main_files = TRestTools::GetFilesMatchingPattern(macrosPath + "/REST_*.C");
for (int m = 0; m < main_files.size(); m++) {
cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
cout << " ++ "
<< " Macro : " << TRestTools::SeparatePathAndName(main_files[m]).second << endl;
std::ifstream t(main_files[m]);
std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());

std::vector<string> lines = REST_StringHelper::Split(str, "\n");

cout << " ++ " << endl;
for (int l = 0; l < lines.size(); l++)
if (lines[l].find("//*** ") != string::npos)
cout << " ++ " << lines[l].substr(6, -1) << endl;
cout << " ++ " << endl;
}
cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;

for (int n = 0; n < directories.size(); n++) {
cout << "Directory : " << directories[n] << endl;
if (directories[n].find("pipeline") != string::npos) continue;
if (directories[n].find("/macros/mac/") != string::npos) continue;
vector<string> files = TRestTools::GetFilesMatchingPattern(directories[n] + "/REST_*.C");

for (int m = 0; m < files.size(); m++) {
if (details) {
for (int m = 0; m < main_files.size(); m++) {
std::string macro = TRestTools::SeparatePathAndName(main_files[m]).second;
if (!onlyThisMacro.empty() && onlyThisMacro != macro) continue;
cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
cout << " ++ "
<< " Macro : " << TRestTools::SeparatePathAndName(files[m]).second << endl;
std::ifstream t(files[m]);
<< " Macro : " << macro << endl;
std::ifstream t(main_files[m]);
std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());

std::vector<string> lines = REST_StringHelper::Split(str, "\n");
Expand All @@ -58,6 +39,53 @@ Int_t REST_ListMacros() {
cout << " ++ " << endl;
}
cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
} else {
for (int m = 0; m < main_files.size(); m++) {
cout << " + " << TRestTools::SeparatePathAndName(main_files[m]).second << endl;
}
}

for (int n = 0; n < directories.size(); n++) {
cout << endl;
cout << "Entering directory : " << directories[n] << endl;
if (directories[n].find("pipeline") != string::npos) continue;
if (directories[n].find("/macros/mac/") != string::npos) continue;
vector<string> files = TRestTools::GetFilesMatchingPattern(directories[n] + "/REST_*.C");

if (details) {
for (int m = 0; m < files.size(); m++) {
std::string macro = TRestTools::SeparatePathAndName(files[m]).second;
if (!onlyThisMacro.empty() && onlyThisMacro != macro) continue;
cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
<< endl;
cout << " ++ Macro : " << macro << endl;
std::ifstream t(files[m]);
std::string str((std::istreambuf_iterator<char>(t)), std::istreambuf_iterator<char>());

std::vector<string> lines = REST_StringHelper::Split(str, "\n");

cout << " ++ " << endl;
for (int l = 0; l < lines.size(); l++)
if (lines[l].find("//*** ") != string::npos)
cout << " ++ " << lines[l].substr(6, -1) << endl;
cout << " ++ " << endl;
}
cout << " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
} else {
for (int m = 0; m < files.size(); m++) {
cout << " + " << TRestTools::SeparatePathAndName(files[m]).second << endl;
}
std::cout << std::endl;
std::cout << " ------- " << std::endl;
std::cout << "IMPORTANT. To get a more detailed macro documentation enable the details argument:"
<< std::endl;
std::cout << "Execute: restListMacros 1" << std::endl;
std::cout << "OR if you want to show only the documentation of a given macro, add the macro.C "
"filename as argument"
<< std::endl;
std::cout << "Execute: restListMacros 1 REST_CheckValidRuns.C" << std::endl;
std::cout << " ------- " << std::endl;
}
}
return 0;
}
2 changes: 1 addition & 1 deletion macros/REST_OpenInputFile.C
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void REST_OpenInputFile(const std::string& fileName) {
printf("%s\n", " - dSet->GetDataFrame().GetColumnNames()");
printf("%s\n\n", " - dSet->GetTree()->GetEntries()");
printf("%s\n", " - dSet->GetDataFrame().Display(\"\")->Print()");
printf("%s\n\n", " - dSet->GetDataFrame().Display({\"colName1,colName2\"})->Print()");
printf("%s\n\n", " - dSet->GetDataFrame().Display({\"colName1\", \"colName2\"})->Print()");
if (dSet) delete dSet;
dSet = new TRestDataSet();
dSet->EnableMultiThreading(false);
Expand Down
46 changes: 23 additions & 23 deletions scripts/generateVersionHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,29 +159,29 @@
)
print("\n")
print(
"Once your PR has been accepted and merged, you should generate a new Git tag at the master branch.\n"
)
print(
"-----> git tag -a v"
+ str(a)
+ "."
+ str(b)
+ "."
+ str(c)
+ ' -m "Update to version v'
+ str(a)
+ "."
+ str(b)
+ "."
+ str(c)
+ '"\n'
)
print(
"And push the changes to repository. You should also push your branch to GitHub if you have not already.\n"
)
print("-----> git push origin v" + str(a) + "." + str(b) + "." + str(c) + "\n")
print(
"IMPORTANT. Summarize the changes in the tag generated at the Gitlab repository website.\n"
"Once your PR has been accepted and merged, you should generate a new Git tag and RELEASE at the master branch.\n"
)
# print(
# "-----> git tag -a v"
# + str(a)
# + "."
# + str(b)
# + "."
# + str(c)
# + ' -m "Update to version v'
# + str(a)
# + "."
# + str(b)
# + "."
# + str(c)
# + '"\n'
# )
# print(
# "And push the changes to repository. You should also push your branch to GitHub if you have not already.\n"
# )
# print("-----> git push origin v" + str(a) + "." + str(b) + "." + str(c) + "\n")
# print(
# "IMPORTANT. Summarize the changes in the tag generated at the Gitlab repository website.\n"
# )

exit(0)
Loading

0 comments on commit 7cbca43

Please sign in to comment.