|
ATLAS Offline Software
|
#include <NswDcsDbData.h>
|
| NswDcsDbData (const Muon::IMuonIdHelperSvc *idHelperSvc, 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 113 of file NswDcsDbData.cxx.
114 std::vector<Identifier> chnls;
118 chnls.reserve(dcsMap.size());
119 for(
const DcsModule&
module : dcsMap) {
120 if(
module.channels.empty())
continue;
121 if(
side ==
"A" && idHelper.stationEta(
module.layer_id) < 0)
continue;
122 if(
side ==
"C" && idHelper.stationEta(
module.layer_id) > 0)
continue;
123 for(
unsigned int chn = 1 ; chn <=
module.channels.size() ; ++chn) {
124 if(!
module.channels[chn -1])
continue;
125 chnls.push_back(idHelper.channelID(
module.layer_id, idHelper.multilayer(
module.layer_id), idHelper.gasGap(
module.layer_id), chn ));
131 chnls.reserve(dcsMap.size());
132 for(
const DcsModule&
module : dcsMap) {
133 if(
module.channels.empty())
continue;
134 if(
side ==
"A" && idHelper.stationEta(
module.layer_id) < 0)
continue;
135 if(
side ==
"C" && idHelper.stationEta(
module.layer_id) > 0)
continue;
136 for(
unsigned int chn = 1 ; chn <=
module.channels.size() ; ++chn) {
137 if(!
module.channels[chn -1])
continue;
138 chnls.push_back(idHelper.channelID(
module.layer_id, idHelper.multilayer(
module.layer_id),
139 idHelper.gasGap(
module.layer_id), idHelper.channelType(
module.layer_id), chn ));
◆ getDataForChannelHv()
Retrieves the calibration constant for a particular readout channel.
Definition at line 147 of file NswDcsDbData.cxx.
150 if(!idHelper.is_mm(
channelId))
return nullptr;
154 const unsigned int channel = idHelper.channel(dcsChannelIdStripHv) -1;
155 if (dcsMap.size() > array_idx && dcsMap.at(array_idx).channels.size() >
channel && dcsMap[array_idx].channels[
channel])
return dcsMap[array_idx].channels[
channel].get();
158 if(!idHelper.is_mm(
channelId))
return nullptr;
162 const unsigned int channel = idHelper.channel(dcsChannelIdDriftHv) -1;
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();
166 if(!idHelper.is_stgc(
channelId))
return nullptr;
169 if(std::abs(idHelper.stationEta(
channelId))!= 1) {issTgcQ1OuterHv=
false;}
173 const unsigned int channel = idHelper.channel(dcsChannelId) -1;
174 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 33 of file NswDcsDbData.cxx.
37 return static_cast<unsigned int>(
hash)*(idHelper.gasGapMax()) + (idHelper.gasGap(chan_id) -1);
40 return static_cast<unsigned int>(
hash)*(idHelper.gasGapMax()) + (idHelper.gasGap(chan_id) -1);
◆ isConnectedChannel()
bool NswDcsDbData::isConnectedChannel |
( |
const Identifier & |
channelId | ) |
const |
Definition at line 257 of file NswDcsDbData.cxx.
266 if(!detectorReadoutElement) {
274 int channel_number = idHelper.channel(
channelId);
276 if(channel_number <= channelDesign->nMissedBottomStereo || channel_number >= channelDesign->
totalStrips - channelDesign->
nMissedTopStereo) {
280 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 180 of file NswDcsDbData.cxx.
185 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 194 of file NswDcsDbData.cxx.
206 return driftHvIsGood && stripHvIsGood;
◆ isGoodTDaq()
bool NswDcsDbData::isGoodTDaq |
( |
const EventContext & |
ctx, |
|
|
const Identifier & |
channelId, |
|
|
bool & |
permanentlyDisabled |
|
) |
| const |
Definition at line 211 of file NswDcsDbData.cxx.
214 if(
data.size()<=array_idx ||
data[array_idx].empty())
return true;
215 const std::map<Identifier, std::set<TDaqConstants>>& dataInRoElement =
data[array_idx];
228 mapper.elink_info(std::abs(idHelper.stationEta(
channelId))-1, idHelper.channel(
channelId), elink);
231 auto elm = dataInRoElement.find(mapIdentifier);
232 if(elm == dataInRoElement.end())
return true;
234 uint64_t evtTime = ctx.eventID().time_stamp()*1e9;
235 evtTime += ctx.eventID().time_stamp_ns_offset();
236 x.timeSince = evtTime;
237 x.timeUntil = evtTime;
240 auto disabledLink = elm->second.find(
x);
241 if(disabledLink != elm->second.end()){
242 permanentlyDisabled = disabledLink->permanentlyDisabled;
◆ setDataEltx()
◆ setDataHv()
Definition at line 50 of file NswDcsDbData.cxx.
55 if (array_idx >= dcsMap.size()) dcsMap.resize(array_idx + 1);
56 DcsModule& dcs_mod = dcsMap[array_idx];
57 const unsigned int channel = idHelper.channel(chnlId)-1;
58 if(dcs_mod.channels.empty())
60 if(dcs_mod.channels.size() <=
channel) dcs_mod.channels.resize(
channel +1);
65 dcs_mod.channels[
channel] = std::make_unique<DcsConstants>(std::move(
constants));
70 if (array_idx >= dcsMap.size()) dcsMap.resize(array_idx + 1);
71 DcsModule& dcs_mod = dcsMap.at(array_idx);
72 const unsigned int channel = idHelper.channel(chnlId)-1;
73 if(dcs_mod.channels.empty()) {
76 if(dcs_mod.channels.size() <=
channel) dcs_mod.channels.resize(
channel +1);
81 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 87 of file NswDcsDbData.cxx.
90 if (array_idx >=
data.size())
data.resize(array_idx + 1);
92 x.timeSince = timeSince;
93 x.timeUntil = timeUntil;
95 x.permanentlyDisabled = permanentlyDisabled;
96 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_idHelperSvc
◆ m_muonGeoMgr
The documentation for this class was generated from the following files:
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.
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
ChannelTDaqMap m_data_tdaq_mmg
std::string find(const std::string &s)
return a remapped string
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
#define THROW_EXCEPTION(MSG)
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
ChannelDcsMap m_data_hv_stg
unsigned int identToModuleIdx(const Identifier &chan_id) const
bool isGoodHv(const Identifier &channelId, bool issTgcQ1OuterHv=false) const
virtual Identifier layerId(const Identifier &id) const =0
create a layer ID, returns tube id for the MDTs
bool isGoodEltx(const Identifier &channelId) const
Helper struct to cache all dcs constants in a common place of the memory.
std::vector< DcsModule > ChannelDcsMap
ChannelDcsMap m_data_hv_mmd
virtual bool isMM(const Identifier &id) const =0
returns whether this is a MM Identifier or not
std::vector< std::set< Identifier > > ChannelEltxMap
bool isGoodTDaq(const EventContext &ctx, const Identifier &channelId, bool &permanentlyDisabled) const
virtual Identifier gasGapId(const Identifier &id) const =0
create a gasGap ID (will return layer Id for MDTs)
ChannelEltxMap m_data_eltx_mmg
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)
bool isConnectedChannel(const Identifier &channelId) 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 MuonGM::MuonDetectorManager * m_muonGeoMgr
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const Muon::IMuonIdHelperSvc * m_idHelperSvc
ChannelTDaqMap m_data_tdaq_stg
virtual bool issTgc(const Identifier &id) const =0
returns whether this is a sTGC Identifier or not
virtual IdentifierHash detElementHash(const Identifier &id) const =0
Returns the detector element hash associated to an Identifier.
ChannelEltxMap m_data_eltx_stg