Provides interpretation of flag bits with understanding of CMSSW version dependence. More...
#include <HcalCaloFlagLabels.h>
Public Member Functions | |
std::string | getFieldName (HcalSubdetector sd, int bit) const |
int | getFieldStart (HcalSubdetector sd, const std::string &field) const |
int | getFieldWidth (HcalSubdetector sd, const std::string &field) const |
int | getFieldWidth (HcalSubdetector sd, int bit) const |
bool | hasField (HcalSubdetector sd, const std::string &field) const |
bool | hasField (HcalSubdetector sd, int bit) const |
HcalCaloFlagTool (const std::string &releaseName) | |
Private Attributes | |
int | major_ |
int | minor_ |
int | patch_ |
std::string | releaseName_ |
bool | standardFormat_ |
int | subpatch_ |
Provides interpretation of flag bits with understanding of CMSSW version dependence.
Definition at line 60 of file HcalCaloFlagLabels.h.
HcalCaloFlagTool::HcalCaloFlagTool | ( | const std::string & | releaseName | ) |
Definition at line 5 of file HcalCaloFlagLabels.cc.
References l1GtPatternGenerator_cfi::fields, major_, minor_, patch_, standardFormat_, and subpatch_.
: releaseName_(releaseName), standardFormat_(false), major_(0), minor_(0), patch_(0), subpatch_(0) { int fields=sscanf(releaseName.c_str(),"CMSSW_%d_%d_%d_%d",&major_,&minor_,&patch_,&subpatch_); if (fields>=3) standardFormat_=true; }
std::string HcalCaloFlagTool::getFieldName | ( | HcalSubdetector | sd, |
int | bit | ||
) | const |
Definition at line 17 of file HcalCaloFlagLabels.cc.
{ return ""; }
int HcalCaloFlagTool::getFieldStart | ( | HcalSubdetector | sd, |
const std::string & | field | ||
) | const |
Definition at line 25 of file HcalCaloFlagLabels.cc.
{
return 0;
}
int HcalCaloFlagTool::getFieldWidth | ( | HcalSubdetector | sd, |
int | bit | ||
) | const |
int HcalCaloFlagTool::getFieldWidth | ( | HcalSubdetector | sd, |
const std::string & | field | ||
) | const |
Definition at line 29 of file HcalCaloFlagLabels.cc.
{
return 0;
}
bool HcalCaloFlagTool::hasField | ( | HcalSubdetector | sd, |
int | bit | ||
) | const |
Definition at line 40 of file HcalCaloFlagLabels.cc.
References getFieldWidth(), major_, and standardFormat_.
{ if (standardFormat_) { if (major_<3) return false; } return getFieldWidth(sd,bit)>0; }
bool HcalCaloFlagTool::hasField | ( | HcalSubdetector | sd, |
const std::string & | field | ||
) | const |
Definition at line 33 of file HcalCaloFlagLabels.cc.
References getFieldWidth(), major_, and standardFormat_.
{ if (standardFormat_) { if (major_<3) return false; } return getFieldWidth(sd,field)>0; }
int HcalCaloFlagTool::major_ [private] |
Definition at line 72 of file HcalCaloFlagLabels.h.
Referenced by hasField(), and HcalCaloFlagTool().
int HcalCaloFlagTool::minor_ [private] |
Definition at line 72 of file HcalCaloFlagLabels.h.
Referenced by HcalCaloFlagTool().
int HcalCaloFlagTool::patch_ [private] |
Definition at line 72 of file HcalCaloFlagLabels.h.
Referenced by HcalCaloFlagTool().
std::string HcalCaloFlagTool::releaseName_ [private] |
Definition at line 70 of file HcalCaloFlagLabels.h.
bool HcalCaloFlagTool::standardFormat_ [private] |
Definition at line 71 of file HcalCaloFlagLabels.h.
Referenced by hasField(), and HcalCaloFlagTool().
int HcalCaloFlagTool::subpatch_ [private] |
Definition at line 72 of file HcalCaloFlagLabels.h.
Referenced by HcalCaloFlagTool().