-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #427 from rest-for-physics/jgalan_minor_fix
Fix on TRestMetadata and TRestDataSet add-ons
- Loading branch information
Showing
4 changed files
with
165 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "TRestDataSet.h" | ||
#include "TRestTask.h" | ||
|
||
#ifndef RestTask_GenerateDataSets | ||
#define RestTask_GenerateDataSets | ||
|
||
//******************************************************************************************************* | ||
//*** Description: This macro will launch the generation of datasets defined | ||
//*** inside a particular RML file `datasets.rml` that contains the dataset | ||
//*** definitions. The second argument will allow to specify the datasets | ||
//*** to be generated from the existing ones inside `dataset.rml`. | ||
//*** | ||
//*** -------------- | ||
//*** Usage: restManager GenerateDataSets datasets.rml set1,set2,set3 | ||
//*** | ||
//******************************************************************************************************* | ||
|
||
Int_t REST_GenerateDataSets(const std::string& inputRML, const std::string& datasets) { | ||
std::vector<std::string> sets = REST_StringHelper::Split(datasets, ","); | ||
|
||
for (const auto& set : sets) { | ||
std::cout << "Set : " << set << std::endl; | ||
TRestDataSet d(inputRML.c_str(), set.c_str()); | ||
d.GenerateDataSet(); | ||
d.Export("Dataset_" + set + ".root"); | ||
} | ||
return 0; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters