diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cb397e02c..2d205bdae3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to FairRoot will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## 18.8.1 (UNRELEASED) - 2023-01-XX + +### Breaking Changes +* The output folder name changed from 'folderName_0' to 'folderName'. +In the MT mode of Geant4 the folder names changed from 'folderName_1' and 'folderName_2' to 'folderName'. + +### Bug fixes +* Check the return value of `source->InitUnpackers()`/`source->ReinitUnpackers()` + in `FairRunOnline`. Stop run if `false` returned. + +### Other Notable Changes +* Allow running without output sink. In this case even persistent branches would not be stored anywhere. + ## 18.8.0 - 2022-12-16 ### Breaking Changes diff --git a/base/steer/FairRootManager.cxx b/base/steer/FairRootManager.cxx index b0671efa81..57c8433755 100644 --- a/base/steer/FairRootManager.cxx +++ b/base/steer/FairRootManager.cxx @@ -179,8 +179,10 @@ Bool_t FairRootManager::InitSink() { if (fSink) { fSink->InitSink(); + return true; } - return kTRUE; + LOG(info) << "The output sink is not set. No branches will be stored."; + return false; } template @@ -204,7 +206,7 @@ void FairRootManager::RegisterImpl(const char* name, const char* folderName, T* if (fSink) { fSink->RegisterImpl(name, folderName, obj); } else { - LOG(fatal) << "The sink does not exist to store persistent branches."; + LOG(warning) << "The sink does not exist to store persistent branches (" << name << ")."; } } AddMemoryBranch(name, obj); diff --git a/base/steer/FairRunAna.cxx b/base/steer/FairRunAna.cxx index ce4b8edf93..8ec07b14b8 100644 --- a/base/steer/FairRunAna.cxx +++ b/base/steer/FairRunAna.cxx @@ -213,7 +213,7 @@ void FairRunAna::Init() fRunId = GetEvtHeaderRunId(); // Copy the Event Header Info to Output - fEvtHeader->Register(fStoreEventHeader); + fEvtHeader->Register(GetSink() ? fStoreEventHeader : false); // Init the containers in Tasks LOG(info) << "--- Initialize with RunId --- " << fRunId; @@ -225,7 +225,7 @@ void FairRunAna::Init() } else { // end----- if(fMixedInput) LOG(info) << "Initializing without input file or Mixed input"; FairEventHeader* evt = GetEventHeader(); - evt->Register(fStoreEventHeader); + evt->Register(GetSink() ? fStoreEventHeader : false); FairRunIdGenerator genid; fRunId = genid.generateId(); fRtdb->addRun(fRunId); @@ -269,7 +269,6 @@ void FairRunAna::Init() // create the output tree after tasks initialisation fRootManager->WriteFolder(); fRootManager->WriteFileHeader(fFileHeader); - } //_____________________________________________________________________________ diff --git a/base/steer/FairRunAnaProof.cxx b/base/steer/FairRunAnaProof.cxx index e19cbcc129..7d56fcab7e 100644 --- a/base/steer/FairRunAnaProof.cxx +++ b/base/steer/FairRunAnaProof.cxx @@ -179,10 +179,7 @@ void FairRunAnaProof::Init() fRunId = GetEvtHeaderRunId(); // Copy the Event Header Info to Output - fEvtHeader->Register(kTRUE); - - // Copy the Event Header Info to Output - fEvtHeader->Register(); + fEvtHeader->Register(GetSink() ? fStoreEventHeader : false); // Init the containers in Tasks @@ -196,7 +193,7 @@ void FairRunAnaProof::Init() } else { LOG(info) << "Initializing without input file or Mixed input"; FairEventHeader* evt = GetEventHeader(); - evt->Register(); + evt->Register(GetSink() ? fStoreEventHeader : false); FairRunIdGenerator genid; fRunId = genid.generateId(); fRtdb->addRun(fRunId);