Skip to content

Commit

Permalink
Merge branch 'master' into fileListDF
Browse files Browse the repository at this point in the history
  • Loading branch information
jgalan authored Jun 11, 2024
2 parents 34f56bf + 8b97d34 commit 497dbae
Show file tree
Hide file tree
Showing 19 changed files with 958 additions and 103 deletions.
Binary file added data/distributions/CosmicsCry.root
Binary file not shown.
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)
2 changes: 1 addition & 1 deletion source/framework/analysis/src/TRestDataSetCalibration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void TRestDataSetCalibration::Calibrate() {

if (fCalibFile.empty()) {
auto histo = dataSet.GetDataFrame().Histo1D(
{"spectrum", "spectrum", fNBins, fCalibRange.X(), fCalibRange.X()}, fCalObservable);
{"spectrum", "spectrum", fNBins, fCalibRange.X(), fCalibRange.Y()}, fCalObservable);
spectrum = std::unique_ptr<TH1F>(static_cast<TH1F*>(histo->DrawClone()));

// Get position of the maximum
Expand Down
3 changes: 2 additions & 1 deletion source/framework/core/inc/TRestDataSetPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class TRestDataSetPlot : public TRestMetadata {
std::vector<std::pair<std::array<std::string, 3>, TVector2>> variablePos;
std::vector<std::pair<std::array<std::string, 3>, TVector2>> metadataPos;
std::vector<std::pair<std::array<std::string, 3>, TVector2>> obsPos;
std::vector<std::pair<std::array<std::string, 3>, TVector2>> expPos;

TRestCut* panelCut = nullptr;

Expand Down Expand Up @@ -182,6 +183,6 @@ class TRestDataSetPlot : public TRestMetadata {
TRestDataSetPlot(const char* configFilename, std::string name = "");
~TRestDataSetPlot();

ClassDefOverride(TRestDataSetPlot, 1);
ClassDefOverride(TRestDataSetPlot, 2);
};
#endif
12 changes: 6 additions & 6 deletions source/framework/core/inc/TRestVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* #endif
*
*/
#define REST_RELEASE "2.4.2"
#define REST_RELEASE_DATE "Mon Feb 12"
#define REST_RELEASE_TIME "22:23:31 CET 2024"
#define REST_RELEASE_NAME "Henry Primakoff"
#define REST_GIT_COMMIT "d8ec95be"
#define REST_VERSION_CODE 132098
#define REST_RELEASE "2.4.3"
#define REST_RELEASE_DATE "Fri May 3"
#define REST_RELEASE_TIME "17:36:10 CEST 2024"
#define REST_RELEASE_NAME "Steven Weinberg"
#define REST_GIT_COMMIT "bc42645d"
#define REST_VERSION_CODE 132099
#define REST_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
#define REST_SCHEMA_EVOLUTION "ON"
#endif
37 changes: 36 additions & 1 deletion source/framework/core/src/TRestDataSet.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,26 @@
/// [2] d.GetTree()->GetEntries()
/// \endcode
///
/// Example 3 Automatically importing a dataset using restRoot
///
/// \code
/// restRoot Dataset_FinalBabyIAXO_XMM_mM_P14.root
///
/// REST dataset file identified. It contains a valid TRestDataSet.
///
/// Importing dataset /nfs/dust/iaxo/user/jgalan//Dataset_FinalBabyIAXO_XMM_mM_P14.root as `dSet`
///
/// The dataset is ready. You may now access the dataset using:
///
/// - dSet->PrintMetadata()
/// - dSet->GetDataFrame().GetColumnNames()
/// - dSet->GetTree()->GetEntries()
///
/// - dSet->GetDataFrame().Display("")->Print()
/// - dSet->GetDataFrame().Display({"colName1,colName2"})->Print()
/// [0]
/// \endcode
///
/// ### Relevant quantities
///
/// Sometimes we will be willing that our dataset contains few variables
Expand Down Expand Up @@ -241,6 +261,21 @@
/// where `SolarFlux`,`GeneratorArea` and `Nsim` are the given names of
/// the relevant quantities inside the dataset.
///
/// ### Adding cuts
///
/// It is also possible to add cuts used to filter the data that will
/// be stored inside the dataset. We can do that including a TRestCut
/// definition inside the TRestDataSet.
///
/// For example, the following cut definition would discard entries
/// with unexpected values inside the specified column, `process_status`.
///
/// \code
/// <TRestCut>
/// <cut name="goodData" value="!TMath::IsNaN(process_status)"/>
/// </TRestCut>
/// \endcode
///
///----------------------------------------------------------------------
///
/// REST-for-Physics - Software for Rare Event Searches Toolkit
Expand Down Expand Up @@ -487,7 +522,7 @@ std::vector<std::string> TRestDataSet::FileSelection() {
}

///////////////////////////////////////////////
/// \brief This function apply a TRestCut to the dataframe
/// \brief This function applies a TRestCut to the dataframe
/// and returns a dataframe with the applied cuts. Note that
/// the cuts are not applied directly to the dataframe on
/// TRestDataSet, to do so you should do fDataSet = MakeCut(fCut);
Expand Down
Loading

0 comments on commit 497dbae

Please sign in to comment.