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

Class holding bad channel problems. More...

#include <TileBchStatus.h>

Collaboration diagram for TileBchStatus:

Classes

struct  LockedPrbSet
 

Public Types

typedef TileBchPrbs::Prb Prb
 
typedef std::set< PrbPrbSet
 

Public Member Functions

 TileBchStatus ()
 
 TileBchStatus (const PrbSet &prbSet)
 
TileBchStatusoperator+= (const TileBchStatus &rhs)
 
TileBchStatusoperator+= (const TileBchPrbs::Prb &prb)
 
TileBchStatusoperator-= (const TileBchStatus &rhs)
 
TileBchStatusoperator-= (const TileBchPrbs::Prb &prb)
 
bool operator== (const TileBchStatus &other) const
 
bool operator!= (const TileBchStatus &other) const
 
const PrbSetgetPrbs () const
 
PrbSet testFor (const PrbSet &prbSet) const
 
bool contains (const Prb &prb) const
 
std::string getString () const
 
bool isGood () const
 
bool isBad () const
 
bool isAffected () const
 
bool isNoisy () const
 
bool isIgnoredInDsp () const
 
bool isIgnoredInHlt () const
 
bool isNoGainL1 () const
 
bool isHalfGainL1 () const
 
bool isBadTiming () const
 
bool isTimingDmuBcOffset () const
 
bool isTimingDmuBcOffsetPos () const
 
bool isTimingDmuBcOffsetNeg () const
 
bool isWrongBCID () const
 

Static Public Member Functions

static void initClassifierDefinitions ()
 
static void defineBad (const TileBchStatus &status)
 
static void defineNoisy (const TileBchStatus &status)
 
static void defineNoGainL1 (const TileBchStatus &status)
 
static void defineBadTiming (const TileBchStatus &status)
 
static void defineTimingDmuBcOffset (const TileBchStatus &status)
 
static void defineWrongBCID (const TileBchStatus &status)
 
static TileBchStatus getDefinitionBad ()
 
static TileBchStatus getDefinitionNoisy ()
 
static TileBchStatus getDefinitionNoGainL1 ()
 
static TileBchStatus getDefinitionBadTiming ()
 
static TileBchStatus getDefinitionTimingDmuBcOffset ()
 
static TileBchStatus getDefinitionWrongBCID ()
 

Private Member Functions

 TileBchStatus (const PrbSet &s, bool)
 

Private Attributes

PrbSet m_prbSet
 

Static Private Attributes

static LockedPrbSet s_refBad ATLAS_THREAD_SAFE
 
static LockedPrbSet s_refNoisy ATLAS_THREAD_SAFE
 
static LockedPrbSet s_refNoGainL1 ATLAS_THREAD_SAFE
 
static LockedPrbSet s_refBadTiming ATLAS_THREAD_SAFE
 
static LockedPrbSet s_refWrongBCID ATLAS_THREAD_SAFE
 
static LockedPrbSet s_refTimingDmuBcOffset ATLAS_THREAD_SAFE
 

Detailed Description

Class holding bad channel problems.

Author
Nils Gollub nils..nosp@m.goll.nosp@m.ub@ce.nosp@m.rn.c.nosp@m.h

Definition at line 19 of file TileBchStatus.h.

Member Typedef Documentation

◆ Prb

Definition at line 22 of file TileBchStatus.h.

◆ PrbSet

typedef std::set<Prb> TileBchStatus::PrbSet

Definition at line 23 of file TileBchStatus.h.

Constructor & Destructor Documentation

◆ TileBchStatus() [1/3]

TileBchStatus::TileBchStatus ( )

Definition at line 18 of file TileBchStatus.cxx.

19 {
20  if(!s_refBad.size()) initClassifierDefinitions();
21 }

◆ TileBchStatus() [2/3]

TileBchStatus::TileBchStatus ( const PrbSet prbSet)

Definition at line 25 of file TileBchStatus.cxx.

25  :
26  m_prbSet(prbSet)
27 {
28  if(!s_refBad.size()) initClassifierDefinitions();
29 }

◆ TileBchStatus() [3/3]

TileBchStatus::TileBchStatus ( const PrbSet s,
bool   
)
inlineprivate

Definition at line 100 of file TileBchStatus.h.

100 : m_prbSet (s) {}

Member Function Documentation

◆ contains()

bool TileBchStatus::contains ( const Prb prb) const
inline

Definition at line 121 of file TileBchStatus.h.

122 {
123  return (m_prbSet.find(prb) != m_prbSet.end());
124 }

◆ defineBad()

void TileBchStatus::defineBad ( const TileBchStatus status)
static

Definition at line 157 of file TileBchStatus.cxx.

158 {
159  s_refBad.set (status.getPrbs());
160 }

◆ defineBadTiming()

void TileBchStatus::defineBadTiming ( const TileBchStatus status)
static

Definition at line 181 of file TileBchStatus.cxx.

182 {
183  s_refBadTiming.set (status.getPrbs());
184 }

◆ defineNoGainL1()

void TileBchStatus::defineNoGainL1 ( const TileBchStatus status)
static

Definition at line 173 of file TileBchStatus.cxx.

174 {
175  s_refNoGainL1.set (status.getPrbs());
176 }

◆ defineNoisy()

void TileBchStatus::defineNoisy ( const TileBchStatus status)
static

Definition at line 165 of file TileBchStatus.cxx.

166 {
167  s_refNoisy.set (status.getPrbs());
168 }

◆ defineTimingDmuBcOffset()

void TileBchStatus::defineTimingDmuBcOffset ( const TileBchStatus status)
static

Definition at line 189 of file TileBchStatus.cxx.

190 {
191  s_refTimingDmuBcOffset.set (status.getPrbs());
192 }

◆ defineWrongBCID()

void TileBchStatus::defineWrongBCID ( const TileBchStatus status)
static

Definition at line 197 of file TileBchStatus.cxx.

198 {
199  s_refWrongBCID.set (status.getPrbs());
200 }

◆ getDefinitionBad()

TileBchStatus TileBchStatus::getDefinitionBad ( )
static

Definition at line 205 of file TileBchStatus.cxx.

206 {
207  return s_refBad;
208 }

◆ getDefinitionBadTiming()

TileBchStatus TileBchStatus::getDefinitionBadTiming ( )
static

Definition at line 229 of file TileBchStatus.cxx.

230 {
231  return s_refBadTiming;
232 }

◆ getDefinitionNoGainL1()

TileBchStatus TileBchStatus::getDefinitionNoGainL1 ( )
static

Definition at line 221 of file TileBchStatus.cxx.

222 {
223  return s_refNoGainL1;
224 }

◆ getDefinitionNoisy()

TileBchStatus TileBchStatus::getDefinitionNoisy ( )
static

Definition at line 213 of file TileBchStatus.cxx.

214 {
215  return s_refNoisy;
216 }

◆ getDefinitionTimingDmuBcOffset()

TileBchStatus TileBchStatus::getDefinitionTimingDmuBcOffset ( )
static

Definition at line 237 of file TileBchStatus.cxx.

238 {
239  return s_refTimingDmuBcOffset;
240 }

◆ getDefinitionWrongBCID()

TileBchStatus TileBchStatus::getDefinitionWrongBCID ( )
static

Definition at line 245 of file TileBchStatus.cxx.

246 {
247  return s_refWrongBCID;
248 }

◆ getPrbs()

const TileBchStatus::PrbSet & TileBchStatus::getPrbs ( ) const
inline

Definition at line 113 of file TileBchStatus.h.

114 {
115  return m_prbSet;
116 }

◆ getString()

std::string TileBchStatus::getString ( ) const

Definition at line 264 of file TileBchStatus.cxx.

265 {
266  std::string prbStr("");
267  for(PrbSet::const_iterator iPrb = m_prbSet.begin(); iPrb != m_prbSet.end(); ++iPrb){
268  prbStr += TileBchPrbs::getDescription(*iPrb) + "; ";
269  }
270  return prbStr;
271 }

◆ initClassifierDefinitions()

void TileBchStatus::initClassifierDefinitions ( )
static

Definition at line 91 of file TileBchStatus.cxx.

92 {
93  //=== define which problems trigger a bad state
94  PrbSet refBad;
95  //=== adc
96  refBad.insert(TileBchPrbs::GeneralMaskAdc);
97  refBad.insert(TileBchPrbs::AdcDead);
98  refBad.insert(TileBchPrbs::SevereStuckBit);
99  refBad.insert(TileBchPrbs::SevereDataCorruption);
100  refBad.insert(TileBchPrbs::VeryLargeHfNoise);
101  refBad.insert(TileBchPrbs::NoData);
102  refBad.insert(TileBchPrbs::WrongDspConfig);
103  //=== channel
104  refBad.insert(TileBchPrbs::GeneralMaskChannel);
105  refBad.insert(TileBchPrbs::NoPmt);
106  refBad.insert(TileBchPrbs::NoHV);
107  refBad.insert(TileBchPrbs::WrongHV);
108  //=== online (adc)
109  refBad.insert(TileBchPrbs::OnlineGeneralMaskAdc);
110  s_refBad.set (std::move (refBad));
111 
112  PrbSet refNoisy;
113  //=== define which problems trigger a noisy state
114  refNoisy.insert(TileBchPrbs::LargeHfNoise);
115  refNoisy.insert(TileBchPrbs::CorrelatedNoise);
116  refNoisy.insert(TileBchPrbs::LargeLfNoise);
117  s_refNoisy.set (std::move (refNoisy));
118 
119  PrbSet refNoGainL1;
120  //=== define which problems trigger a NoGainL1 state
121  refNoGainL1.insert(TileBchPrbs::AdcDead);
122  refNoGainL1.insert(TileBchPrbs::NoPmt);
123  refNoGainL1.insert(TileBchPrbs::NoHV);
124  refNoGainL1.insert(TileBchPrbs::TrigGeneralMask);
125  refNoGainL1.insert(TileBchPrbs::TrigNoGain);
126  refNoGainL1.insert(TileBchPrbs::TrigNoisy);
127  refNoGainL1.insert(TileBchPrbs::DisableForL1);
128  s_refNoGainL1.set (std::move (refNoGainL1));
129 
130  PrbSet refBadTiming;
131  //=== define which problems trigger a bad timing
132  refBadTiming.insert(TileBchPrbs::BadTiming);
133  //=== online
134  refBadTiming.insert(TileBchPrbs::OnlineBadTiming);
135  s_refBadTiming.set (std::move (refBadTiming));
136 
137  PrbSet refTimingDmuBcOffset;
138  //=== define which problems trigger an affected timing
139  refTimingDmuBcOffset.insert(TileBchPrbs::TimingDmuBcOffsetPos);
140  refTimingDmuBcOffset.insert(TileBchPrbs::TimingDmuBcOffsetNeg);
141  //=== online
142  refTimingDmuBcOffset.insert(TileBchPrbs::OnlineTimingDmuBcOffsetPos);
143  refTimingDmuBcOffset.insert(TileBchPrbs::OnlineTimingDmuBcOffsetNeg);
144  s_refTimingDmuBcOffset.set (std::move (refTimingDmuBcOffset));
145 
146  PrbSet refWrongBCID;
147  //=== define which problems trigger a wrong BCID
148  refWrongBCID.insert(TileBchPrbs::WrongBCID);
149  //=== online
150  refWrongBCID.insert(TileBchPrbs::OnlineWrongBCID);
151  s_refWrongBCID.set (std::move (refWrongBCID));
152 }

◆ isAffected()

bool TileBchStatus::isAffected ( ) const
inline

Definition at line 137 of file TileBchStatus.h.

138 {
139  return (!isGood());
140 }

◆ isBad()

bool TileBchStatus::isBad ( ) const
inline

Definition at line 145 of file TileBchStatus.h.

146 {
147  return m_prbSet.size() ? (s_refBad.test (m_prbSet)) : false;
148 }

◆ isBadTiming()

bool TileBchStatus::isBadTiming ( ) const
inline

Definition at line 193 of file TileBchStatus.h.

194 {
195  return m_prbSet.size() ? (s_refBadTiming.test (m_prbSet)) : false;
196 }

◆ isGood()

bool TileBchStatus::isGood ( ) const
inline

Definition at line 129 of file TileBchStatus.h.

130 {
131  return (m_prbSet.size() == 0);
132 }

◆ isHalfGainL1()

bool TileBchStatus::isHalfGainL1 ( ) const
inline

Definition at line 185 of file TileBchStatus.h.

186 {
187  return m_prbSet.size() ? contains(TileBchPrbs::TrigHalfGain) : false;
188 }

◆ isIgnoredInDsp()

bool TileBchStatus::isIgnoredInDsp ( ) const
inline

Definition at line 161 of file TileBchStatus.h.

162 {
163  return m_prbSet.size() ? contains(TileBchPrbs::IgnoredInDsp) : false;
164 }

◆ isIgnoredInHlt()

bool TileBchStatus::isIgnoredInHlt ( ) const
inline

Definition at line 169 of file TileBchStatus.h.

170 {
171  return m_prbSet.size() ? contains(TileBchPrbs::IgnoredInHlt) : false;
172 }

◆ isNoGainL1()

bool TileBchStatus::isNoGainL1 ( ) const
inline

Definition at line 177 of file TileBchStatus.h.

178 {
179  return m_prbSet.size() ? (s_refNoGainL1.test (m_prbSet)) : false;
180 }

◆ isNoisy()

bool TileBchStatus::isNoisy ( ) const
inline

Definition at line 153 of file TileBchStatus.h.

154 {
155  return m_prbSet.size() ? (s_refNoisy.test (m_prbSet)) : false;
156 }

◆ isTimingDmuBcOffset()

bool TileBchStatus::isTimingDmuBcOffset ( ) const
inline

Definition at line 201 of file TileBchStatus.h.

202 {
203  return m_prbSet.size() ? (s_refTimingDmuBcOffset.test (m_prbSet)) : false;
204 }

◆ isTimingDmuBcOffsetNeg()

bool TileBchStatus::isTimingDmuBcOffsetNeg ( ) const
inline

Definition at line 217 of file TileBchStatus.h.

◆ isTimingDmuBcOffsetPos()

bool TileBchStatus::isTimingDmuBcOffsetPos ( ) const
inline

Definition at line 209 of file TileBchStatus.h.

◆ isWrongBCID()

bool TileBchStatus::isWrongBCID ( ) const
inline

Definition at line 225 of file TileBchStatus.h.

226 {
227  return m_prbSet.size() ? (s_refWrongBCID.test (m_prbSet)) : false;
228 }

◆ operator!=()

bool TileBchStatus::operator!= ( const TileBchStatus other) const

Definition at line 83 of file TileBchStatus.cxx.

84 {
85  return !(m_prbSet == other.m_prbSet);
86 }

◆ operator+=() [1/2]

TileBchStatus & TileBchStatus::operator+= ( const TileBchPrbs::Prb prb)

Definition at line 45 of file TileBchStatus.cxx.

46 {
47  m_prbSet.insert(prb);
48  return *this;
49 }

◆ operator+=() [2/2]

TileBchStatus & TileBchStatus::operator+= ( const TileBchStatus rhs)

Definition at line 34 of file TileBchStatus.cxx.

35 {
36  // PrbSet overlapp;
37  std::insert_iterator<PrbSet> insItr(m_prbSet, m_prbSet.begin());
38  std::set_union(m_prbSet.begin(),m_prbSet.end(), rhs.getPrbs().begin(), rhs.getPrbs().end(), insItr);
39  return *this;
40 }

◆ operator-=() [1/2]

TileBchStatus & TileBchStatus::operator-= ( const TileBchPrbs::Prb prb)

Definition at line 66 of file TileBchStatus.cxx.

67 {
68  m_prbSet.erase(prb);
69  return *this;
70 }

◆ operator-=() [2/2]

TileBchStatus & TileBchStatus::operator-= ( const TileBchStatus rhs)

Definition at line 54 of file TileBchStatus.cxx.

55 {
56  PrbSet::const_iterator iPrb = rhs.getPrbs().begin();
57  for(; iPrb!=rhs.getPrbs().end(); ++iPrb){
58  m_prbSet.erase(*iPrb);
59  }
60  return *this;
61 }

◆ operator==()

bool TileBchStatus::operator== ( const TileBchStatus other) const

Definition at line 75 of file TileBchStatus.cxx.

76 {
77  return (m_prbSet == other.m_prbSet);
78 }

◆ testFor()

TileBchStatus::PrbSet TileBchStatus::testFor ( const PrbSet prbSet) const

Definition at line 253 of file TileBchStatus.cxx.

254 {
255  PrbSet overlapp;
256  std::insert_iterator<PrbSet> insItr(overlapp, overlapp.begin());
257  std::set_intersection(m_prbSet.begin(),m_prbSet.end(), prbSet.begin(), prbSet.end(), insItr);
258  return overlapp;
259 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/6]

LockedPrbSet s_refBad TileBchStatus::ATLAS_THREAD_SAFE
staticprivate

Definition at line 102 of file TileBchStatus.h.

◆ ATLAS_THREAD_SAFE [2/6]

LockedPrbSet s_refNoisy TileBchStatus::ATLAS_THREAD_SAFE
staticprivate

Definition at line 103 of file TileBchStatus.h.

◆ ATLAS_THREAD_SAFE [3/6]

LockedPrbSet s_refNoGainL1 TileBchStatus::ATLAS_THREAD_SAFE
staticprivate

Definition at line 104 of file TileBchStatus.h.

◆ ATLAS_THREAD_SAFE [4/6]

LockedPrbSet s_refBadTiming TileBchStatus::ATLAS_THREAD_SAFE
staticprivate

Definition at line 105 of file TileBchStatus.h.

◆ ATLAS_THREAD_SAFE [5/6]

LockedPrbSet s_refWrongBCID TileBchStatus::ATLAS_THREAD_SAFE
staticprivate

Definition at line 106 of file TileBchStatus.h.

◆ ATLAS_THREAD_SAFE [6/6]

LockedPrbSet s_refTimingDmuBcOffset TileBchStatus::ATLAS_THREAD_SAFE
staticprivate

Definition at line 107 of file TileBchStatus.h.

◆ m_prbSet

PrbSet TileBchStatus::m_prbSet
private

Definition at line 69 of file TileBchStatus.h.


The documentation for this class was generated from the following files:
TileBchPrbs::TrigHalfGain
@ TrigHalfGain
Definition: TileBchPrbs.h:80
TileBchStatus::getPrbs
const PrbSet & getPrbs() const
Definition: TileBchStatus.h:113
TileBchPrbs::WrongBCID
@ WrongBCID
Definition: TileBchPrbs.h:70
TileBchPrbs::SevereDataCorruption
@ SevereDataCorruption
Definition: TileBchPrbs.h:38
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TileBchStatus::initClassifierDefinitions
static void initClassifierDefinitions()
Definition: TileBchStatus.cxx:91
TileBchPrbs::IgnoredInDsp
@ IgnoredInDsp
Definition: TileBchPrbs.h:86
TileBchPrbs::BadTiming
@ BadTiming
Definition: TileBchPrbs.h:64
TileBchPrbs::CorrelatedNoise
@ CorrelatedNoise
Definition: TileBchPrbs.h:43
TileBchPrbs::WrongDspConfig
@ WrongDspConfig
Definition: TileBchPrbs.h:36
TileBchPrbs::OnlineTimingDmuBcOffsetNeg
@ OnlineTimingDmuBcOffsetNeg
Definition: TileBchPrbs.h:92
TileBchPrbs::TimingDmuBcOffsetPos
@ TimingDmuBcOffsetPos
Definition: TileBchPrbs.h:71
TileBchPrbs::OnlineWrongBCID
@ OnlineWrongBCID
Definition: TileBchPrbs.h:90
TileBchPrbs::TrigNoGain
@ TrigNoGain
Definition: TileBchPrbs.h:79
TileBchStatus::isGood
bool isGood() const
Definition: TileBchStatus.h:129
TileBchPrbs::TrigNoisy
@ TrigNoisy
Definition: TileBchPrbs.h:81
TileBchPrbs::WrongHV
@ WrongHV
Definition: TileBchPrbs.h:56
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
TileBchStatus::PrbSet
std::set< Prb > PrbSet
Definition: TileBchStatus.h:23
set_union
Set * set_union(Set *set1, Set *set2)
Perform a union of two sets.
TileBchPrbs::AdcDead
@ AdcDead
Definition: TileBchPrbs.h:33
TileBchPrbs::IgnoredInHlt
@ IgnoredInHlt
Definition: TileBchPrbs.h:87
TileBchPrbs::LargeLfNoise
@ LargeLfNoise
Definition: TileBchPrbs.h:44
TileBchPrbs::VeryLargeHfNoise
@ VeryLargeHfNoise
Definition: TileBchPrbs.h:34
TileBchPrbs::NoData
@ NoData
Definition: TileBchPrbs.h:35
TileBchPrbs::OnlineTimingDmuBcOffsetPos
@ OnlineTimingDmuBcOffsetPos
Definition: TileBchPrbs.h:91
TileBchStatus::m_prbSet
PrbSet m_prbSet
Definition: TileBchStatus.h:69
TileBchPrbs::NoPmt
@ NoPmt
Definition: TileBchPrbs.h:54
TileBchPrbs::OnlineGeneralMaskAdc
@ OnlineGeneralMaskAdc
Definition: TileBchPrbs.h:97
TileBchPrbs::DisableForL1
@ DisableForL1
Definition: TileBchPrbs.h:88
TileBchStatus::contains
bool contains(const Prb &prb) const
Definition: TileBchStatus.h:121
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
TileBchPrbs::TimingDmuBcOffsetNeg
@ TimingDmuBcOffsetNeg
Definition: TileBchPrbs.h:72
TileBchPrbs::TrigGeneralMask
@ TrigGeneralMask
Definition: TileBchPrbs.h:78
merge.status
status
Definition: merge.py:17
TileBchPrbs::LargeHfNoise
@ LargeHfNoise
Definition: TileBchPrbs.h:42
TileBchPrbs::SevereStuckBit
@ SevereStuckBit
Definition: TileBchPrbs.h:37
TileBchPrbs::NoHV
@ NoHV
Definition: TileBchPrbs.h:55
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
TileBchPrbs::OnlineBadTiming
@ OnlineBadTiming
Definition: TileBchPrbs.h:89
TileBchPrbs::GeneralMaskChannel
@ GeneralMaskChannel
Definition: TileBchPrbs.h:53
TileBchPrbs::GeneralMaskAdc
@ GeneralMaskAdc
Definition: TileBchPrbs.h:32
TileBchPrbs::getDescription
static std::string getDescription(const Prb &prb)
Get description of problem.
Definition: TileBchPrbs.cxx:11