Project
Loading...
Searching...
No Matches
TOFFEElightConfig.cxx
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
13
14using namespace o2::tof;
15
16const TOFFEEchannelConfig* TOFFEElightConfig::getChannelConfig(int icrate, int itrm, int ichain, int itdc, int ichtdc) const
17{
18
19 // return the channel config for the given crate, trm, chain, tdc, tdcchannel
20
21 return icrate >= Geo::kNCrate ? nullptr : itrm >= Geo::kNTRM - 2 ? nullptr
22 : ichain >= Geo::kNChain ? nullptr
23 : itdc >= Geo::kNTdc ? nullptr
24 : ichtdc >= Geo::kNCh ? nullptr
25 : &mChannelConfig[icrate][itrm][ichain][itdc][ichtdc]; // the TRM index goes from 0 to 9, but in O2 kNTRM = 12, because it corresponds to the VME slots which span in [3, 12]
26}
@ kNTRM
Definition Geo.h:92
@ kNCrate
Definition Geo.h:95
@ kNTdc
Definition Geo.h:93
@ kNChain
Definition Geo.h:94
const TOFFEEchannelConfig * getChannelConfig(int icrate, int itrm, int ichain, int itdc, int ich) const
TOFFEEchannelConfig mChannelConfig[Geo::kNCrate][Geo::kNTRM - 2][Geo::kNChain][Geo::kNTdc][Geo::kNCh]