ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
LArBadXCont< LArBC_t > Class Template Reference

Conditions-Data class holding LAr Bad Channel or Bad Feb information. More...

#include <LArBadChannelCont.h>

Collaboration diagram for LArBadXCont< LArBC_t >:

Classes

struct  ChannelLess
 Comparison functor for sorting and searching. More...
 

Public Types

typedef uint32_t ChanId_t
 
typedef std::pair< ChanId_t, LArBC_t > BadChanEntry
 
typedef std::vector< BadChanEntryBadChanVec
 
typedef BadChanVec::const_iterator const_iterator
 
typedef BadChanVec::size_type size_type
 

Public Member Functions

 LArBadXCont ()
 Default Constructor. More...
 
 LArBadXCont (const BadChanVec &vec)
 Constructor with payload. More...
 
void add (const HWIdentifier channel, const LArBC_t stat)
 Add a channel/FEB to the list of bad channels. More...
 
void sort ()
 Sort and purge the list of bad channels The list of bad channels get sorted by channel-ID For channels appearing more than once, the bad-channel word gets merged by or'ing the problem-bits. More...
 
LArBC_t status (const HWIdentifier channel) const
 Query the status of a particular channel or FEB This is the main client access method. More...
 
LArBC_t offlineStatus (const Identifier id) const
 Query the status of a particular channel by offline ID This is the main client access method. More...
 
const_iterator begin () const
 Access to the begin iterator of the underlying vector. More...
 
const_iterator end () const
 Access to the end iterator of the underlying vector. More...
 
size_type size () const
 Number of known bad channels. More...
 
void clear ()
 Deletes the contents and sets size to 0 (same as stl::vector<T>::clear()) More...
 
const BadChanVecfullCont () const
 
void setOflVec (BadChanVec &input)
 

Private Attributes

BadChanVec m_cont
 
BadChanVec m_oflCont
 

Detailed Description

template<class LArBC_t>
class LArBadXCont< LArBC_t >

Conditions-Data class holding LAr Bad Channel or Bad Feb information.

Uses internally a vector<pair<channelID,LArBadChannel> > ordered by channel-id to speed up searching Possible optimization: use a hash-indexed bitset to tell if the channel is on the list. Avoid searching for 'good' channels which are the majority Downside: Need acess the LArOnline_ID helper class for channel to hash conversion and a template specialization for the different hashes of FEBs and channels Or even keep a hash-indexed vector LArBadChannels for every channel, even good ones

Definition at line 28 of file LArBadChannelCont.h.

Member Typedef Documentation

◆ BadChanEntry

template<class LArBC_t >
typedef std::pair<ChanId_t,LArBC_t> LArBadXCont< LArBC_t >::BadChanEntry

Definition at line 31 of file LArBadChannelCont.h.

◆ BadChanVec

template<class LArBC_t >
typedef std::vector<BadChanEntry> LArBadXCont< LArBC_t >::BadChanVec

Definition at line 32 of file LArBadChannelCont.h.

◆ ChanId_t

template<class LArBC_t >
typedef uint32_t LArBadXCont< LArBC_t >::ChanId_t

Definition at line 30 of file LArBadChannelCont.h.

◆ const_iterator

template<class LArBC_t >
typedef BadChanVec::const_iterator LArBadXCont< LArBC_t >::const_iterator

Definition at line 33 of file LArBadChannelCont.h.

◆ size_type

template<class LArBC_t >
typedef BadChanVec::size_type LArBadXCont< LArBC_t >::size_type

Definition at line 34 of file LArBadChannelCont.h.

Constructor & Destructor Documentation

◆ LArBadXCont() [1/2]

template<class LArBC_t >
LArBadXCont< LArBC_t >::LArBadXCont ( )
inline

Default Constructor.

Definition at line 40 of file LArBadChannelCont.h.

40 {}

◆ LArBadXCont() [2/2]

template<class LArBC_t >
LArBadXCont< LArBC_t >::LArBadXCont ( const BadChanVec vec)

Constructor with payload.

Member Function Documentation

◆ add()

template<class LArBC_t >
void LArBadXCont< LArBC_t >::add ( const HWIdentifier  channel,
const LArBC_t  stat 
)

Add a channel/FEB to the list of bad channels.

Parameters
channelHWIdenifier of the channel in question
statBad-Channel object describing the disease this channels suffers

◆ begin()

template<class LArBC_t >
const_iterator LArBadXCont< LArBC_t >::begin ( ) const
inline

Access to the begin iterator of the underlying vector.

Definition at line 73 of file LArBadChannelCont.h.

73 {return m_cont.begin();}

◆ clear()

template<class LArBC_t >
void LArBadXCont< LArBC_t >::clear ( )
inline

Deletes the contents and sets size to 0 (same as stl::vector<T>::clear())

Definition at line 82 of file LArBadChannelCont.h.

82 {m_cont.clear(); m_oflCont.clear();}

◆ end()

template<class LArBC_t >
const_iterator LArBadXCont< LArBC_t >::end ( ) const
inline

Access to the end iterator of the underlying vector.

Definition at line 76 of file LArBadChannelCont.h.

76 {return m_cont.end();}

◆ fullCont()

template<class LArBC_t >
const BadChanVec& LArBadXCont< LArBC_t >::fullCont ( ) const
inline

Definition at line 84 of file LArBadChannelCont.h.

84 {return m_cont;}

◆ offlineStatus()

template<class LArBC_t >
LArBC_t LArBadXCont< LArBC_t >::offlineStatus ( const Identifier  id) const

Query the status of a particular channel by offline ID This is the main client access method.

Parameters
Identiferof the channel in question
Returns
LArBadChannel

◆ setOflVec()

template<class LArBC_t >
void LArBadXCont< LArBC_t >::setOflVec ( BadChanVec input)

◆ size()

template<class LArBC_t >
size_type LArBadXCont< LArBC_t >::size ( ) const
inline

Number of known bad channels.

Definition at line 79 of file LArBadChannelCont.h.

79 {return m_cont.size();}

◆ sort()

template<class LArBC_t >
void LArBadXCont< LArBC_t >::sort ( )

Sort and purge the list of bad channels The list of bad channels get sorted by channel-ID For channels appearing more than once, the bad-channel word gets merged by or'ing the problem-bits.

◆ status()

template<class LArBC_t >
LArBC_t LArBadXCont< LArBC_t >::status ( const HWIdentifier  channel) const

Query the status of a particular channel or FEB This is the main client access method.

Parameters
HWIdentiferof the channel in question
Returns
LArBadChannel or LArBadFeb object describing the problem

Member Data Documentation

◆ m_cont

template<class LArBC_t >
BadChanVec LArBadXCont< LArBC_t >::m_cont
private

Definition at line 98 of file LArBadChannelCont.h.

◆ m_oflCont

template<class LArBC_t >
BadChanVec LArBadXCont< LArBC_t >::m_oflCont
private

Definition at line 99 of file LArBadChannelCont.h.


The documentation for this class was generated from the following file:
LArBadXCont::m_cont
BadChanVec m_cont
Definition: LArBadChannelCont.h:98
LArBadXCont::m_oflCont
BadChanVec m_oflCont
Definition: LArBadChannelCont.h:99