Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing restG4 pipeline! #295

Merged
merged 3 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions source/framework/analysis/inc/TRestEventRateAnalysisProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ class TRestEventRateAnalysisProcess : public TRestEventProcess {

/// It keeps a historic list of timestamps of the previous N events. Now fixed to N=10 events.
std::vector<Double_t> fPreviousEventTime; //!

/// It indicates whether to add rate observables which is correct only under single thread run.
bool fRateAnalysis = false;//!
void Initialize();
bool fRateAnalysis = false; //!

void Initialize() override;

protected:
// add here the members of your event process
Expand All @@ -56,12 +56,11 @@ class TRestEventRateAnalysisProcess : public TRestEventProcess {
BeginPrintProcess();

if (fRateAnalysis) {
RESTMetadata << "Rate analysis is on under single thread mode" << RESTendl;
}
else {
RESTMetadata << "Rate analysis is off due to multi-thread" << RESTendl;
}

RESTMetadata << "Rate analysis is on under single thread mode" << RESTendl;
} else {
RESTMetadata << "Rate analysis is off due to multi-thread" << RESTendl;
}

EndPrintProcess();
}

Expand Down
9 changes: 4 additions & 5 deletions source/framework/tools/src/TRestTools.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,15 @@ void TRestTools::LoadRESTLibrary(bool silent) {
continue;
}
const TString pathRootString = it.path().string();
if (!pathRootString.Contains("Rest", TString::ECaseCompare::kIgnoreCase)) {
TString libName = TRestTools::SeparatePathAndName((std::string)pathRootString).second;
if (!libName.Contains("Rest")) {
// e.g. "libRestFramework.so"
continue;
}
// Check if library is excluded from loading e.g. is from a package
bool excluded = false;
for (const TString excludedLibrary : excludedLibraries) {
if (pathRootString.Contains(excludedLibrary, TString::ECaseCompare::kIgnoreCase)) {
if (libName.Contains(excludedLibrary)) {
excluded = true;
// RESTWarning << "Library '" << pathRootString << "' excluded from loading" << RESTendl;
break;
Expand Down Expand Up @@ -616,9 +617,7 @@ bool TRestTools::fileExists(const string& filename) { return std::filesystem::ex
///////////////////////////////////////////////
/// \brief Returns true if the **filename** has *.root* extension.
///
bool TRestTools::isRootFile(const string& filename) {
return GetFileNameExtension(filename) == ".root";
}
bool TRestTools::isRootFile(const string& filename) { return GetFileNameExtension(filename) == ".root"; }

///////////////////////////////////////////////
/// \brief Returns true if **filename** is an *http* address.
Expand Down