CbmRoot
CbmTrdHardwareSetupR.h
Go to the documentation of this file.
1 /*
2  * File: /CbmTrdHardwareSetupR.h
3  * Created Date: Thursday March 5th 2020
4  * Author: Pascal Raisig -- praisig@ikf.uni-frankfurt.de
5  * -----
6  * Last Modified: Friday June 5th 2020 16:24:20
7  * Modified By: Pascal Raisig
8  * -----
9  * Purpose: This class contains the hardware mapping for asics at a given beamtime and provides the functionalities to
10  * write them into the CbmTrdParAsic containers for the corresponding geometry
11  * -----
12  */
13 
14 #ifndef CBMTRDHARDWARESETUPR_H
15 #define CBMTRDHARDWARESETUPR_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 <stdint.h> // for uint64_t
24 #include <vector> // for vector
25 
26 enum class ECbmTrdHardwareSetupVersion : Int_t {
27  kUndefined = 0,
28  kMcbm2020 = 1,
30  kDesy2019,
31  kCbm2025
32 };
33 
34 
35 class CbmTrdHardwareSetupR : public TNamed {
36 public:
37  CbmTrdHardwareSetupR(/* args */);
41 
42  std::uint64_t GetComponentId(
43  Int_t asicAddress,
45  hwSetup);
46  std::uint64_t GetComponentId(
47  Int_t
48  asicAddress);
49  std::map<Int_t, std::uint64_t> GetComponentIdMap() { return fComponentIdMap; }
50 
51  void SetParameterFile(TString fileName) { fParameterFileName = fileName; }
52  void SetComponentIdMap(std::map<Int_t, std::uint64_t> compMap) {
53  fComponentIdMap = compMap;
54  }
55 
56  std::map<std::uint64_t, Int_t>
57  CreateHwToSwAsicAddressTranslatorMap(bool isLoadedParameters);
58  std::map<Int_t, std::vector<Int_t>>
59  CreateAsicChannelMap(bool isLoadedParameters);
61  void SelectComponentIdMap(TString geoTag);
63 
64 private:
65  /* data */
66  std::map<Int_t, uint64_t>
68 
69  TString
71 
72  ClassDef(CbmTrdHardwareSetupR, 1) // Definition of actual hardware setup
73 };
74 
75 #endif
ECbmTrdHardwareSetupVersion::kMcbm2020
@ kMcbm2020
CbmTrdHardwareSetupR::fComponentIdMap
std::map< Int_t, uint64_t > fComponentIdMap
Container for the translation betweem software asicAddress and hardware asicAddress....
Definition: CbmTrdHardwareSetupR.h:67
CbmTrdHardwareSetupR::~CbmTrdHardwareSetupR
~CbmTrdHardwareSetupR()
Definition: CbmTrdHardwareSetupR.cxx:36
ECbmTrdHardwareSetupVersion::kLabIkfOneSpadic
@ kLabIkfOneSpadic
CbmTrdHardwareSetupR::WriteComponentIdsToParams
bool WriteComponentIdsToParams()
Definition: CbmTrdHardwareSetupR.cxx:187
CbmTrdHardwareSetupR::SetParameterFile
void SetParameterFile(TString fileName)
Definition: CbmTrdHardwareSetupR.h:51
CbmTrdHardwareSetupR::GetComponentId
std::uint64_t GetComponentId(Int_t asicAddress, ECbmTrdHardwareSetupVersion hwSetup)
Retrieve componentId of the asic add the passed address for the passed hwSetup.
Definition: CbmTrdHardwareSetupR.cxx:40
CbmTrdHardwareSetupR::CbmTrdHardwareSetupR
CbmTrdHardwareSetupR(const CbmTrdHardwareSetupR &)
CbmTrdHardwareSetupR::operator=
CbmTrdHardwareSetupR operator=(const CbmTrdHardwareSetupR &)
CbmTrdHardwareSetupR::CreateHwToSwAsicAddressTranslatorMap
std::map< std::uint64_t, Int_t > CreateHwToSwAsicAddressTranslatorMap(bool isLoadedParameters)
Definition: CbmTrdHardwareSetupR.cxx:62
CbmTrdHardwareSetupR::SetComponentIdMap
void SetComponentIdMap(std::map< Int_t, std::uint64_t > compMap)
Definition: CbmTrdHardwareSetupR.h:52
ECbmTrdHardwareSetupVersion
ECbmTrdHardwareSetupVersion
Definition: CbmTrdHardwareSetupR.h:26
ECbmTrdHardwareSetupVersion::kCbm2025
@ kCbm2025
CbmTrdHardwareSetupR::SelectComponentIdMap
void SelectComponentIdMap(ECbmTrdHardwareSetupVersion hwSetup)
Definition: CbmTrdHardwareSetupR.cxx:271
CbmTrdHardwareSetupR::CreateAsicChannelMap
std::map< Int_t, std::vector< Int_t > > CreateAsicChannelMap(bool isLoadedParameters)
Definition: CbmTrdHardwareSetupR.cxx:129
ECbmTrdHardwareSetupVersion::kDesy2019
@ kDesy2019
CbmTrdHardwareSetupR::CbmTrdHardwareSetupR
CbmTrdHardwareSetupR()
Definition: CbmTrdHardwareSetupR.cxx:32
CbmTrdHardwareSetupR
Definition: CbmTrdHardwareSetupR.h:35
CbmTrdHardwareSetupR::GetComponentIdMap
std::map< Int_t, std::uint64_t > GetComponentIdMap()
Definition: CbmTrdHardwareSetupR.h:49
ECbmTrdHardwareSetupVersion::kUndefined
@ kUndefined
CbmTrdHardwareSetupR::fParameterFileName
TString fParameterFileName
Name of the parameter file correlated to the hardware setup.
Definition: CbmTrdHardwareSetupR.h:70