Project
Loading...
Searching...
No Matches
TOFFEElightInfo.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 DETECTOR_TOFFEELIGHTINFO_H_
13#define DETECTOR_TOFFEELIGHTINFO_H_
14
15#include "Rtypes.h"
16#include <array>
17
19
20namespace o2
21{
22namespace tof
23{
24
26 static constexpr int NTRIGGERMAPS = 72;
27 static constexpr int NCHANNELS = 157248;
28
29 int mVersion = -1; // version
30 int mRunNumber = -1; // run number
31 int mRunType = -1; // run type
32 std::array<bool, NCHANNELS> mChannelEnabled{false};
33 std::array<int, NCHANNELS> mMatchingWindow{0}; // can it be int32_t?
34 std::array<int, NCHANNELS> mLatencyWindow{0}; // can it be int32_t?
35 std::array<uint64_t, NTRIGGERMAPS> mTriggerMask{0}; // trigger mask, can it be uint32_t?
36 TOFFEElightInfo() = default;
37
38 void resetAll()
39 {
40 mVersion = -1;
41 mRunNumber = -1;
42 mRunType = -1;
43 mChannelEnabled.fill(false);
44 mMatchingWindow.fill(0);
45 mLatencyWindow.fill(0);
46 mTriggerMask.fill(0);
47 }
48
49 int getVersion() const { return mVersion; }
50 int getRunNumber() const { return mRunNumber; }
51 int getRunType() const { return mRunType; }
52 bool getChannelEnabled(int idx) const { return idx < NCHANNELS ? mChannelEnabled[idx] : false; }
53 int getMatchingWindow(int idx) const { return idx < NCHANNELS ? mMatchingWindow[idx] : 0; }
54 int getLatencyWindow(int idx) const { return idx < NCHANNELS ? mLatencyWindow[idx] : 0; }
55 uint64_t getTriggerMask(int ddl) const { return ddl < NTRIGGERMAPS ? mTriggerMask[ddl] : 0; }
56
58};
59
60} // namespace tof
61} // namespace o2
62
63#endif
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
int getLatencyWindow(int idx) const
std::array< bool, NCHANNELS > mChannelEnabled
ClassDefNV(TOFFEElightInfo, 1)
bool getChannelEnabled(int idx) const
int getMatchingWindow(int idx) const
static constexpr int NTRIGGERMAPS
std::array< int, NCHANNELS > mMatchingWindow
std::array< uint64_t, NTRIGGERMAPS > mTriggerMask
static constexpr int NCHANNELS
std::array< int, NCHANNELS > mLatencyWindow
uint64_t getTriggerMask(int ddl) const