DataFormats
METReco
src
HcalCaloFlagTool.cc
Go to the documentation of this file.
1
#include "
DataFormats/METReco/interface/HcalCaloFlagTool.h
"
2
#include <cstring>
3
#include <cstdio>
4
5
HcalCaloFlagTool::HcalCaloFlagTool
(
const
std::string
& releaseName)
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
12
std::string
HcalCaloFlagTool::getFieldName
(
HcalSubdetector
sd,
int
bit)
const
{
return
""
; }
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
20
bool
HcalCaloFlagTool::hasField
(
HcalSubdetector
sd,
const
std::string
& field)
const
{
21
if
(
standardFormat_
) {
22
if
(
major_
< 3)
23
return
false
;
24
}
25
return
getFieldWidth
(sd, field) > 0;
26
}
27
28
bool
HcalCaloFlagTool::hasField
(
HcalSubdetector
sd,
int
bit)
const
{
29
if
(
standardFormat_
) {
30
if
(
major_
< 3)
31
return
false
;
32
}
33
return
getFieldWidth
(sd, bit) > 0;
34
}
HcalCaloFlagTool::HcalCaloFlagTool
HcalCaloFlagTool(const std::string &releaseName)
Definition:
HcalCaloFlagTool.cc:5
l1GtPatternGenerator_cfi.fields
fields
Definition:
l1GtPatternGenerator_cfi.py:91
HcalCaloFlagTool.h
HcalCaloFlagTool::getFieldWidth
int getFieldWidth(HcalSubdetector sd, int bit) const
Definition:
HcalCaloFlagTool.cc:14
funct::false
false
Definition:
Factorize.h:29
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::subpatch_
int subpatch_
Definition:
HcalCaloFlagTool.h:25
HcalCaloFlagTool::patch_
int patch_
Definition:
HcalCaloFlagTool.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
HcalCaloFlagTool::getFieldStart
int getFieldStart(HcalSubdetector sd, const std::string &field) const
Definition:
HcalCaloFlagTool.cc:16
HcalCaloFlagTool::minor_
int minor_
Definition:
HcalCaloFlagTool.h:25
HcalSubdetector
HcalSubdetector
Definition:
HcalAssistant.h:31
HcalCaloFlagTool::standardFormat_
bool standardFormat_
Definition:
HcalCaloFlagTool.h:24
HcalCaloFlagTool::major_
int major_
Definition:
HcalCaloFlagTool.h:25
Generated for CMSSW Reference Manual by
1.8.14