Project
Loading...
Searching...
No Matches
Definitions.h
Go to the documentation of this file.
1
// Copyright 2019-2026 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.
14
15
#ifndef TRACKINGITS_DEFINITIONS_H_
16
#define TRACKINGITS_DEFINITIONS_H_
17
18
#include <type_traits>
19
#include <cstdint>
20
21
namespace
o2::its
22
{
23
24
enum class
TrackletMode
{
25
Layer0Layer1
= 0,
26
Layer1Layer2
= 2
27
};
28
29
template
<
bool
IsConst,
typename
T>
30
using
maybe_const
=
typename
std::conditional<IsConst, const T, T>::type;
31
32
// simple implemnetion of logging with exp. backoff
33
struct
LogLogThrottler
{
34
uint64_t
evCount
{0};
35
uint64_t
nextLog
{1};
36
int32_t
iteration
{-1};
37
int32_t
layer
{-1};
38
bool
needToLog
(int32_t iter, int32_t lay)
39
{
40
if
(
iteration
!= iter ||
layer
!= lay) {
41
iteration
= iter;
42
layer
= lay;
43
evCount
= 0;
44
nextLog
= 1;
45
}
46
if
(++
evCount
>
nextLog
) {
47
nextLog
*= 2;
48
return
true
;
49
}
50
return
false
;
51
}
52
};
53
}
// namespace o2::its
54
55
#endif
layer
GLenum GLuint GLint GLint layer
Definition
glcorearb.h:1310
o2::its
Definition
RecoContainer.h:64
o2::its::TrackletMode
TrackletMode
Definition
Definitions.h:24
o2::its::TrackletMode::Layer1Layer2
@ Layer1Layer2
o2::its::TrackletMode::Layer0Layer1
@ Layer0Layer1
o2::its::maybe_const
typename std::conditional< IsConst, const T, T >::type maybe_const
Definition
Definitions.h:30
o2::its::LogLogThrottler
Definition
Definitions.h:33
o2::its::LogLogThrottler::nextLog
uint64_t nextLog
Definition
Definitions.h:35
o2::its::LogLogThrottler::evCount
uint64_t evCount
Definition
Definitions.h:34
o2::its::LogLogThrottler::iteration
int32_t iteration
Definition
Definitions.h:36
o2::its::LogLogThrottler::needToLog
bool needToLog(int32_t iter, int32_t lay)
Definition
Definitions.h:38
Detectors
ITSMFT
ITS
tracking
include
ITStracking
Definitions.h
Generated on Fri Apr 24 2026 13:58:49 for Project by
1.9.8