CbmRoot
Loading...
Searching...
No Matches
CbmTrdHardwareSetupR.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pascal Raisig, Florian Uhlig [committer] */
4
5/*
6 * -----
7 * Purpose: This class contains the hardware mapping for asics at a given beamtime and provides the functionalities to
8 * write them into the CbmTrdParAsic containers for the corresponding geometry
9 * -----
10 */
11
12#ifndef CBMTRDHARDWARESETUPR_H
13#define CBMTRDHARDWARESETUPR_H
14
15#include "CbmTrdParSetAsic.h"
16
17#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
18#include <RtypesCore.h> // for Int_t
19#include <TNamed.h> // for TNamed
20#include <TString.h> // for TString
21
22#include <cstdint> // for size_t
23#include <map> // for map
24#include <vector> // for vector
25
39
40
41class CbmTrdHardwareSetupR : public TNamed {
42public:
43 CbmTrdHardwareSetupR(/* args */);
47
48 size_t GetComponentId(Int_t asicAddress,
50 hwSetup);
51 size_t GetComponentId(
52 Int_t
53 asicAddress);
54 std::map<Int_t, size_t> GetComponentIdMap() { return fComponentIdMap; }
55
56 void SetParameterFile(TString fileName) { fParameterFileName = fileName; }
57 void SetComponentIdMap(std::map<Int_t, size_t> compMap) { fComponentIdMap = compMap; }
58
65 std::map<size_t, Int_t> CreateHwToSwAsicAddressTranslatorMap(bool isLoadedParameters);
66
73 std::map<size_t, Int_t> CreateHwToSwAsicAddressTranslatorMap(CbmTrdParSetAsic* moduleparsets);
74
81 std::map<Int_t, std::vector<Int_t>> CreateAsicChannelMap(bool isLoadedParameters);
82
89 std::map<Int_t, std::vector<Int_t>> CreateAsicChannelMap(CbmTrdParSetAsic* parset);
90
92 void SelectComponentIdMap(TString geoTag);
94
95private:
96 /* data */
97 std::map<Int_t, size_t>
99
101
102 ClassDef(CbmTrdHardwareSetupR, 1) // Definition of actual hardware setup
103};
104
105#endif
ECbmTrdHardwareSetupVersion
int Int_t
CbmTrdHardwareSetupR operator=(const CbmTrdHardwareSetupR &)
std::map< Int_t, size_t > GetComponentIdMap()
void SetParameterFile(TString fileName)
std::map< size_t, Int_t > CreateHwToSwAsicAddressTranslatorMap(bool isLoadedParameters)
Create a hardware to software asic addreess translator map, with hidden parameter loading.
std::map< Int_t, size_t > fComponentIdMap
Container for the translation betweem software asicAddress and hardware asicAddress....
void SelectComponentIdMap(ECbmTrdHardwareSetupVersion hwSetup)
TString fParameterFileName
Name of the parameter file correlated to the hardware setup.
CbmTrdHardwareSetupR(const CbmTrdHardwareSetupR &)
std::map< Int_t, std::vector< Int_t > > CreateAsicChannelMap(bool isLoadedParameters)
Create a Asic Channel Map, with hidden parameter loading.
size_t GetComponentId(Int_t asicAddress, ECbmTrdHardwareSetupVersion hwSetup)
Retrieve componentId of the asic add the passed address for the passed hwSetup.
void SetComponentIdMap(std::map< Int_t, size_t > compMap)
Describe TRD module ASIC settings (electronic gain, delays, etc)