Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DuneChannelInfo Class Reference

#include <DuneChannelInfo.h>

Public Types

using Channel = AdcChannel
 
using Index = AdcIndex
 

Public Member Functions

void clear ()
 
 DuneChannelInfo ()=default
 
 DuneChannelInfo (Index a_channel, Index a_fembID, Index a_fembChannel, Index a_channelStatus)
 
bool isValid () const
 
bool operator< (const DuneChannelInfo &rhs)
 
bool operator== (const DuneChannelInfo &rhs) const
 
bool operator!= (const DuneChannelInfo &rhs) const
 
std::string channelString () const
 
std::string fembString (Index wid=2, Index wch=3) const
 

Static Public Member Functions

static Index badChannel ()
 
static Index badIndex ()
 
static const DuneChannelInfobadChannelInfo ()
 

Public Attributes

Channel channel =badChannel()
 
Index fembID =badIndex()
 
Index fembChannel =badIndex()
 
Index channelStatus =badIndex()
 

Detailed Description

Definition at line 15 of file DuneChannelInfo.h.

Member Typedef Documentation

Definition at line 19 of file DuneChannelInfo.h.

Definition at line 20 of file DuneChannelInfo.h.

Constructor & Destructor Documentation

DuneChannelInfo::DuneChannelInfo ( )
default
DuneChannelInfo::DuneChannelInfo ( Index  a_channel,
Index  a_fembID,
Index  a_fembChannel,
Index  a_channelStatus 
)
inline

Definition at line 46 of file DuneChannelInfo.h.

47  : channel(a_channel), fembID(a_fembID), fembChannel(a_fembChannel),
48  channelStatus(a_channelStatus) { }

Member Function Documentation

static Index DuneChannelInfo::badChannel ( )
inlinestatic

Definition at line 27 of file DuneChannelInfo.h.

27 { return -1u; }
static const DuneChannelInfo& DuneChannelInfo::badChannelInfo ( )
inlinestatic

Definition at line 29 of file DuneChannelInfo.h.

29  {
30  static DuneChannelInfo bci;
31  return bci;
32  }
static Index DuneChannelInfo::badIndex ( )
inlinestatic

Definition at line 28 of file DuneChannelInfo.h.

28 { return -1u; }
std::string DuneChannelInfo::channelString ( ) const
inline

Definition at line 73 of file DuneChannelInfo.h.

73  {
74  std::ostringstream ssout;
75  ssout << channel;
76  return ssout.str();
77  }
void DuneChannelInfo::clear ( )
inline

Definition at line 35 of file DuneChannelInfo.h.

35  {
36  channel = badChannel();
37  fembID = badIndex();
40  }
static Index badChannel()
static Index badIndex()
std::string DuneChannelInfo::fembString ( Index  wid = 2,
Index  wch = 3 
) const
inline

Definition at line 83 of file DuneChannelInfo.h.

83  {
85  while ( sid.size() < wid ) sid = "0" + sid;
87  while ( sch.size() < wch ) sch = "0" + sch;
88  return sid + "-" + sch;
89  }
std::string string
Definition: nybbler.cc:12
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
bool DuneChannelInfo::isValid ( ) const
inline

Definition at line 51 of file DuneChannelInfo.h.

51 { return channel != badIndex(); }
static Index badIndex()
bool DuneChannelInfo::operator!= ( const DuneChannelInfo rhs) const
inline

Definition at line 68 of file DuneChannelInfo.h.

68  {
69  return ! (*this == rhs);
70  }
bool DuneChannelInfo::operator< ( const DuneChannelInfo rhs)
inline

Definition at line 54 of file DuneChannelInfo.h.

54  {
55  if ( channel < rhs.channel ) return true;
56  return false;
57  }
bool DuneChannelInfo::operator== ( const DuneChannelInfo rhs) const
inline

Definition at line 60 of file DuneChannelInfo.h.

60  {
61  if ( channel != rhs.channel ) return false;
62  if ( fembID != rhs.fembID ) return false;
63  if ( fembChannel != rhs.fembChannel ) return false;
64  if ( channelStatus != rhs.channelStatus ) return false;
65  return true;
66  }

Member Data Documentation

Channel DuneChannelInfo::channel =badChannel()

Definition at line 22 of file DuneChannelInfo.h.

Index DuneChannelInfo::channelStatus =badIndex()

Definition at line 25 of file DuneChannelInfo.h.

Index DuneChannelInfo::fembChannel =badIndex()

Definition at line 24 of file DuneChannelInfo.h.

Index DuneChannelInfo::fembID =badIndex()

Definition at line 23 of file DuneChannelInfo.h.


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