![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
29 delete tileBchDecoder;
62 ATH_MSG_INFO(
"ProxyOnlBch and ProxyOflBch will be used for bad channel status");
64 ATH_MSG_INFO(
"Only ProxyOnlBch will be used for bad channel status");
66 ATH_MSG_INFO(
"Only ProxyOflBch will be used for bad channel status");
68 ATH_MSG_INFO(
"ProxyOnlBch and ProxyOflBch will not be used for bad channel status => all channels are good");
71 return StatusCode::SUCCESS;
79 if (badChannels.isValid()) {
80 ATH_MSG_DEBUG(
"Found valid TileBadChannels: " << badChannels.key());
81 return StatusCode::SUCCESS;
84 EventIDRange eventRange;
87 std::unique_ptr<TileCalibData<TileCalibDrawerBch>> onlBchData
88 = std::make_unique<TileCalibData<TileCalibDrawerBch>>();
91 EventIDRange onlBchRange;
96 std::unique_ptr<TileCalibData<TileCalibDrawerBch>> oflBchData
97 = std::make_unique<TileCalibData<TileCalibDrawerBch>>();
100 EventIDRange oflBchRange;
106 std::unique_ptr<TileBadChannels> badChannelsData = std::make_unique<TileBadChannels>();
118 unsigned int drawerIdx(0);
122 for (
IdentifierHash adcHash = 0; adcHash < maxAdcHash; adcHash += 1) {
124 if (tileHWID->
get_id(adcHash, adcId, &adcContext) == 0) {
126 if (tileHWID->
ros(adcId) == 0)
continue;
132 std::vector<const TileCalibDrawerBch*> calibDrawers;
135 calibDrawers.push_back( onlBchData->getCalibDrawer(drawerIdx) );
140 calibDrawers.push_back( oflBchData->getCalibDrawer(drawerIdx) );
149 if (!adcStatus.
isGood()) {
182 ATH_MSG_INFO(
"Updating TileBchStatus::isBad() definition from DB" );
185 ATH_MSG_INFO(
"No TileBchStatus::isBad() definition found in DB, using defaults" );
192 ATH_MSG_INFO(
"Updating TileBchStatus::isNoisy() definition from DB" );
195 ATH_MSG_INFO(
"No TileBchStatus::isNoisy() definition found in DB, using defaults" );
202 ATH_MSG_INFO(
"Updating TileBchStatus::isNoGainL1() definition from DB" );
205 ATH_MSG_INFO(
"No TileBchStatus::isNoGainL1() definition found in DB, using defaults" );
213 ATH_MSG_INFO(
"Updating TileBchStatus::isBadTiming() definition from DB" );
216 ATH_MSG_INFO(
"No TileBchStatus::isBadTiming() definition found in DB, using defaults" );
223 ATH_MSG_INFO(
"Updating TileBchStatus::isWrongBCID() definition from DB" );
226 ATH_MSG_INFO(
"No TileBchStatus::isWrongBCID() definition found in DB, using defaults" );
232 ATH_MSG_INFO(
"TileBchStatus::isNoisy() is defined by: "
234 ATH_MSG_INFO(
"TileBchStatus::isNoGainL1() is defined by: "
236 ATH_MSG_INFO(
"TileBchStatus::isBadTiming() is defined by: "
238 ATH_MSG_INFO(
"TileBchStatus::isWrongBCID() is defined by: "
242 std::vector<int> maskedDrawers;
244 unsigned int maxChannels =
cabling->getMaxChannels();
264 if (!maskedDrawers.empty()) {
265 msg(
MSG::DEBUG) <<
"List of fully masked drawers: " << MSG::hex;
266 for(
int maskedDrawer : maskedDrawers) {
275 if (!maskedDrawers.empty()) badChannelsData->
setMaskedDrawers(std::move(maskedDrawers));
310 ATH_MSG_INFO(
"No drawer trips probabilities found in DB");
315 return StatusCode::FAILURE;
321 if(badChannels.record(eventRange, badChannelsData.release()).isFailure()) {
322 ATH_MSG_ERROR(
"Could not record TileBadChannels object with "
324 <<
" with EventRange " << eventRange
325 <<
" into Conditions Store");
326 return StatusCode::FAILURE;
331 <<
" with EventRange " << eventRange
332 <<
" into Conditions Store");
337 return StatusCode::SUCCESS;
Class providing the association between TileCal problems and status word bits.
static TileBchStatus getDefinitionBadTiming()
static void initClassifierDefinitions()
virtual int get_id(const IdentifierHash &hash_id, HWIdentifier &id, const IdContext *context=0) const
create compact HW ID from hash id (return == 0 for OK)
static TileBchStatus getDefinitionWrongBCID()
void getStatusWords(unsigned int channel, unsigned int adc, uint32_t &adcStatus, uint32_t &chnStatus) const
Extracts the adc and channel status words.
Class holding bad channel problems.
static const unsigned int NOISY_DEFINITION_CHAN
Channel used for storing of noisy channel definitions.
bool msgLvl(const MSG::Level lvl) const
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
static const unsigned int TRIPS_DRAWERIDX
DrawerIdx used for storing trips probabilities.
TileBchDecoder::BitPatVer getBitPatternVersion() const
Returns the bit pattern version.
#define ATH_MSG_VERBOSE(x)
ToolHandle< ITileCondProxy< TileCalibDrawerBch > > m_oflBchProxy
Tool to provide ofline Tile bad channel status If it is provided online and offline Tile bad channel ...
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
static void defineBadTiming(const TileBchStatus &status)
Helper class for TileCal online (hardware) identifiers.
static const unsigned int WRONGBCID_DEFINITION_CHAN
Channel used for storing of wrong BCID channel definitions.
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
static TileBchStatus getDefinitionNoisy()
static void defineNoisy(const TileBchStatus &status)
void setTripsProbabilities(std::vector< std::vector< float >> &&tripsProbs)
Store trips probabilities for all Tile drawers.
std::vector< const TileBchDecoder * > m_tileBchDecoder
::StatusCode StatusCode
StatusCode definition for legacy code.
void setMaskedDrawers(std::vector< int > &&maskedDrawers)
Store Tile drawers masked completely.
static const unsigned int DEFINITIONS_DRAWERIDX
Drawer used for storing of bad and noisy channel definitions.
static const unsigned int BADTIMING_DEFINITION_CHAN
Channel used for storing of bad timing channel definitions.
static void defineNoGainL1(const TileBchStatus &status)
size_type adc_hash_max(void) const
ADC hash table max size.
ToolHandle< ITileCondProxy< TileCalibDrawerBch > > m_onlBchProxy
Tool to provide online Tile bad channel status.
#define CHECK(...)
Evaluate an expression and check for errors.
static void defineBad(const TileBchStatus &status)
TileCalib Exception base class.
static const unsigned int MAX_ROS
Number of ROSs
~TileBadChannelsCondAlg()
const TileBchStatus & getChannelStatus(const HWIdentifier channel_id) const
Return Tile channel status.
virtual StatusCode execute() override
SG::WriteCondHandleKey< TileBadChannels > m_badChannelsKey
Name of output TileBadChannels.
ToolHandle< TileCondIdTransforms > m_tileIdTrans
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
static void defineWrongBCID(const TileBchStatus &status)
StatusCode initialize(bool used=true)
IdContext adc_context(void) const
idContext for ADCs
static TileBchStatus getDefinitionNoGainL1()
static TileBchStatus getDefinitionBad()
void addAdcStatus(const HWIdentifier channel_id, const HWIdentifier adc_id, const TileBchStatus &adcStatus)
Add status for given Tile ADC and corresponding channel.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the closest approach of two lines.
virtual StatusCode initialize() override
static const unsigned int BAD_DEFINITION_CHAN
Channel used for storing of bad channel definitions.
static const unsigned int NOGAINL1_DEFINITION_CHAN
Channel used for storing of NoGainLevel1 channel definitions.
TileBadChannelsCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Class for storing a 32 bit status word for each ADC.