Project
Loading...
Searching...
No Matches
TPCZSLinkMapping.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
14
15#include "TPCZSLinkMapping.h"
16#ifndef GPUCA_STANDALONE
17#include "TPCBase/Mapper.h"
18#endif
19
20#include <algorithm>
21#include <cassert>
22
23using namespace o2::gpu;
24
26{
27#ifndef GPUCA_STANDALONE
28 const auto& fecToGlobalPad = mapper.getMapFECIDGlobalPad(); // TODO: Can we get this from TPUTPCGeometry?
29 assert(fecToGlobalPad.size() == TPC_FEC_IDS_IN_SECTOR);
30
31 const auto& globalPadToPadPos = mapper.getMapGlobalPadToPadPos();
32 assert(globalPadToPadPos.size() == TPC_REAL_PADS_IN_SECTOR);
33
34 for (size_t i = 0; i < TPC_FEC_IDS_IN_SECTOR; i++) {
35 FECIDToPadPos[i] = globalPadToPadPos[fecToGlobalPad[i]];
36 }
37#endif
38}
int32_t i
const std::vector< PadPos > & getMapGlobalPadToPadPos() const
Definition Mapper.h:447
const std::vector< int > & getMapFECIDGlobalPad() const
Definition Mapper.h:448
#define TPC_REAL_PADS_IN_SECTOR
#define TPC_FEC_IDS_IN_SECTOR
o2::tpc::PadPos FECIDToPadPos[TPC_FEC_IDS_IN_SECTOR]