ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
TileBadChannels Class Reference

Condition object to keep Tile channel and ADC status. More...

#include <TileBadChannels.h>

Collaboration diagram for TileBadChannels:

Public Member Functions

 TileBadChannels ()
 
virtual ~TileBadChannels ()
 
void addAdcStatus (const HWIdentifier channel_id, const HWIdentifier adc_id, const TileBchStatus &adcStatus)
 Add status for given Tile ADC and corresponding channel. More...
 
const TileBchStatusgetAdcStatus (const HWIdentifier adc_id) const
 Return Tile ADC status. More...
 
const TileBchStatusgetChannelStatus (const HWIdentifier channel_id) const
 Return Tile channel status. More...
 
void setTripsProbabilities (std::vector< std::vector< float >> &&tripsProbs)
 Store trips probabilities for all Tile drawers. More...
 
const std::vector< std::vector< float > > & getTripsProbabilities (void) const
 Return trips probabilities for all Tile drawers. More...
 
void setMaskedDrawers (std::vector< int > &&maskedDrawers)
 Store Tile drawers masked completely. More...
 
const std::vector< int > & getMaskedDrawers (void) const
 Return Tile drawers masked completely. More...
 
uint32_t encodeAdcStatus (const HWIdentifier adc_id) const
 

Static Public Member Functions

static uint32_t encodeStatus (const TileBchStatus &status)
 

Private Types

typedef std::map< const HWIdentifier, TileBchStatusBchMap
 

Private Attributes

TileBchStatus m_defaultStatus
 
BchMap m_adcStatus
 
BchMap m_channelStatus
 
std::vector< std::vector< float > > m_tripsProbs
 
std::vector< int > m_maskedDrawers
 

Detailed Description

Condition object to keep Tile channel and ADC status.

Definition at line 24 of file TileBadChannels.h.

Member Typedef Documentation

◆ BchMap

Definition at line 86 of file TileBadChannels.h.

Constructor & Destructor Documentation

◆ TileBadChannels()

TileBadChannels::TileBadChannels ( )

Definition at line 9 of file TileBadChannels.cxx.

9  {
10 
11 }

◆ ~TileBadChannels()

TileBadChannels::~TileBadChannels ( )
virtual

Definition at line 14 of file TileBadChannels.cxx.

14  {
15 
16 }

Member Function Documentation

◆ addAdcStatus()

void TileBadChannels::addAdcStatus ( const HWIdentifier  channel_id,
const HWIdentifier  adc_id,
const TileBchStatus adcStatus 
)

Add status for given Tile ADC and corresponding channel.

Parameters
channel_idTile hardware (online) channel identifier
adc_idTile hardware (online) ADC identifier
adcStatusTile ADC status

Definition at line 18 of file TileBadChannels.cxx.

18  {
19  m_channelStatus[channel_id] += adcStatus;
20  m_adcStatus[adc_id] += adcStatus;
21 }

◆ encodeAdcStatus()

uint32_t TileBadChannels::encodeAdcStatus ( const HWIdentifier  adc_id) const

Definition at line 70 of file TileBadChannels.cxx.

70  {
71  return encodeStatus(getAdcStatus(adc_id));
72 }

◆ encodeStatus()

uint32_t TileBadChannels::encodeStatus ( const TileBchStatus status)
static

Definition at line 52 of file TileBadChannels.cxx.

52  {
53  uint32_t bad;
54 
55  if (status.isGood()) {
56  bad = 0;
57  } else if (status.isBad()) {
58  bad = 3;
59  } else if (status.isNoisy()) {
60  bad = 1;
61  } else if (status.isAffected()) {
62  bad = 2;
63  } else {
64  bad = 4;
65  }
66 
67  return bad;
68 }

◆ getAdcStatus()

const TileBchStatus & TileBadChannels::getAdcStatus ( const HWIdentifier  adc_id) const

Return Tile ADC status.

Parameters
adc_idTile hardware (online) ADC identifier
Returns
Tile ADC status

Definition at line 24 of file TileBadChannels.cxx.

24  {
25 
26  BchMap::const_iterator adcStatus = m_adcStatus.find(adc_id);
27  if (adcStatus == m_adcStatus.end()) {
28  return m_defaultStatus;
29  } else {
30  return adcStatus->second;
31  }
32 
33 }

◆ getChannelStatus()

const TileBchStatus & TileBadChannels::getChannelStatus ( const HWIdentifier  channel_id) const

Return Tile channel status.

Parameters
channel_idTile hardware (online) channel identifier
Returns
Tile channel status

Definition at line 35 of file TileBadChannels.cxx.

35  {
36 
37  BchMap::const_iterator channelStatus = m_channelStatus.find(channel_id);
38  if (channelStatus == m_channelStatus.end()) {
39  return m_defaultStatus;
40  } else {
41  return channelStatus->second;
42  }
43 
44 }

◆ getMaskedDrawers()

const std::vector<int>& TileBadChannels::getMaskedDrawers ( void  ) const
inline

Return Tile drawers masked completely.

Returns
Array of Tile drawers (frag identifiers) masked comletely

Definition at line 77 of file TileBadChannels.h.

77 {return m_maskedDrawers;};

◆ getTripsProbabilities()

const std::vector<std::vector<float> >& TileBadChannels::getTripsProbabilities ( void  ) const
inline

Return trips probabilities for all Tile drawers.

Returns
Trips probabilites for all Tile drawers

Definition at line 64 of file TileBadChannels.h.

64 {return m_tripsProbs;};

◆ setMaskedDrawers()

void TileBadChannels::setMaskedDrawers ( std::vector< int > &&  maskedDrawers)

Store Tile drawers masked completely.

Parameters
maskedDrawersArray of Tile drawers (frag identifiers) masked comletely

Definition at line 47 of file TileBadChannels.cxx.

47  {
48  m_maskedDrawers = std::move(maskedDrawers);
49  std::sort (m_maskedDrawers.begin(), m_maskedDrawers.end());
50 }

◆ setTripsProbabilities()

void TileBadChannels::setTripsProbabilities ( std::vector< std::vector< float >> &&  tripsProbs)
inline

Store trips probabilities for all Tile drawers.

Parameters
tripsProbsTrips probabilites for all Tile drawers

Definition at line 103 of file TileBadChannels.h.

103  {
104  m_tripsProbs = std::move(tripsProbs);
105 }

Member Data Documentation

◆ m_adcStatus

BchMap TileBadChannels::m_adcStatus
private

Definition at line 87 of file TileBadChannels.h.

◆ m_channelStatus

BchMap TileBadChannels::m_channelStatus
private

Definition at line 88 of file TileBadChannels.h.

◆ m_defaultStatus

TileBchStatus TileBadChannels::m_defaultStatus
private

Definition at line 84 of file TileBadChannels.h.

◆ m_maskedDrawers

std::vector<int> TileBadChannels::m_maskedDrawers
private

Definition at line 91 of file TileBadChannels.h.

◆ m_tripsProbs

std::vector<std::vector<float> > TileBadChannels::m_tripsProbs
private

Definition at line 90 of file TileBadChannels.h.


The documentation for this class was generated from the following files:
bad
@ bad
Definition: SUSYToolsTester.cxx:100
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileBadChannels::m_channelStatus
BchMap m_channelStatus
Definition: TileBadChannels.h:88
TileBadChannels::m_defaultStatus
TileBchStatus m_defaultStatus
Definition: TileBadChannels.h:84
TileBadChannels::encodeStatus
static uint32_t encodeStatus(const TileBchStatus &status)
Definition: TileBadChannels.cxx:52
createCoolChannelIdFile.channel_id
channel_id
Definition: createCoolChannelIdFile.py:52
TileBadChannels::m_tripsProbs
std::vector< std::vector< float > > m_tripsProbs
Definition: TileBadChannels.h:90
TileBadChannels::getAdcStatus
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
Definition: TileBadChannels.cxx:24
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
merge.status
status
Definition: merge.py:17
TileBadChannels::m_adcStatus
BchMap m_adcStatus
Definition: TileBadChannels.h:87
TileBadChannels::m_maskedDrawers
std::vector< int > m_maskedDrawers
Definition: TileBadChannels.h:91