Skip to content

Commit 39c78aa

Browse files
committed
Remove unused FairRunOnline::InitContainers() function
The function is not being invoked, and was not used. Tested with R3BRoot. Adjusted the LOG() messages. Added corresponding CHANGELOG notice. Addresses issue #1346.
1 parent 76fc0d6 commit 39c78aa

3 files changed

Lines changed: 5 additions & 43 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ file an issue, so that we can see how to handle this.
8989
9090
### Breaking Changes
9191
* The output folder name changed from 'folderName_0' to 'folderName'.
92-
In the MT mode of Geant4 the folder names changed from 'folderName_1' and 'folderName_2' to 'folderName'.
92+
In the MT mode of Geant4 the folder names changed from 'folderName_1' and 'folderName_2' to 'folderName'.
93+
* Removed the FairRunOnline::InitContainers() function.
94+
It has not been used in FairRoot. Tested with R3BRoot.
9395
9496
### Bug fixes
9597
* Check the return value of `source->InitUnpackers()`/`source->ReinitUnpackers()`

fairroot/online/steer/FairRunOnline.cxx

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,12 @@ void FairRunOnline::Init()
185185
fTask->SetParTask();
186186
fRtdb->initContainers(fRunId);
187187

188-
// InitContainers();
189188
// --- Get event header from Run
190189
if (!fEvtHeader) {
191-
LOG(fatal) << "FairRunOnline::InitContainers:No event header in run!";
190+
LOG(fatal) << "FairRunOnline::Init() No event header in run!";
192191
return;
193192
}
194-
LOG(info) << "FairRunOnline::InitContainers: event header at " << fEvtHeader;
193+
LOG(info) << "FairRunOnline::Init() Event header at " << fEvtHeader;
195194
fRootManager->Register("EventHeader.", "Event", fEvtHeader, (nullptr != GetSink()));
196195
fEvtHeader->SetRunId(fRunId);
197196

@@ -209,43 +208,6 @@ void FairRunOnline::Init()
209208
fRootManager->WriteFileHeader(fFileHeader);
210209
}
211210

212-
void FairRunOnline::InitContainers()
213-
{
214-
fRtdb = GetRuntimeDb();
215-
FairBaseParSet* par = static_cast<FairBaseParSet*>(fRtdb->getContainer("FairBaseParSet"));
216-
LOG(info) << "FairRunOnline::InitContainers: par = " << par;
217-
if (nullptr == par)
218-
LOG(warn) << "FairRunOnline::InitContainers: no 'FairBaseParSet' container !";
219-
220-
if (par) {
221-
fEvtHeader = static_cast<FairEventHeader*>(fRootManager->GetObject("EventHeader."));
222-
223-
fRunId = GetEvtHeaderRunId();
224-
225-
// Copy the Event Header Info to Output
226-
fEvtHeader->Register();
227-
228-
// Init the containers in Tasks
229-
fRtdb->initContainers(fRunId);
230-
fTask->ReInitTask();
231-
// fTask->SetParTask();
232-
fRtdb->initContainers(fRunId);
233-
// if (gGeoManager==0) {
234-
// par->GetGeometry();
235-
// }
236-
} else {
237-
// --- Get event header from Run
238-
// fEvtHeader = dynamic_cast<FairEventHeader*> (FairRunOnline::Instance()->GetEventHeade
239-
GetEventHeader();
240-
if (!fEvtHeader) {
241-
LOG(fatal) << "FairRunOnline::InitContainers:No event header in run!";
242-
return;
243-
}
244-
LOG(info) << "FairRunOnline::InitContainers: event header at " << fEvtHeader;
245-
fRootManager->Register("EventHeader.", "Event", fEvtHeader, kTRUE);
246-
}
247-
}
248-
249211
Int_t FairRunOnline::EventLoop()
250212
{
251213
gSystem->IgnoreInterrupt();

fairroot/online/steer/FairRunOnline.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ class FairRunOnline : public FairRun
5555
* is not checked anymore after initialization
5656
*/
5757

58-
/** Init containers executed on PROOF, which is part of Init when running locally*/
59-
void InitContainers();
6058
void SetContainerStatic(Bool_t tempBool = kTRUE);
6159
Bool_t GetContainerStatic() { return fStatic; };
6260

0 commit comments

Comments
 (0)