CbmRoot
Loading...
Searching...
No Matches
CbmStsParModule.h
Go to the documentation of this file.
1/* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese [committer] */
4
5
6#ifndef CBMSTSPARMODULE_H
7#define CBMSTSPARMODULE_H 1
8
9#include "CbmStsParAsic.h" // for CbmStsParAsic
10
11#include <Rtypes.h> // for THashConsistencyHolder, ClassDefNV
12
13#include <string> // for string
14#include <vector> // for vector
15
28
29public:
32
33
38 CbmStsParModule(uint32_t nChannels, uint32_t nAsicChannels);
39
40
43
44
47
48
51
52
57 uint32_t DeactivateRandomChannels(double fraction);
58
59
64 const CbmStsParAsic& GetParAsic(uint32_t channel) const;
65
66
70 const std::vector<CbmStsParAsic>& GetAsicParams() const { return fAsicPars; }
71
72
76 uint32_t GetNofAsicChannels() const { return fNofAsicChannels; }
77
78
82 uint32_t GetNofAsics() const { return fAsicPars.size(); }
83
84
88 uint32_t GetNofChannels() const { return fNofChannels; }
89
90
95 bool IsChannelActive(uint32_t channel) const;
96
97
101 void SetAllAsics(const CbmStsParAsic& asicPar);
102
103
107 void SetAsic(uint32_t asicNr, const CbmStsParAsic& asicPar);
108
109
111 std::string ToString() const;
112
113
114private:
115 uint32_t fNofChannels = 0;
116 uint32_t fNofAsicChannels = 0.;
117 std::vector<CbmStsParAsic> fAsicPars {};
118
119
121};
122
123#endif /* CBMSTSPARMODULE_H */
Parameters of the STS readout ASIC.
Parameters for one STS module.
uint32_t GetNofChannels() const
Number of channels.
uint32_t DeactivateRandomChannels(double fraction)
Randomly deactivate a fraction of the channels.
~CbmStsParModule()
Destructor.
std::vector< CbmStsParAsic > fAsicPars
ASIC parameters.
uint32_t GetNofAsics() const
Number of ASICs.
void SetAllAsics(const CbmStsParAsic &asicPar)
Set all ASICs with the same parameter set.
ClassDefNV(CbmStsParModule, 2)
CbmStsParModule()
Default constructor.
uint32_t GetNofAsicChannels() const
Number of channels per ASIC.
uint32_t fNofAsicChannels
Number of channels per ASIC.
bool IsChannelActive(uint32_t channel) const
Check for a channel being active.
CbmStsParModule & operator=(const CbmStsParModule &other)
Copy assignment operator.
uint32_t fNofChannels
Number of readout channels.
std::string ToString() const
String output.
const std::vector< CbmStsParAsic > & GetAsicParams() const
All ASIC parameters.
void SetAsic(uint32_t asicNr, const CbmStsParAsic &asicPar)
Set parameters for a single ASIC.
const CbmStsParAsic & GetParAsic(uint32_t channel) const
ASIC parameters for a given channel.