CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalCaloFlagTool Class Reference

Provides interpretation of flag bits with understanding of CMSSW version dependence. More...

#include <HcalCaloFlagLabels.h>

List of all members.

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_

Detailed Description

Provides interpretation of flag bits with understanding of CMSSW version dependence.

Definition at line 64 of file HcalCaloFlagLabels.h.


Constructor & Destructor Documentation

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;
}

Member Function Documentation

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

Definition at line 21 of file HcalCaloFlagLabels.cc.

Referenced by hasField().

                                                                     {
  return 0;
}
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;
}

Member Data Documentation

int HcalCaloFlagTool::major_ [private]

Definition at line 76 of file HcalCaloFlagLabels.h.

Referenced by hasField(), and HcalCaloFlagTool().

int HcalCaloFlagTool::minor_ [private]

Definition at line 76 of file HcalCaloFlagLabels.h.

Referenced by HcalCaloFlagTool().

int HcalCaloFlagTool::patch_ [private]

Definition at line 76 of file HcalCaloFlagLabels.h.

Referenced by HcalCaloFlagTool().

std::string HcalCaloFlagTool::releaseName_ [private]

Definition at line 74 of file HcalCaloFlagLabels.h.

Definition at line 75 of file HcalCaloFlagLabels.h.

Referenced by hasField(), and HcalCaloFlagTool().

Definition at line 76 of file HcalCaloFlagLabels.h.

Referenced by HcalCaloFlagTool().