CMS 3D CMS Logo

HcalCaloFlagTool.cc
Go to the documentation of this file.
2 #include <cstring>
3 #include <cstdio>
4 
6  : releaseName_(releaseName), standardFormat_(false), major_(0), minor_(0), patch_(0), subpatch_(0) {
7  int fields = sscanf(releaseName.c_str(), "CMSSW_%d_%d_%d_%d", &major_, &minor_, &patch_, &subpatch_);
8  if (fields >= 3)
9  standardFormat_ = true;
10 }
11 
13 
14 int HcalCaloFlagTool::getFieldWidth(HcalSubdetector sd, int bit) const { return 0; }
15 
16 int HcalCaloFlagTool::getFieldStart(HcalSubdetector sd, const std::string& field) const { return 0; }
17 
18 int HcalCaloFlagTool::getFieldWidth(HcalSubdetector sd, const std::string& field) const { return 0; }
19 
21  if (standardFormat_) {
22  if (major_ < 3)
23  return false;
24  }
25  return getFieldWidth(sd, field) > 0;
26 }
27 
29  if (standardFormat_) {
30  if (major_ < 3)
31  return false;
32  }
33  return getFieldWidth(sd, bit) > 0;
34 }
HcalCaloFlagTool::standardFormat_
bool standardFormat_
Definition: HcalCaloFlagTool.h:24
funct::false
false
Definition: Factorize.h:34
HcalCaloFlagTool.h
HcalCaloFlagTool::hasField
bool hasField(HcalSubdetector sd, const std::string &field) const
Definition: HcalCaloFlagTool.cc:20
HcalCaloFlagTool::getFieldName
std::string getFieldName(HcalSubdetector sd, int bit) const
Definition: HcalCaloFlagTool.cc:12
HcalCaloFlagTool::major_
int major_
Definition: HcalCaloFlagTool.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalCaloFlagTool::HcalCaloFlagTool
HcalCaloFlagTool(const std::string &releaseName)
Definition: HcalCaloFlagTool.cc:5
HcalCaloFlagTool::patch_
int patch_
Definition: HcalCaloFlagTool.h:25
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalCaloFlagTool::getFieldStart
int getFieldStart(HcalSubdetector sd, const std::string &field) const
Definition: HcalCaloFlagTool.cc:16
HcalCaloFlagTool::getFieldWidth
int getFieldWidth(HcalSubdetector sd, int bit) const
Definition: HcalCaloFlagTool.cc:14
sd
double sd
Definition: CascadeWrapper.h:113
HcalCaloFlagTool::minor_
int minor_
Definition: HcalCaloFlagTool.h:25
l1GtPatternGenerator_cfi.fields
fields
Definition: l1GtPatternGenerator_cfi.py:91
HcalCaloFlagTool::subpatch_
int subpatch_
Definition: HcalCaloFlagTool.h:25