Skip to content

Commit

Permalink
Change the initilization order
Browse files Browse the repository at this point in the history
The geometry is now aligned before initialising the user tasks.
Before the geometry was aligned at the end of the initilization after the
usere tasks were initialized. Due to this sequence the aligned geometry was
not available in the Init()-function of the user tasks which was wrong.
  • Loading branch information
fuhlig1 authored and dennisklein committed Dec 17, 2021
1 parent a47ec60 commit 067e7d8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions base/steer/FairRunAna.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ void FairRunAna::Init()
fTask->SetParTask();
fRtdb->initContainers(fRunId);
}

FairFieldFactory* fieldfact = FairFieldFactory::Instance();
if (fieldfact) {
fieldfact->SetParm();
Expand All @@ -252,22 +253,28 @@ void FairRunAna::Init()
if (fieldfact && !fField) {
fField = fieldfact->createFairField();
}

// Align the geometry when it is avaialble in all cases
// (read from file, read from container) and before it could
// be used in the Init() function of a user task
AlignGeometry();

// Now call the User initialize for Tasks
fTask->InitTask();

// if the vis manager is available then initialize it!
FairTrajFilter* fTrajFilter = FairTrajFilter::Instance();
if (fTrajFilter) {
fTrajFilter->Init();
}
// Create a list of time based branches (if any).

// Create a list of time based branches (if any).
fRootManager->UpdateListOfTimebasedBranches();

// create the output tree after tasks initialisation
fRootManager->WriteFolder();
fRootManager->WriteFileHeader(fFileHeader);

AlignGeometry();
}
//_____________________________________________________________________________

Expand Down

0 comments on commit 067e7d8

Please sign in to comment.