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(const std::string &releaseName)
int getFieldWidth(HcalSubdetector sd, int bit) const
bool hasField(HcalSubdetector sd, const std::string &field) const
std::string getFieldName(HcalSubdetector sd, int bit) const
int getFieldStart(HcalSubdetector sd, const std::string &field) const
HcalSubdetector
Definition: HcalAssistant.h:31