Project
Loading...
Searching...
No Matches
GlobalMapper.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
16
17#ifndef O2_MID_GLOBALMAPPER_H
18#define O2_MID_GLOBALMAPPER_H
19
20#include <array>
21#include <map>
22#include <vector>
23#include "MIDBase/Mapping.h"
24#include "MIDRaw/CrateMapper.h"
26
27namespace o2
28{
29namespace mid
30{
33{
34 public:
37 std::vector<ExtendedMappingInfo> buildStripsInfo() const;
38
41 std::map<int, std::vector<std::pair<int, int>>> buildDEGeom() const;
42
45 const Mapping& getMapping() const { return mMapping; }
46
49 void setScaleFactor(int scaleFactor) { mScaleFactor = scaleFactor; }
50
51 private:
59 std::array<int, 4> getStripGeom(int deId, int columnId, int lineId, int stripId, int cathode) const;
60
69 ExtendedMappingInfo buildExtendedInfo(int deId, int columnId, int lineId, int stripId, int cathode) const;
70
71 Mapping mMapping;
72 CrateMapper mCrateMapper;
73 int mScaleFactor = 1;
74};
75
83int getStripId(int deId, int columnId, int lineId, int stripId, int cathode);
84
85} // namespace mid
86} // namespace o2
87#endif
Mapper to convert the RO Ids to a format suitable for O2.
Extended mapping info.
Mapping for MID.
Global mapper for MID.
void setScaleFactor(int scaleFactor)
Sets the scale factor for geometrical positions and sizes.
std::map< int, std::vector< std::pair< int, int > > > buildDEGeom() const
Build the geometry for the Detection elements.
const Mapping & getMapping() const
Returns the mapping.
std::vector< ExtendedMappingInfo > buildStripsInfo() const
Build the strips info.
int getStripId(int deId, int columnId, int lineId, int stripId, int cathode)
Gets the unique strip ID.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...