![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <NswDcsDbData.h>
|
| NswDcsDbData (const MmIdHelper &mmHelper, const sTgcIdHelper &stgcHelper, const MuonGM::MuonDetectorManager *muonGeoMgr) |
|
virtual | ~NswDcsDbData ()=default |
|
void | setDataHv (const DcsTechType tech, const Identifier &chnlId, DcsConstants constants) |
|
void | setDataTDaq (const DcsTechType tech, const Identifier &chnlId, uint64_t timeSince, uint64_t timeUntil, unsigned int elink, bool permanentlyDisabled) |
|
void | setDataEltx (const DcsTechType tech, const Identifier &chnlId) |
|
std::vector< Identifier > | getChannelIdsHv (const DcsTechType tech, const std::string &side) const |
|
const DcsConstants * | getDataForChannelHv (const DcsTechType tech, const Identifier &channelId, bool issTgcQ1OuterHv) const |
| Retrieves the calibration constant for a particular readout channel. More...
|
|
bool | isGood (const EventContext &ctx, const Identifier &channelId, bool issTgcQ1OuterHv=false) const |
| Returns whether the channel is alive, i.e. DCS state on, etc... More...
|
|
bool | isGoodHv (const Identifier &channelId, bool issTgcQ1OuterHv=false) const |
|
bool | isGoodTDaq (const EventContext &ctx, const Identifier &channelId, bool &permanentlyDisabled) const |
|
bool | isGoodEltx (const Identifier &channelId) const |
|
bool | isConnectedChannel (const Identifier &channelId) const |
|
Definition at line 19 of file NswDcsDbData.h.
◆ ChannelDcsMap
◆ ChannelEltxMap
◆ ChannelTDaqMap
◆ DcsConstants
◆ DcsDataType
◆ DcsFsmState
◆ DcsTechType
◆ NswDcsDbData()
◆ ~NswDcsDbData()
virtual NswDcsDbData::~NswDcsDbData |
( |
| ) |
|
|
virtualdefault |
◆ getChannelIdsHv()
Definition at line 117 of file NswDcsDbData.cxx.
118 std::vector<Identifier> chnls;
121 chnls.reserve(dcsMap.size());
122 for(
const DcsModule&
module : dcsMap) {
123 if(
module.channels.empty())
continue;
126 for(
unsigned int chn = 1 ; chn <=
module.channels.size() ; ++chn) {
127 if(!
module.channels[chn -1])
continue;
133 chnls.reserve(dcsMap.size());
134 for(
const DcsModule&
module : dcsMap) {
135 if(
module.channels.empty())
continue;
138 for(
unsigned int chn = 1 ; chn <=
module.channels.size() ; ++chn) {
139 if(!
module.channels[chn -1])
continue;
◆ getDataForChannelHv()
Retrieves the calibration constant for a particular readout channel.
Definition at line 149 of file NswDcsDbData.cxx.
156 if (dcsMap.size() > array_idx && dcsMap.at(array_idx).channels.size() >
channel && dcsMap[array_idx].channels[
channel])
return dcsMap[array_idx].channels[
channel].get();
163 if (dcsMap.size() > array_idx && dcsMap.at(array_idx).channels.size() >
channel && dcsMap[array_idx].channels[
channel])
return dcsMap[array_idx].channels[
channel].get();
173 if (dcsMap.size() > array_idx && dcsMap.at(array_idx).channels.size() >
channel && dcsMap[array_idx].channels[
channel])
return dcsMap[array_idx].channels[
channel].get();
◆ identToModuleIdx()
unsigned int NswDcsDbData::identToModuleIdx |
( |
const Identifier & |
chan_id | ) |
const |
|
private |
Definition at line 34 of file NswDcsDbData.cxx.
38 throw std::runtime_error(
"NswDcsDbData() - Failed to retrieve valid micromega hash ");
44 throw std::runtime_error(
"NswDcsDbData() - Failed to retrieve valid stgc hash ");
48 throw std::runtime_error(
"NswDcsDbData() - No NSW identifier");
◆ isConnectedChannel()
bool NswDcsDbData::isConnectedChannel |
( |
const Identifier & |
channelId | ) |
const |
Definition at line 254 of file NswDcsDbData.cxx.
258 if(!
m_mmIdHelper.
is_mm(
channelId))
throw std::runtime_error(
"the check for unconnected channels was called with an identifier that is in MM and not sTGC");
261 if(!detectorReadoutElement) {
262 throw std::runtime_error(
"failed to retrieve MMReadoutElement");
266 throw std::runtime_error(
"failed to retrieve MuonChannelDesign");
271 if(channel_number <= channelDesign->nMissedBottomStereo || channel_number >= channelDesign->
totalStrips - channelDesign->
nMissedTopStereo) {
275 if(channel_number <= channelDesign->nMissedBottomEta || channel_number >= channelDesign->
totalStrips - channelDesign->
nMissedTopEta) {
◆ isGood()
bool NswDcsDbData::isGood |
( |
const EventContext & |
ctx, |
|
|
const Identifier & |
channelId, |
|
|
bool |
issTgcQ1OuterHv = false |
|
) |
| const |
Returns whether the channel is alive, i.e. DCS state on, etc...
Definition at line 179 of file NswDcsDbData.cxx.
184 bool permanentlyDisabled{
false};
◆ isGoodEltx()
◆ isGoodHv()
bool NswDcsDbData::isGoodHv |
( |
const Identifier & |
channelId, |
|
|
bool |
issTgcQ1OuterHv = false |
|
) |
| const |
For the moment do not kill the hit if there's no dcs data
Definition at line 193 of file NswDcsDbData.cxx.
205 return driftHvIsGood && stripHvIsGood;
◆ isGoodTDaq()
bool NswDcsDbData::isGoodTDaq |
( |
const EventContext & |
ctx, |
|
|
const Identifier & |
channelId, |
|
|
bool & |
permanentlyDisabled |
|
) |
| const |
Definition at line 210 of file NswDcsDbData.cxx.
213 if(
data.size()<=array_idx ||
data[array_idx].empty())
return true;
214 const std::map<Identifier, std::set<TDaqConstants>>& dataInRoElement =
data[array_idx];
228 auto elm = dataInRoElement.find(mapIdentifier);
229 if(elm == dataInRoElement.end())
return true;
231 uint64_t evtTime = ctx.eventID().time_stamp()*1e9;
232 evtTime += ctx.eventID().time_stamp_ns_offset();
233 x.timeSince = evtTime;
234 x.timeUntil = evtTime;
237 auto disabledLink = elm->second.find(
x);
238 if(disabledLink != elm->second.end()){
239 permanentlyDisabled = disabledLink->permanentlyDisabled;
◆ setDataEltx()
◆ setDataHv()
Definition at line 56 of file NswDcsDbData.cxx.
60 if (array_idx >= dcsMap.size()) dcsMap.resize(array_idx + 1);
61 DcsModule& dcs_mod = dcsMap[array_idx];
63 if(dcs_mod.channels.empty())
65 if(dcs_mod.channels.size() <=
channel) dcs_mod.channels.resize(
channel +1);
67 throw std::runtime_error(
"NswDcsDbData::setData() -- Cannot overwrite channel");
70 dcs_mod.channels[
channel] = std::make_unique<DcsConstants>(std::move(
constants));
74 if (array_idx >= dcsMap.size()) dcsMap.resize(array_idx + 1);
75 DcsModule& dcs_mod = dcsMap.at(array_idx);
77 if(dcs_mod.channels.empty()) {
80 if(dcs_mod.channels.size() <=
channel) dcs_mod.channels.resize(
channel +1);
82 throw std::runtime_error(
"setData() -- Cannot overwrite channel");
85 dcs_mod.channels[
channel] = std::make_unique<DcsConstants>(std::move(
constants));
◆ setDataTDaq()
void NswDcsDbData::setDataTDaq |
( |
const DcsTechType |
tech, |
|
|
const Identifier & |
chnlId, |
|
|
uint64_t |
timeSince, |
|
|
uint64_t |
timeUntil, |
|
|
unsigned int |
elink, |
|
|
bool |
permanentlyDisabled |
|
) |
| |
Definition at line 91 of file NswDcsDbData.cxx.
94 if (array_idx >=
data.size())
data.resize(array_idx + 1);
96 x.timeSince = timeSince;
97 x.timeUntil = timeUntil;
99 x.permanentlyDisabled = permanentlyDisabled;
100 data[array_idx][chnlId].insert(
x);
◆ m_data_eltx_mmg
◆ m_data_eltx_stg
◆ m_data_hv_mmd
◆ m_data_hv_mmg
◆ m_data_hv_stg
◆ m_data_tdaq_mmg
◆ m_data_tdaq_stg
◆ m_mmIdHelper
◆ m_muonGeoMgr
◆ m_stgcIdHelper
The documentation for this class was generated from the following files:
int multilayer(const Identifier &id) const
char data[hepevt_bytes_allocation_ATLAS]
const DcsConstants * getDataForChannelHv(const DcsTechType tech, const Identifier &channelId, bool issTgcQ1OuterHv) const
Retrieves the calibration constant for a particular readout channel.
ChannelTDaqMap m_data_tdaq_mmg
std::string find(const std::string &s)
return a remapped string
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
size_type detectorElement_hash_max() const
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Identifier febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int radius) const
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
ChannelDcsMap m_data_hv_stg
int multilayer(const Identifier &id) const
bool isSmall(const Identifier &id) const
bool is_stgc(const Identifier &id) const
Identifier multilayerID(const Identifier &channeldID) const
unsigned int identToModuleIdx(const Identifier &chan_id) const
int channel(const Identifier &id) const override
bool isGoodHv(const Identifier &channelId, bool issTgcQ1OuterHv=false) const
int gasGap(const Identifier &id) const override
get the hashes
bool isGoodEltx(const Identifier &channelId) const
Helper struct to cache all dcs constants in a common place of the memory.
std::vector< DcsModule > ChannelDcsMap
bool is_mm(const Identifier &id) const
ChannelDcsMap m_data_hv_mmd
std::vector< std::set< Identifier > > ChannelEltxMap
bool isGoodTDaq(const EventContext &ctx, const Identifier &channelId, bool &permanentlyDisabled) const
int stationEta(const Identifier &id) const
virtual int get_detectorElement_hash(const Identifier &id, IdentifierHash &hash_id) const override
ChannelEltxMap m_data_eltx_mmg
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
std::vector< std::map< Identifier, std::set< TDaqConstants > >> ChannelTDaqMap
ChannelDcsMap m_data_hv_mmg
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const MmIdHelper & m_mmIdHelper
bool isConnectedChannel(const Identifier &channelId) const
Identifier pcbID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int pcb) const
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Identifier febID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType) const
const sTgcIdHelper & m_stgcIdHelper
const MuonGM::MuonDetectorManager * m_muonGeoMgr
Identifier hvID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, bool isInnerQ1) const
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
bool isStereo(const Identifier &id) const
int channelType(const Identifier &id) const
ChannelTDaqMap m_data_tdaq_stg
ChannelEltxMap m_data_eltx_stg