Project
Loading...
Searching...
No Matches
DPLAlpideParam.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 ALICEO2_ITSMFTDPLBASEPARAM_H_
13#define ALICEO2_ITSMFTDPLBASEPARAM_H_
14
19#include <string_view>
20
21namespace o2
22{
23namespace itsmft
24{
25constexpr float DEFStrobeDelay = o2::constants::lhc::LHCBunchSpacingNS * 4; // ~100 ns delay
26
27template <int N>
28struct DPLAlpideParam : public o2::conf::ConfigurableParamHelper<DPLAlpideParam<N>> {
29
30 static constexpr std::string_view getParamName()
31 {
32 return N == o2::detectors::DetID::ITS ? ParamName[0] : ParamName[1];
33 }
34 int roFrameLengthInBC = DEFROFLengthBC();
35 float roFrameLengthTrig = DEFROFLengthTrig();
37 float strobeLengthCont = -1.;
38 float strobeLengthTrig = 100.;
39 int roFrameBiasInBC = DEFROFBiasInBC();
40
41 // boilerplate stuff + make principal key
43
44 private:
45 static constexpr std::string_view ParamName[2] = {"ITSAlpideParam", "MFTAlpideParam"};
46
47 static constexpr int DEFROFLengthBC()
48 {
49 // default ROF length in BC for continuos mode
50 // allowed values: 1,2,3,4,6,9,11,12,18,22,27,33,36
52 }
53 static constexpr float DEFROFLengthTrig()
54 {
55 // length of RO frame in ns for triggered mode
56 return N == o2::detectors::DetID::ITS ? 6000. : 6000.;
57 }
58
59 static constexpr int DEFROFBiasInBC()
60 {
61 // default ROF length bias in MC, see https://github.com/AliceO2Group/AliceO2/pull/11108 for ITS
62 return N == o2::detectors::DetID::ITS ? 64 : 60;
63 }
64
65 static_assert(N == o2::detectors::DetID::ITS || N == o2::detectors::DetID::MFT, "only DetID::ITS orDetID:: MFT are allowed");
66 static_assert(o2::constants::lhc::LHCMaxBunches % DEFROFLengthBC() == 0); // make sure ROF length is divisor of the orbit
67};
68
69template <int N>
70DPLAlpideParam<N> DPLAlpideParam<N>::sInstance;
71
72} // namespace itsmft
73
74namespace framework
75{
76template <typename T>
77struct is_messageable;
78template <>
79struct is_messageable<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::ITS>> : std::true_type {
80};
81template <typename T>
82struct is_messageable;
83template <>
84struct is_messageable<o2::itsmft::DPLAlpideParam<o2::detectors::DetID::MFT>> : std::true_type {
85};
86
87} // namespace framework
88
89} // namespace o2
90
91#endif
Header to collect LHC related constants.
static constexpr ID ITS
Definition DetID.h:63
static constexpr ID MFT
Definition DetID.h:71
GLboolean * data
Definition glcorearb.h:298
constexpr int LHCMaxBunches
constexpr double LHCBunchSpacingNS
constexpr float DEFStrobeDelay
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
int roFrameBiasInBC
bias of the start of ROF wrt orbit start: t_irof = (irof*roFrameLengthInBC + roFrameBiasInBC)*BClengt...
float strobeDelay
strobe start (in ns) wrt ROF start
static constexpr std::string_view getParamName()
int roFrameLengthInBC
ROF length in BC for continuos mode.
float strobeLengthCont
if < 0, full ROF length - delay
O2ParamDef(DPLAlpideParam, getParamName().data())
float strobeLengthTrig
length of the strobe in ns (sig. over threshold checked in this window only)
float roFrameLengthTrig
length of RO frame in ns for triggered mode