Project
Loading...
Searching...
No Matches
Aligner.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_ALIGNER_H_
13#define O2_ALIGNER_H_
14
15// Helper class to pass and deploy geometry (mis)alignment
16
20#include <string>
21
22namespace o2
23{
24namespace base
25{
26
27// Global parameters for digitization
29{
30 public:
31 const std::string& getDetectors() const { return mDetectors; }
32 long getTimeStamp() const;
34
35 bool isAlignmentRequested() const { return getDetectorsMask().any(); }
36 void applyAlignment(long timestamp = 0, o2::detectors::DetID::mask_t addMask = o2::detectors::DetID::FullMask) const;
37
38 private:
39 std::string mDetectors = "all"; // comma-separated list of modules to align, "all" or "none"
40 long mTimeStamp = 0; // assigned TimeStamp or now() if 0
41
42 O2ParamDef(Aligner, "align-geom");
43};
44
45} // namespace base
46} // namespace o2
47
48#endif
#define O2ParamDef(classname, key)
const std::string & getDetectors() const
Definition Aligner.h:31
long getTimeStamp() const
Definition Aligner.cxx:78
o2::detectors::DetID::mask_t getDetectorsMask() const
Definition Aligner.cxx:25
bool isAlignmentRequested() const
Definition Aligner.h:35
void applyAlignment(long timestamp=0, o2::detectors::DetID::mask_t addMask=o2::detectors::DetID::FullMask) const
Definition Aligner.cxx:30
static constexpr mask_t FullMask
Definition DetID.h:100
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...