Belle II Software development
CDCBadBoards Class Reference

Database object for bad boards. More...

#include <CDCBadBoards.h>

Inheritance diagram for CDCBadBoards:

Public Member Functions

 CDCBadBoards ()
 Default constructor.
 
void setBoard (const short boardID, double eff=0)
 Set a board in the list.
 
unsigned short getEntries () const
 Get the no.
 
std::map< unsigned short, float > getBoards () const
 Get the whole map.
 
bool isDeadBoard (const short boardID, double &eff) const
 Check if dead board.
 
bool isHotBoard (const short boardID) const
 Check if the board is hot/noisy.
 
void dump () const
 Print out contents.
 

Private Member Functions

 ClassDef (CDCBadBoards, 1)
 ClassDef.
 

Private Attributes

std::map< unsigned short, float > m_boards
 badwire list
 

Detailed Description

Database object for bad boards.

Definition at line 27 of file CDCBadBoards.h.

Constructor & Destructor Documentation

◆ CDCBadBoards()

CDCBadBoards ( )
inline

Default constructor.

Definition at line 33 of file CDCBadBoards.h.

33{}

Member Function Documentation

◆ dump()

void dump ( ) const
inline

Print out contents.

Definition at line 96 of file CDCBadBoards.h.

97 {
98 std::cout << " " << std::endl;
99 std::cout << "Bad CDC board list" << std::endl;
100 std::cout << "#entries= " << m_boards.size() << std::endl;
101 if (m_boards.size() > 0) {
102 for (auto const& ent : m_boards) {
103 std::cout << "BoardID: " << ent.first << " Efficiency: " << ent.second << std::endl;
104 }
105 }
106 }

◆ getBoards()

std::map< unsigned short, float > getBoards ( ) const
inline

Get the whole map.

Definition at line 56 of file CDCBadBoards.h.

57 {
58 return m_boards;
59 }

◆ getEntries()

unsigned short getEntries ( ) const
inline

Get the no.

of entries in the list

Definition at line 48 of file CDCBadBoards.h.

49 {
50 return m_boards.size();
51 }

◆ isDeadBoard()

bool isDeadBoard ( const short boardID,
double & eff ) const
inline

Check if dead board.

Parameters
boardIDwire id to be checked
effefficiency of the wirte
Returns
true if dead board; false if not

Definition at line 67 of file CDCBadBoards.h.

68 {
69 std::map<unsigned short, float>::const_iterator it = m_boards.find(boardID);
70 if (it != m_boards.end() && 0. <= it->second && it->second < 1.) {
71 eff = it->second;
72 return true;
73 } else {
74 return false;
75 }
76 }

◆ isHotBoard()

bool isHotBoard ( const short boardID) const
inline

Check if the board is hot/noisy.

Parameters
boardIDto be checked
Returns
true if hot wire; false if not

Definition at line 83 of file CDCBadBoards.h.

84 {
85 std::map<unsigned short, float>::const_iterator it = m_boards.find(boardID);
86 if (it != m_boards.end() && it->second > 1.) {
87 return true;
88 } else {
89 return false;
90 }
91 }

◆ setBoard()

void setBoard ( const short boardID,
double eff = 0 )
inline

Set a board in the list.

Parameters
boardIDwire-id to be registered
effwire efficiency; specify 0 <= eff < 1 for dead wire; eff > 1 for hot/noisy wire

Definition at line 40 of file CDCBadBoards.h.

41 {
42 m_boards.insert(std::pair(boardID, eff));
43 }

Member Data Documentation

◆ m_boards

std::map<unsigned short, float> m_boards
private

badwire list

Definition at line 109 of file CDCBadBoards.h.


The documentation for this class was generated from the following file: