|
32 | 32 | #include <Framework/EndOfStreamContext.h> |
33 | 33 | #include <Framework/TimingInfo.h> |
34 | 34 | #include <Framework/DataTakingContext.h> |
| 35 | +#include <Framework/DefaultsHelpers.h> |
35 | 36 | #include <CommonUtils/ConfigurableParam.h> |
36 | 37 | #include <DetectorsBase/GRPGeomHelper.h> |
37 | 38 |
|
@@ -164,12 +165,21 @@ void TaskRunner::init(InitContext& iCtx) |
164 | 165 | mObjectsManager = std::make_shared<ObjectsManager>(mTaskConfig.taskName, mTaskConfig.className, mTaskConfig.detectorName, mTaskConfig.consulUrl, mTaskConfig.parallelTaskID); |
165 | 166 |
|
166 | 167 | // setup timekeeping |
167 | | - // fixme: use DataTakingContext.deployment once we can get it during initialization |
168 | | - // fixme: use DataTakingContext.nOrbitsPerTF once we can get it during initialization |
169 | | - if (mTaskConfig.fallbackActivity.mProvenance == "qc") { |
170 | | - mTimekeeper = std::make_shared<TimekeeperSynchronous>(); |
171 | | - } else { |
172 | | - mTimekeeper = std::make_shared<TimekeeperAsynchronous>(); |
| 168 | + switch (DefaultsHelpers::deploymentMode()) { |
| 169 | + case DeploymentMode::Grid: { |
| 170 | + ILOG(Info, Devel) << "Detected async deployment, object validity will be based on incoming data and available SOR/EOR times" << ENDM; |
| 171 | + mTimekeeper = std::make_shared<TimekeeperAsynchronous>(); |
| 172 | + break; |
| 173 | + } |
| 174 | + case DeploymentMode::Local: |
| 175 | + case DeploymentMode::OnlineECS: |
| 176 | + case DeploymentMode::OnlineDDS: |
| 177 | + case DeploymentMode::OnlineAUX: |
| 178 | + case DeploymentMode::FST: |
| 179 | + default: { |
| 180 | + ILOG(Info, Devel) << "Detected sync deployment, object validity will be based primarily on current time" << ENDM; |
| 181 | + mTimekeeper = std::make_shared<TimekeeperSynchronous>(); |
| 182 | + } |
173 | 183 | } |
174 | 184 |
|
175 | 185 | // setup user's task |
|
0 commit comments