Store mfec, mfecchannel etc. More...
#include <interface/PixelHdwAddress.h>
Public Member Functions | |
void | compare (std::string what, bool &changed, unsigned int newValue, unsigned int &oldValue) |
unsigned int | fecnumber () const |
unsigned int | fedchannel () const |
unsigned int | fednumber () const |
unsigned int | fedrocnumber () const |
unsigned int | hubaddress () const |
unsigned int | mfec () const |
unsigned int | mfecchannel () const |
bool | operator() (const PixelHdwAddress &roc1, const PixelHdwAddress &roc2) const |
const bool | operator< (const PixelHdwAddress &aHdwAddress) const |
const PixelHdwAddress & | operator= (const PixelHdwAddress &aROC) |
const bool | operator|= (const PixelHdwAddress &aHdwAddress) const |
PixelHdwAddress (int fecnumber, int mfec, int mfecchannel, int hubaddress, int portaddress, int rocid, int fednumber, int fedchannel, int fedrocnumber) | |
PixelHdwAddress () | |
unsigned int | portaddress () const |
unsigned int | rocid () const |
void | setAddress (std::string what, int value) |
Private Attributes | |
unsigned int | fecnumber_ |
unsigned int | fedchannel_ |
unsigned int | fednumber_ |
unsigned int | fedrocnumber_ |
unsigned int | hubaddress_ |
unsigned int | mfec_ |
unsigned int | mfecchannel_ |
unsigned int | portaddress_ |
unsigned int | rocid_ |
Friends | |
std::ostream & | pos::operator<< (std::ostream &s, const PixelHdwAddress &pixelroc) |
Store mfec, mfecchannel etc.
A longer explanation will be placed here later
Definition at line 23 of file PixelHdwAddress.h.
PixelHdwAddress::PixelHdwAddress | ( | ) |
Definition at line 16 of file PixelHdwAddress.cc.
: mfec_(0), mfecchannel_(0), portaddress_(0), hubaddress_(0), rocid_(0), fednumber_(0), fedchannel_(0), fedrocnumber_(0) {}
PixelHdwAddress::PixelHdwAddress | ( | int | fecnumber, |
int | mfec, | ||
int | mfecchannel, | ||
int | hubaddress, | ||
int | portaddress, | ||
int | rocid, | ||
int | fednumber, | ||
int | fedchannel, | ||
int | fedrocnumber | ||
) |
Definition at line 29 of file PixelHdwAddress.cc.
: fecnumber_(fecnumber), mfec_(mfec), mfecchannel_(mfecchannel), portaddress_(portaddress), hubaddress_(hubaddress), rocid_(rocid), fednumber_(fednumber), fedchannel_(fedchannel), fedrocnumber_(fedrocnumber) { //std::cout << "Created PixelHdwAddress:"<<std::endl; //std::cout << *this << std::endl; }
void PixelHdwAddress::compare | ( | std::string | what, |
bool & | changed, | ||
unsigned int | newValue, | ||
unsigned int & | oldValue | ||
) |
Definition at line 113 of file PixelHdwAddress.cc.
References gather_cfg::cout, funct::false, fecnumber_, fedchannel_, fednumber_, fedrocnumber_, hubaddress_, mfec_, mfecchannel_, portaddress_, rocid_, and AlCaHLTBitMon_QueryRunRegistry::string.
{ std::string mthn = "[PixelHdwAddress::compare()]\t\t\t " ; changed = false ; oldValue = 0 ; if( what == "fecnumber" ) { if( fecnumber_ != newValue) {changed = true; oldValue = fecnumber_; return ;} } else if( what == "mfec" ) { if( mfec_ != newValue) {changed = true; oldValue = mfec_; return ;} } else if( what == "mfecchannel" ) { if( mfecchannel_ != newValue) {changed = true; oldValue = mfecchannel_; return ;} } else if( what == "portaddress" ) { if( portaddress_ != newValue) {changed = true; oldValue = portaddress_; return ;} } else if( what == "hubaddress" ) { if( hubaddress_ != newValue) {changed = true; oldValue = hubaddress_; return ;} } else if( what == "rocid" ) { if( rocid_ != newValue) {changed = true; oldValue = rocid_; return ;} } else if( what == "fednumber" ) { if( fednumber_ != newValue) {changed = true; oldValue = fednumber_; return ;} } else if( what == "fedchannel" ) { if( fedchannel_ != newValue) {changed = true; oldValue = fedchannel_; return ;} } else if( what == "fedrocnumber") { if( fedrocnumber_ != newValue) {changed = true; oldValue = fedrocnumber_; return ;} } else { std::cout << __LINE__ << "]\t" << mthn << "Could not compare value for " << what << " (invalid keyword)" << std::endl ; assert(0) ; } }
unsigned int pos::PixelHdwAddress::fecnumber | ( | ) | const [inline] |
Definition at line 34 of file PixelHdwAddress.h.
References fecnumber_.
Referenced by pos::PixelCalibConfiguration::getFECCrates(), pos::PixelCalibConfiguration::nextFECState(), and pos::PixelNameTranslation::PixelNameTranslation().
{ return fecnumber_; }
unsigned int pos::PixelHdwAddress::fedchannel | ( | ) | const [inline] |
Definition at line 41 of file PixelHdwAddress.h.
References fedchannel_.
Referenced by pos::PixelConfigurationVerifier::checkChannelEnable(), pos::PixelCalibConfiguration::fedCardsAndChannels(), pos::PixelDetectorConfig::getFEDsAndChannels(), pos::PixelCalibConfiguration::getFEDsAndChannels(), pos::PixelNameTranslation::getROCsFromChannel(), and pos::PixelNameTranslation::PixelNameTranslation().
{ return fedchannel_; }
unsigned int pos::PixelHdwAddress::fednumber | ( | ) | const [inline] |
Definition at line 40 of file PixelHdwAddress.h.
References fednumber_.
Referenced by pos::PixelConfigurationVerifier::checkChannelEnable(), pos::PixelCalibConfiguration::fedCardsAndChannels(), pos::PixelCalibConfiguration::getFEDCrates(), pos::PixelDetectorConfig::getFEDs(), pos::PixelDetectorConfig::getFEDsAndChannels(), pos::PixelCalibConfiguration::getFEDsAndChannels(), pos::PixelNameTranslation::getROCsFromChannel(), and pos::PixelNameTranslation::PixelNameTranslation().
{ return fednumber_; }
unsigned int pos::PixelHdwAddress::fedrocnumber | ( | ) | const [inline] |
Definition at line 42 of file PixelHdwAddress.h.
References fedrocnumber_.
{ return fedrocnumber_; }
unsigned int pos::PixelHdwAddress::hubaddress | ( | ) | const [inline] |
Definition at line 37 of file PixelHdwAddress.h.
References hubaddress_.
Referenced by pos::PixelCalibConfiguration::disablePixels(), pos::PixelCalibConfiguration::enablePixels(), pos::PixelTrimAllPixels::generateConfiguration(), pos::PixelDACSettings::generateConfiguration(), pos::PixelTBMSettings::generateConfiguration(), pos::PixelCalibConfiguration::nextFECState(), pos::PixelNameTranslation::PixelNameTranslation(), pos::PixelDACSettings::setVcthrDisable(), and pos::PixelDACSettings::setVcthrEnable().
{ return hubaddress_; }
unsigned int pos::PixelHdwAddress::mfec | ( | ) | const [inline] |
Definition at line 35 of file PixelHdwAddress.h.
References mfec_.
Referenced by pos::PixelCalibConfiguration::disablePixels(), pos::PixelCalibConfiguration::enablePixels(), pos::PixelTrimAllPixels::generateConfiguration(), pos::PixelDACSettings::generateConfiguration(), pos::PixelTBMSettings::generateConfiguration(), pos::PixelCalibConfiguration::nextFECState(), pos::PixelNameTranslation::PixelNameTranslation(), pos::PixelDACSettings::setVcthrDisable(), and pos::PixelDACSettings::setVcthrEnable().
{ return mfec_; }
unsigned int pos::PixelHdwAddress::mfecchannel | ( | ) | const [inline] |
Definition at line 36 of file PixelHdwAddress.h.
References mfecchannel_.
Referenced by pos::PixelCalibConfiguration::disablePixels(), pos::PixelCalibConfiguration::enablePixels(), pos::PixelTrimAllPixels::generateConfiguration(), pos::PixelDACSettings::generateConfiguration(), pos::PixelTBMSettings::generateConfiguration(), pos::PixelCalibConfiguration::nextFECState(), pos::PixelNameTranslation::PixelNameTranslation(), pos::PixelDACSettings::setVcthrDisable(), and pos::PixelDACSettings::setVcthrEnable().
{ return mfecchannel_; }
bool PixelHdwAddress::operator() | ( | const PixelHdwAddress & | roc1, |
const PixelHdwAddress & | roc2 | ||
) | const |
Definition at line 146 of file PixelHdwAddress.cc.
References fedchannel_, fednumber_, and fedrocnumber_.
{ if (roc1.fednumber_ < roc2.fednumber_ ) return true; if (roc1.fednumber_ > roc2.fednumber_ ) return false; if (roc1.fedchannel_ < roc2.fedchannel_) return true; if (roc1.fedchannel_ > roc2.fedchannel_) return false; return (roc1.fedrocnumber_<roc2.fedrocnumber_); }
const bool pos::PixelHdwAddress::operator< | ( | const PixelHdwAddress & | aHdwAddress | ) | const [inline] |
Definition at line 62 of file PixelHdwAddress.h.
References fedchannel_, fednumber_, and fedrocnumber_.
{ if (fednumber_ < aHdwAddress.fednumber_ ) return true; if (fednumber_ > aHdwAddress.fednumber_ ) return false; if (fedchannel_ < aHdwAddress.fedchannel_ ) return true; if (fedchannel_ > aHdwAddress.fedchannel_ ) return false; return (fedrocnumber_ < aHdwAddress.fedrocnumber_ ); }
const PixelHdwAddress & PixelHdwAddress::operator= | ( | const PixelHdwAddress & | aROC | ) |
Definition at line 65 of file PixelHdwAddress.cc.
References fecnumber_, fedchannel_, fednumber_, fedrocnumber_, hubaddress_, mfec_, mfecchannel_, portaddress_, and rocid_.
{ fecnumber_ = aROC.fecnumber_ ; mfec_ = aROC.mfec_ ; mfecchannel_ = aROC.mfecchannel_ ; portaddress_ = aROC.portaddress_ ; hubaddress_ = aROC.hubaddress_ ; rocid_ = aROC.rocid_ ; fednumber_ = aROC.fednumber_ ; fedchannel_ = aROC.fedchannel_ ; fedrocnumber_= aROC.fedrocnumber_; return *this; }
const bool pos::PixelHdwAddress::operator|= | ( | const PixelHdwAddress & | aHdwAddress | ) | const [inline] |
Definition at line 53 of file PixelHdwAddress.h.
References fecnumber_, fedchannel_, fednumber_, hubaddress_, mfec_, and mfecchannel_.
{ return ( fecnumber_ == aHdwAddress.fecnumber_ && mfec_ == aHdwAddress.mfec_ && mfecchannel_ == aHdwAddress.mfecchannel_ && hubaddress_ == aHdwAddress.hubaddress_ && fednumber_ == aHdwAddress.fednumber_ && fedchannel_ == aHdwAddress.fedchannel_ ); }
unsigned int pos::PixelHdwAddress::portaddress | ( | ) | const [inline] |
Definition at line 38 of file PixelHdwAddress.h.
References portaddress_.
Referenced by pos::PixelCalibConfiguration::disablePixels(), pos::PixelCalibConfiguration::enablePixels(), pos::PixelTrimAllPixels::generateConfiguration(), pos::PixelDACSettings::generateConfiguration(), pos::PixelCalibConfiguration::nextFECState(), pos::PixelDACSettings::setVcthrDisable(), and pos::PixelDACSettings::setVcthrEnable().
{ return portaddress_; }
unsigned int pos::PixelHdwAddress::rocid | ( | ) | const [inline] |
Definition at line 39 of file PixelHdwAddress.h.
References rocid_.
Referenced by pos::PixelCalibConfiguration::disablePixels(), pos::PixelCalibConfiguration::enablePixels(), pos::PixelTrimAllPixels::generateConfiguration(), pos::PixelDACSettings::generateConfiguration(), pos::PixelCalibConfiguration::nextFECState(), pos::PixelDACSettings::setVcthrDisable(), and pos::PixelDACSettings::setVcthrEnable().
{ return rocid_; }
void PixelHdwAddress::setAddress | ( | std::string | what, |
int | value | ||
) |
Definition at line 83 of file PixelHdwAddress.cc.
References gather_cfg::cout, fecnumber_, fedchannel_, fednumber_, fedrocnumber_, hubaddress_, mfec_, mfecchannel_, portaddress_, rocid_, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.
{ std::string mthn = "[PixelHdwAddress::setAddress()]\t\t\t " ; if( what == "fecnumber" ) { fecnumber_ = value; } else if( what == "mfec" ) { mfec_ = value ; } else if( what == "mfecchannel" ) { mfecchannel_ = value ; } else if( what == "portaddress" ) { portaddress_ = value ; } else if( what == "hubaddress" ) { hubaddress_ = value ; } else if( what == "rocid" ) { rocid_ = value ; } else if( what == "fednumber" ) { fednumber_ = value ; } else if( what == "fedchannel" ) { fedchannel_ = value ; } else if( what == "fedrocnumber") { fedrocnumber_ = value ; } else { std::cout << __LINE__ << "]\t" << mthn << "Could not set a value for " << what << " (invalid keyword)" << std::endl ; assert(0) ; } }
std::ostream& pos::operator<< | ( | std::ostream & | s, |
const PixelHdwAddress & | pixelroc | ||
) | [friend] |
unsigned int pos::PixelHdwAddress::fecnumber_ [private] |
Definition at line 76 of file PixelHdwAddress.h.
Referenced by compare(), fecnumber(), pos::operator<<(), operator=(), operator|=(), and setAddress().
unsigned int pos::PixelHdwAddress::fedchannel_ [private] |
Definition at line 83 of file PixelHdwAddress.h.
Referenced by compare(), fedchannel(), operator()(), operator<(), pos::operator<<(), operator=(), operator|=(), and setAddress().
unsigned int pos::PixelHdwAddress::fednumber_ [private] |
Definition at line 82 of file PixelHdwAddress.h.
Referenced by compare(), fednumber(), operator()(), operator<(), pos::operator<<(), operator=(), operator|=(), and setAddress().
unsigned int pos::PixelHdwAddress::fedrocnumber_ [private] |
Definition at line 84 of file PixelHdwAddress.h.
Referenced by compare(), fedrocnumber(), operator()(), operator<(), pos::operator<<(), operator=(), and setAddress().
unsigned int pos::PixelHdwAddress::hubaddress_ [private] |
Definition at line 80 of file PixelHdwAddress.h.
Referenced by compare(), hubaddress(), pos::operator<<(), operator=(), operator|=(), and setAddress().
unsigned int pos::PixelHdwAddress::mfec_ [private] |
Definition at line 77 of file PixelHdwAddress.h.
Referenced by compare(), mfec(), pos::operator<<(), operator=(), operator|=(), and setAddress().
unsigned int pos::PixelHdwAddress::mfecchannel_ [private] |
Definition at line 78 of file PixelHdwAddress.h.
Referenced by compare(), mfecchannel(), pos::operator<<(), operator=(), operator|=(), and setAddress().
unsigned int pos::PixelHdwAddress::portaddress_ [private] |
Definition at line 79 of file PixelHdwAddress.h.
Referenced by compare(), pos::operator<<(), operator=(), portaddress(), and setAddress().
unsigned int pos::PixelHdwAddress::rocid_ [private] |
Definition at line 81 of file PixelHdwAddress.h.
Referenced by compare(), pos::operator<<(), operator=(), rocid(), and setAddress().