CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HcalCaloFlagTool Class Reference

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, int bit) const
 
int getFieldWidth (HcalSubdetector sd, const std::string &field) 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_.

5  :
6  releaseName_(releaseName),
7  standardFormat_(false),
8  major_(0),
9  minor_(0),
10  patch_(0),
11  subpatch_(0)
12 {
13  int fields=sscanf(releaseName.c_str(),"CMSSW_%d_%d_%d_%d",&major_,&minor_,&patch_,&subpatch_);
14  if (fields>=3) standardFormat_=true;
15 }
std::string releaseName_

Member Function Documentation

std::string HcalCaloFlagTool::getFieldName ( HcalSubdetector  sd,
int  bit 
) const

Definition at line 17 of file HcalCaloFlagLabels.cc.

17  {
18  return "";
19 }
int HcalCaloFlagTool::getFieldStart ( HcalSubdetector  sd,
const std::string &  field 
) const

Definition at line 25 of file HcalCaloFlagLabels.cc.

25  {
26  return 0;
27 }
int HcalCaloFlagTool::getFieldWidth ( HcalSubdetector  sd,
int  bit 
) const

Definition at line 21 of file HcalCaloFlagLabels.cc.

Referenced by hasField().

21  {
22  return 0;
23 }
int HcalCaloFlagTool::getFieldWidth ( HcalSubdetector  sd,
const std::string &  field 
) const

Definition at line 29 of file HcalCaloFlagLabels.cc.

29  {
30  return 0;
31 }
bool HcalCaloFlagTool::hasField ( HcalSubdetector  sd,
const std::string &  field 
) const

Definition at line 33 of file HcalCaloFlagLabels.cc.

References getFieldWidth(), major_, and standardFormat_.

33  {
34  if (standardFormat_) {
35  if (major_<3) return false;
36  }
37  return getFieldWidth(sd,field)>0;
38 }
int getFieldWidth(HcalSubdetector sd, int bit) const
double sd
bool HcalCaloFlagTool::hasField ( HcalSubdetector  sd,
int  bit 
) const

Definition at line 40 of file HcalCaloFlagLabels.cc.

References getFieldWidth(), major_, and standardFormat_.

40  {
41  if (standardFormat_) {
42  if (major_<3) return false;
43  }
44  return getFieldWidth(sd,bit)>0;
45 }
int getFieldWidth(HcalSubdetector sd, int bit) const
double sd

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.

bool HcalCaloFlagTool::standardFormat_
private

Definition at line 75 of file HcalCaloFlagLabels.h.

Referenced by hasField(), and HcalCaloFlagTool().

int HcalCaloFlagTool::subpatch_
private

Definition at line 76 of file HcalCaloFlagLabels.h.

Referenced by HcalCaloFlagTool().