![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
39 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
42 Tile::MAX_ROS - 1, Tile::MAX_DRAWER);
57 return StatusCode::SUCCESS;
84 std::vector<int> dmus;
94 int nBadConsecutiveModules = isTileErrorState ?
MAX_DMU : ((tileEventInfoFlag >>
MAX_DMU) & 0xF);
98 if (isTileErrorState) {
102 fill(
"TileConsecutiveBadModules", monitoredConsecutiveBad);
103 fill(
"TileConsecutiveBadModulesLB", monitoredConsecutiveBad,
lumiBlock);
112 bool physicRun = (l1TriggerType == 0) || (((l1TriggerType >> Trig_b7) & 1) == 1);
121 ATH_MSG_WARNING(
"Tile raw channel units are not ADC counts => will not check neagative amplitudes!" );
126 int fragId = rawChannelCollection->identify();
127 int drawer = (fragId & 0x3F);
128 int ros = fragId >> 8;
140 float pedestal = rawChannel->pedestal();
141 float quality = std::abs(rawChannel->quality());
142 float amplitude = rawChannel->amplitude();
143 float time = rawChannel->uncorrTime();
183 int channelDividedBy2 =
channel >> 1;
186 && (channelDividedBy2 == 0 || channelDividedBy2 == 6 || channelDividedBy2 == 9))
196 if (pedestal > 100000. && digitsContainer) {
201 if (digitsCollection) {
203 for (
const TileDigits* tile_digits : *digitsCollection) {
209 <<
" " << Tile::getDrawerString(
ros,
drawer)
210 << std::setfill(
' ') << std::setw(3) <<
channel
211 << ((
gain) ?
" HG" :
" LG") <<
" negative amplitude: "
212 << std::setprecision(2) << std::fixed << std::setw(7)
213 << amplitude <<
" Samples: " << std::setprecision(0);
215 std::vector<float>
samples = tile_digits->samples();
237 if (digitsContainer) {
242 int fragId = digitsCollection->identify();
243 int drawer = (fragId & 0x3F);
244 int ros = fragId >> 8;
249 if (l1TriggerType != digitsCollection->getLvl1Type()) {
250 fill(
"TileMismatchedL1TriggerType", monitoredModule, monitoredROS);
253 if (l1TriggerType == 0
x82) {
255 unsigned int nBadOrDisconnectedChannels(0);
260 ++nBadOrDisconnectedChannels;
264 unsigned int nRequiredChannels(Tile::MAX_CHAN - nBadOrDisconnectedChannels);
265 if (digitsCollection->size() < nRequiredChannels) {
266 fill(
"TileNoAllDigits", monitoredModule, monitoredROS);
267 ATH_MSG_VERBOSE(
"No All channels with digits (Trigger Type: 0x82) in module "
269 <<
", present channels: " << digitsCollection->size()
270 <<
", required channels: " << nRequiredChannels);
279 for (
const TileDigits* tile_digits : *digitsCollection) {
298 <<
" " << Tile::getDrawerString(
ros,
drawer)
299 << std::setfill(
' ') << std::setw(3) <<
channel
300 << ((
gain) ?
" HG" :
" LG")
303 std::vector<float>
samples = tile_digits->samples();
322 bool fillCorruptedData(
false);
324 if (corruptedData[
error] > 0
u) {
325 fillCorruptedData =
true;
326 for (
unsigned int dmu = 0
u; dmu < 16
u; ++dmu) {
327 if (corruptedData[
error] & (1
u << dmu)) {
334 if (fillCorruptedData) {
341 std::vector<int> rosWithGloblaCRC;
342 std::vector<int> drawerWithGlobalCRC;
345 for (
unsigned int ros = 1;
ros < Tile::MAX_ROS; ++
ros) {
349 bool isGoodModuleDCS(
true);
353 fractionOfBadDMUs = -1.0;
354 isGoodModuleDCS =
false;
360 if (
status & (TileFragStatus::ALL_FF | TileFragStatus::ALL_00)) {
362 }
else if (
status & (TileFragStatus::NO_FRAG | TileFragStatus::NO_ROB)) {
366 float nBadNotMaskedDMUs = 0;
368 for (
int dmu = 0; dmu <
MAX_DMU; ++dmu) {
385 if ((channelStatus0.isBad() && channelStatus1.
isBad() && channelStatus2.
isBad())
391 || ((
ros < 3 &&
channel == 42) && channelStatus0.isBad() && channelStatus2.
isBad())
396 || ((specialEB &&
channel == 3) && channelStatus1.
isBad() && channelStatus2.
isBad())) {
402 if (isGoodModuleDCS) {
420 || (
ros > 2 && (dmu == 8 || dmu == 9 || dmu == 14 || dmu == 15))
421 || (specialEB && dmu == 0))) {
469 if (isGoodModuleDCS) {
470 fractionOfBadDMUs = nBadNotMaskedDMUs /
MAX_DMU;
480 rosWithGloblaCRC.push_back(
ros);
481 drawerWithGlobalCRC.push_back(
drawer);
486 if (!rosWithGloblaCRC.empty()) {
489 fill(
"TileBadGlobalCRC", monModule, monROS);
494 return StatusCode::SUCCESS;
499 int dmu,
int error)
const {
def retrieve(aClass, aKey=None)
static int CorruptedData(int ros, int drawer, int channel, int gain, const std::vector< float > &digits, float &dmin, float &dmax, float ADCmaxMinusEps, float ADCmaskValueMinusEps)
Gaudi::Property< bool > m_skipMasked
float m_ADCmaskValueMinusEps
indicates channels which were masked in background dataset
int checkBCIDErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has BCID mismatch between DMU and ROD Since BCID errors in the DQ fragment are det...
Gaudi::Property< float > m_negativeAmplitudeCutHG
Gaudi::Property< bool > m_skipGapCells
uint64_t eventNumber() const
The current event's event number.
void setDigiError(std::vector< int > &dmus, std::vector< int > &errors, int dmu, int error) const
bool isChanDQgood(int partition, int drawer, int ch) const
returns status of single channel (if bigain, returns AND of ADCs' status
Gaudi::Property< float > m_timeMinThresh
Class holding bad channel problems.
int sample(const Identifier &id) const
std::vector< int > m_badChannelNegNotMaskGroups
bool msgLvl(const MSG::Level lvl) const
Identifier h2s_cell_id_index(const HWIdentifier &id, int &index, int &pmt) const
virtual StatusCode initialize() override
initialize
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
bool isStatusBad(unsigned int ros, unsigned int drawer) const
Return true if given Tile drawer considered as bad by summary drawer states per LVPS otherwise return...
@ u
Enums for curvilinear frames.
Gaudi::Property< float > m_timeMaxThresh
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
def timer(name, disabled=False)
int checkGlobalCRCErr(int partition, int drawer, int gain) const
returns 1 if adc channel has global CRC error
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
int checkROD_CRCErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has CRC error originating in ROD
@ Error
The sub-detector issued an error.
Gaudi::Property< float > m_negativeAmplitudeCutLG
int ADCmaskValue() const
Returns the overlay magic number that indicates channels which were masked in background dataset.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
const TileHWID * m_tileHWID
float calibrateChannel(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn, TileRawChannelUnit::UNIT rawDataUnitOut) const
Calibrate a Tile channel.
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
void clearDigiError(std::vector< int > &dmus, std::vector< int > &errors) const
const TileCablingService * m_cabling
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< int > m_badPulseQualityGroups
int checkHeaderFormatErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has header word format error
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< bool > m_ignoreNoRecoFragError
std::vector< int > m_badChannelNegGroups
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
uint32_t lumiBlock() const
The current event's luminosity block number.
std::vector< std::vector< int > > m_errorsGroups
const TileBchStatus & getChannelStatus(const HWIdentifier channel_id) const
Return Tile channel status.
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
int checkGlobalErr(int partition, int drawer, int gain) const
returns 1 if adc channel has any global error
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
int checkSampleParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has data word parity error
Gaudi::Property< float > m_minChannelEnergy
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
int checkHeaderParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has header word parity error
StatusCode initialize(bool used=true)
int checkSampleFormatErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has data word format error
static const char * BadPatternName(float ped)
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
static const int MAX_CORRUPTED_ERROR
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoTileStatusKey
Class describing the basic event information.
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
virtual StatusCode initialize() override
initialize
uint32_t eventFlags(EventFlagSubDet subDet) const
Get the event flags for a particular sub-detector.
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
@ Tile
The Tile calorimeter.
Gaudi::Property< float > m_qualityCut
bool contains(const Prb &prb) const
bool isDisconnected(int ros, int drawer, int channel) const
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
std::vector< int > m_badChannelJumpGroups
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
Name of TileDCSState object in condition store.
uint16_t level1TriggerType() const
The Level-1 trigger type.
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Condition object to keep Tile DCS status from DB.
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
std::vector< std::vector< int > > m_errorsVsLBGroups
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
int checkSingleStrobeErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has single strobe error
Declare a monitored scalar variable.
std::vector< int > m_negativeEnergyGroups
Handle class for reading from StoreGate.
std::vector< int > m_badChannelJumpNotMaskGroups
int checkDoubleStrobeErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has double strobe error
int checkMemoryParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has memory parity error
int checkFE_CRCErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has CRC error originating in FE electronics
Gaudi::Property< bool > m_checkDCS
int ADCmax() const
Returns the maximum ADC output (10 bits --> 1023)
Gaudi::Property< float > m_minGapEnergy
const_pointer_type cptr()
const TileInfo * m_tileInfo