|
25 | 25 | #include <unordered_map> |
26 | 26 |
|
27 | 27 | #include <gsl/span> |
| 28 | +#include <TMap.h> |
| 29 | +#include <TObjString.h> |
28 | 30 |
|
29 | 31 | #include "Framework/CallbackService.h" |
30 | 32 | #include "Framework/ConcreteDataMatcher.h" |
31 | 33 | #include "Framework/ConfigParamRegistry.h" |
32 | 34 | #include "Framework/ControlService.h" |
33 | 35 | #include "Framework/DataProcessorSpec.h" |
| 36 | +#include "Framework/DeviceSpec.h" |
34 | 37 | #include "Framework/Lifetime.h" |
35 | 38 | #include "Framework/Output.h" |
36 | 39 | #include "Framework/Task.h" |
|
47 | 50 | #include "DetectorsBase/Propagator.h" |
48 | 51 | #include "MCHBase/Error.h" |
49 | 52 | #include "MCHBase/ErrorMap.h" |
| 53 | +#include "MCHBase/TrackerParam.h" |
50 | 54 | #include "MCHTracking/TrackParam.h" |
51 | 55 | #include "MCHTracking/Track.h" |
52 | 56 | #include "MCHTracking/TrackFinder.h" |
@@ -130,6 +134,7 @@ class TrackFinderTask |
130 | 134 | if (mCCDBRequest) { |
131 | 135 | base::GRPGeomHelper::instance().checkUpdates(pc); |
132 | 136 | } |
| 137 | + storeConfigs(pc); |
133 | 138 |
|
134 | 139 | uint32_t firstTForbit = pc.services().get<o2::framework::TimingInfo>().firstTForbit; |
135 | 140 |
|
@@ -268,6 +273,23 @@ class TrackFinderTask |
268 | 273 | } |
269 | 274 | } |
270 | 275 |
|
| 276 | + //_________________________________________________________________________________________________ |
| 277 | + void storeConfigs(ProcessingContext& pc) |
| 278 | + { |
| 279 | + static bool first = true; |
| 280 | + if (first) { |
| 281 | + first = false; |
| 282 | + if (pc.services().get<const o2::framework::DeviceSpec>().inputTimesliceId == 0) { |
| 283 | + const auto& conf = TrackerParam::Instance(); |
| 284 | + o2::conf::ConfigurableParam::write(o2::base::NameConf::getConfigOutputFileName(pc.services().get<const o2::framework::DeviceSpec>().name, conf.getName()), conf.getName()); |
| 285 | + TMap md; |
| 286 | + md.SetOwnerKeyValue(); |
| 287 | + md.Add(new TObjString(conf.getName().c_str()), new TObjString(o2::conf::ConfigurableParam::asJSON(conf.getName()).c_str())); |
| 288 | + pc.outputs().snapshot(Output{"META", "MCHTRACKER", 0}, md); |
| 289 | + } |
| 290 | + } |
| 291 | + } |
| 292 | + |
271 | 293 | bool mComputeTime = false; ///< compute the track time from the associated digits |
272 | 294 | bool mDigits = false; ///< send to associated digits |
273 | 295 | std::shared_ptr<base::GRPGeomRequest> mCCDBRequest{}; ///< pointer to the CCDB requests |
@@ -296,6 +318,7 @@ o2::framework::DataProcessorSpec getTrackFinderSpec(const char* specName, bool c |
296 | 318 | outputSpecs.emplace_back(OutputSpec{{"trackdigits"}, "MCH", "TRACKDIGITS", 0, Lifetime::Timeframe}); |
297 | 319 | } |
298 | 320 | outputSpecs.emplace_back(OutputSpec{{"trackerrors"}, "MCH", "TRACKERRORS", 0, Lifetime::Timeframe}); |
| 321 | + outputSpecs.emplace_back("META", "MCHTRACKER", 0, Lifetime::Sporadic); |
299 | 322 |
|
300 | 323 | auto ccdbRequest = disableCCDBMagField ? nullptr |
301 | 324 | : std::make_shared<base::GRPGeomRequest>(false, // orbitResetTime |
|
0 commit comments