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 <map> // for map
23#include <vector> // for vector
24
25#include <stdint.h> // for size_t
26
28{
29 kUndefined = 0,
30 kMcbm2020 = 1,
34 kMcbm2022WithoutHybrid, // for v22e setup
35 kMcbm2022Only1D, // for v22f setup
39};
40
41
42class CbmTrdHardwareSetupR : public TNamed {
43public:
44 CbmTrdHardwareSetupR(/* args */);
48
49 size_t GetComponentId(Int_t asicAddress,
51 hwSetup);
52 size_t GetComponentId(
53 Int_t
54 asicAddress);
55 std::map<Int_t, size_t> GetComponentIdMap() { return fComponentIdMap; }
56
57 void SetParameterFile(TString fileName) { fParameterFileName = fileName; }
58 void SetComponentIdMap(std::map<Int_t, size_t> compMap) { fComponentIdMap = compMap; }
59
66 std::map<size_t, Int_t> CreateHwToSwAsicAddressTranslatorMap(bool isLoadedParameters);
67
74 std::map<size_t, Int_t> CreateHwToSwAsicAddressTranslatorMap(CbmTrdParSetAsic* moduleparsets);
75
82 std::map<Int_t, std::vector<Int_t>> CreateAsicChannelMap(bool isLoadedParameters);
83
90 std::map<Int_t, std::vector<Int_t>> CreateAsicChannelMap(CbmTrdParSetAsic* parset);
91
93 void SelectComponentIdMap(TString geoTag);
95
96private:
97 /* data */
98 std::map<Int_t, size_t>
100
102
103 ClassDef(CbmTrdHardwareSetupR, 1) // Definition of actual hardware setup
104};
105
106#endif
ECbmTrdHardwareSetupVersion
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)