18#include <TGeoManager.h>
21#include "MFTBase/GeometryTGeo.h"
57 if (hbfu.startTime != 0) {
60 tinfo.creation = std::chrono::time_point_cast<std::chrono::milliseconds>(std::chrono::system_clock::now()).time_since_epoch().count();
62 if (hbfu.orbitFirstSampled != 0) {
63 tinfo.firstTForbit = hbfu.orbitFirstSampled;
65 tinfo.firstTForbit = 0;
91 LOGP(info,
"Applying alignment for detector {}",
DetID::getName(
id));
94 LOGP(info,
"Alignment for detector {} is empty",
DetID::getName(
id));
100 gGeoManager->Export(fnm.c_str());
101 LOGP(info,
"Stored aligned geometry to local file {}", fnm);
105#ifdef ENABLE_UPGRADES
106 || mDetsMask[DetID::IT3]
111 TFile outF(
"its_GeometryTGeo.root",
"recreate");
112 outF.WriteObjectAny(itsTGeo,
"o2::its::GeometryTGeo",
"ccdb_object");
113 LOGP(info,
"Stored ITS geometry to {}", outF.GetName());
120 TFile outF(
"mft_GeometryTGeo.root",
"recreate");
121 outF.WriteObjectAny(mftTGeo,
"o2::mft::GeometryTGeo",
"ccdb_object");
122 LOGP(info,
"Stored MFT geometry to {}", outF.GetName());
139 std::shared_ptr<o2::base::GRPGeomRequest> mGGCCDBRequest;
146 std::vector<InputSpec> inputs{{
"STFDist",
"FLP",
"DISTSUBTIMEFRAME", 0}};
147 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(
false,
159 "geometry-aligned-producer",
162 AlgorithmSpec{adaptFromTask<o2::base::AlignerTask>(dets, ggRequest)},
171 Outputs{{
"FLP",
"DISTSUBTIMEFRAME", 0}},
178void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
181 std::vector<o2::framework::ConfigParamSpec> options{
182 {
"onlyDet", VariantType::String, std::string{
DetID::ALL}, {
"comma-separated list of detectors to account"}},
183 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings ..."}}};
184 std::swap(workflowOptions, options);
196 return std::move(specs);
Definition of the GeometryManager class.
Helper for geometry and GRP related CCDB requests.
Definition of the GeometryTGeo class.
Definition of the Names Generator class.
~AlignerTask() override=default
void run(ProcessingContext &pc) final
AlignerTask(DetID::mask_t dets, std::shared_ptr< o2::base::GRPGeomRequest > gr)
void init(InitContext &ic) final
void finaliseCCDB(ConcreteDataMatcher &matcher, void *obj) final
void checkUpdates(o2::framework::ProcessingContext &pc)
auto getAlignment(o2::detectors::DetID det) const
bool finaliseCCDB(o2::framework::ConcreteDataMatcher &matcher, void *obj)
static GRPGeomHelper & instance()
void setRequest(std::shared_ptr< GRPGeomRequest > req)
static bool applyAlignment(const std::vector< o2::detectors::AlignParam > &algPars)
misalign geometry with alignment objects from the array, optionaly check overlaps
static std::string getAlignedGeomFileName(const std::string_view prefix="")
static constexpr std::string_view CCDBOBJECT
void run(ProcessingContext &pc) final
static const HBFUtils & Instance()
static void updateFromString(std::string const &)
Static class with identifiers, bitmasks and names for ALICE detectors.
static constexpr const char * getName(ID id)
names of defined detectors
static constexpr std::string_view ALL
keywork for all detectors
static std::string getNames(mask_t mask, char delimiter=',')
static constexpr ID First
static constexpr mask_t FullMask
static constexpr ID Last
if extra detectors added, update this !!!
static mask_t getMask(const std::string_view detList)
detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
ConfigParamRegistry & options() const
T get(const char *key) const
virtual void endOfStream(EndOfStreamContext &context)
This is invoked whenever we have an EndOfStream event.
static GeometryTGeo * Instance()
static GeometryTGeo * Instance()
void customize(std::vector< o2::framework::ConfigParamSpec > &workflowOptions)
WorkflowSpec defineDataProcessing(o2::framework::ConfigContext const &configcontext)
DataProcessorSpec getSeederSpec()
DataProcessorSpec getAlignerSpec(DetID::mask_t dets)
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< InputSpec > Inputs
std::vector< OutputSpec > Outputs