Skip to content

Commit

Permalink
Merge branch 'jgalan_sensitivity' of github.com:rest-for-physics/fram…
Browse files Browse the repository at this point in the history
…ework into jgalan_sensitivity
  • Loading branch information
jgalan committed Nov 27, 2023
2 parents 3164d77 + e59e500 commit aaf068f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
33 changes: 22 additions & 11 deletions source/framework/core/src/TRestRun.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ void TRestRun::InitFromConfigFile() {
}
if (ToUpper(runNstr) == "AUTO" && ToUpper(inputName) == "AUTO") {
RESTError << "TRestRun: run number and input file name cannot both be "
"\"AUTO\"" << RESTendl;
"\"AUTO\""
<< RESTendl;
exit(1);
}

Expand Down Expand Up @@ -272,7 +273,8 @@ void TRestRun::InitFromConfigFile() {
ImportMetadata(e->Attribute("file"), e->Attribute("name"), e->Attribute("type"), true);
} else {
RESTWarning << "Wrong definition of addMetadata! Metadata name or file name "
"is not given!" << RESTendl;
"is not given!"
<< RESTendl;
}
} else if (Count(key, "TRest") > 0) {
if (e->Attribute("file") != nullptr && TRestTools::isRootFile(e->Attribute("file"))) {
Expand Down Expand Up @@ -402,7 +404,8 @@ void TRestRun::OpenInputFile(const TString& filename, const string& mode) {
ReadInputFileMetadata();
} else {
RESTWarning << "-- W : The metadata version found on input file is lower "
"than 2.2.1!" << RESTendl;
"than 2.2.1!"
<< RESTendl;
RESTWarning << "-- W : metadata from input file will not be read" << RESTendl;
}
}
Expand Down Expand Up @@ -603,10 +606,12 @@ void TRestRun::ReadInputFileTrees() {

if (fInputEvent == nullptr) {
RESTError << "TRestRun:OpenInputFile. Cannot initialize input event, event "
"tree not read" << RESTendl;
"tree not read"
<< RESTendl;
RESTError
<< "Please install corresponding libraries to provide root dictionaries for "
"class reading." << RESTendl;
"class reading."
<< RESTendl;
return;
}

Expand All @@ -621,7 +626,8 @@ void TRestRun::ReadInputFileTrees() {
string brname = (string)fInputEvent->ClassName() + "Branch";
if (fEventTree->GetBranch(brname.c_str()) == nullptr) {
RESTWarning << "REST WARNING (OpenInputFile) : No matched event branch "
"inside file : " << filename << RESTendl;
"inside file : "
<< filename << RESTendl;
RESTWarning << "Branch required: " << brname << RESTendl;
} else {
fEventTree->SetBranchAddress(brname.c_str(), &fInputEvent);
Expand Down Expand Up @@ -830,7 +836,8 @@ Int_t TRestRun::GetNextEvent(TRestEvent* targetEvent, TRestAnalysisTree* targetT
if (fEventTree->IsA() == TChain::Class()) {
Long64_t entry = fEventTree->LoadTree(fCurrentEvent);
fBytesRead += ((TBranch*)fEventTree->GetTree()->GetListOfBranches()->UncheckedAt(
fEventBranchLoc))->GetEntry(entry);
fEventBranchLoc))
->GetEntry(entry);
} else {
fBytesRead +=
((TBranch*)fEventTree->GetListOfBranches()->UncheckedAt(fEventBranchLoc))
Expand Down Expand Up @@ -1256,7 +1263,8 @@ void TRestRun::SetInputEvent(TRestEvent* event) {
break;
} else if (i == branches->GetLast()) {
RESTWarning << "REST Warning : (TRestRun) cannot find corresponding "
"branch in event tree!" << RESTendl;
"branch in event tree!"
<< RESTendl;
RESTWarning << "Event Type : " << event->ClassName() << RESTendl;
RESTWarning << "Input event not set!" << RESTendl;
}
Expand Down Expand Up @@ -1304,7 +1312,8 @@ void TRestRun::ImportMetadata(const TString& File, const TString& name, const TS
// TODO give error in case we try to obtain a class that is not TRestMetadata
if (type == "" && name == "") {
RESTError << "(ImportMetadata) : metadata type and name is not "
"specified!" << RESTendl;
"specified!"
<< RESTendl;
return;
}

Expand Down Expand Up @@ -1571,7 +1580,8 @@ TRestMetadata* TRestRun::GetMetadataClass(const TString& type, TFile* file) {
return metadata;
} else {
RESTWarning << "TRestRun::GetMetadataClass() : The object to import is "
"not inherited from TRestMetadata" << RESTendl;
"not inherited from TRestMetadata"
<< RESTendl;
}
}
}
Expand Down Expand Up @@ -1601,7 +1611,8 @@ TRestMetadata* TRestRun::GetMetadata(const TString& name, TFile* file) {
return metadata;
} else {
RESTWarning << "TRestRun::GetMetadata() : The object to import is not "
"inherited from TRestMetadata" << RESTendl;
"inherited from TRestMetadata"
<< RESTendl;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion source/framework/sensitivity/src/TRestComponentDataSet.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ std::vector<Int_t> TRestComponentDataSet::ExtractNodeStatistics() {
Bool_t TRestComponentDataSet::LoadDataSets() {
if (fDataSetFileNames.empty()) {
RESTWarning << "Dataset filename was not defined. You may still use "
"TRestComponentDataSet::LoadDataSet( filename );" << RESTendl;
"TRestComponentDataSet::LoadDataSet( filename );"
<< RESTendl;
fDataSetLoaded = false;
return fDataSetLoaded;
}
Expand Down

0 comments on commit aaf068f

Please sign in to comment.