Project
Loading...
Searching...
No Matches
ChannelData.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
15
16#ifndef _FT0_CHANNELDATA_H_
17#define _FT0_CHANNELDATA_H_
18
19#include <Rtypes.h>
20#include <map>
21#include <string>
23
24namespace o2
25{
26namespace fit
27{
28
29template <o2::detectors::DetID::ID DetID>
32 static constexpr uint8_t sDUMMY_CHANNEL_ID = 0xff;
33 static constexpr uint8_t sDUMMY_PM_WORD = 0xff;
34 static constexpr int16_t sDUMMY_TIME = -5000;
35 static constexpr int16_t sDUMMY_AMP = -5000;
36 uint8_t mChannelID = sDUMMY_CHANNEL_ID; // channel id
37 uint8_t mWordPM = sDUMMY_PM_WORD; // PM word, based on EBitsPM
38 int16_t mTime = sDUMMY_TIME; // time in TDC units
39 int16_t mAmp = sDUMMY_AMP; // amplitude in ADC units
50 static const inline std::map<unsigned int, std::string> sMapBitsPM = {
51 {EBitsPM::kNumberADC, "NumberADC"},
52 {EBitsPM::kIsDoubleEvent, "IsDoubleEvent"},
53 {EBitsPM::kIsTimeInfoNotValid, "IsTimeInfoNotValid"},
54 {EBitsPM::kIsCFDinADCgate, "IsCFDinADCgate"},
55 {EBitsPM::kIsTimeInfoLate, "IsTimeInfoLate"},
56 {EBitsPM::kIsAmpNotValid, "IsAmpNotValid"},
57 {EBitsPM::kIsVertexEvent, "IsVertexEvent"},
58 {EBitsPM::kIsTimeInfoLost, "IsTimeInfoLost"}};
59 ChannelData() = default;
60 ChannelData(uint8_t channelID, uint8_t wordPM, int16_t time, int16_t amp) : mChannelID(channelID), mWordPM(wordPM), mTime(time), mAmp(amp)
61 {
62 }
63 // void print() const;
64 bool operator<=>(ChannelData const& other) const = default;
65 bool operator==(ChannelData const& other) const = default;
67};
68} // namespace fit
69} // namespace o2
70#endif
uint8_t channelID
Definition RawEventData.h:8
int16_t time
Definition RawEventData.h:4
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static const std::map< unsigned int, std::string > sMapBitsPM
Definition ChannelData.h:50
static constexpr int16_t sDUMMY_TIME
Definition ChannelData.h:34
ClassDefNV(ChannelData, 1)
bool operator<=>(ChannelData const &other) const =default
static constexpr uint8_t sDUMMY_PM_WORD
Definition ChannelData.h:33
bool operator==(ChannelData const &other) const =default
static constexpr o2::detectors::DetID sDetID
Definition ChannelData.h:31
static constexpr uint8_t sDUMMY_CHANNEL_ID
Definition ChannelData.h:32
static constexpr int16_t sDUMMY_AMP
Definition ChannelData.h:35
ChannelData(uint8_t channelID, uint8_t wordPM, int16_t time, int16_t amp)
Definition ChannelData.h:60
VectorOfTObjectPtrs other