test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DQM
HcalCommon
interface
Flag.h
Go to the documentation of this file.
1
#ifndef DQM_HcalCommon_Flag_h
2
#define DQM_HcalCommon_Flag_h
3
4
#include "
DQM/HcalCommon/interface/HcalCommonHeaders.h
"
5
6
namespace
hcaldqm
7
{
8
namespace
flag
9
{
10
//
11
// State Definition. In the increasing order of worsiness.
12
// States(as flags) can be added
13
// s1 + s2 = max(s1,s2) - that allows to set the worse of the 2
14
//
15
enum
State
16
{
17
fNONE
=0,
// No State - can't have... not used....
18
fNCDAQ
=1,
// not @cDAQ
19
fNA
= 2,
// Not Applicable
20
fGOOD
= 3,
// GOOD
21
fPROBLEMATIC
= 4,
// problem
22
fBAD
= 5,
// bad
23
fRESERVED
= 6,
// reserved
24
nState
= 7
25
};
26
27
struct
Flag
28
{
29
Flag
() :
30
_name
(
"SOMEFLAG"
),
_state
(
fNA
)
31
{}
32
Flag
(
std::string
const
&
name
,
State
s
=
fNA
):
33
_name
(name),
_state
(
s
)
34
{}
35
Flag
(
Flag
const
&
f
):
36
_name
(f.
_name
),
_state
(f.
_state
)
37
{}
38
39
//
40
// add 2 flags
41
//
42
Flag
operator+
(
Flag
const
&
f
)
43
{
44
return
Flag
(
_name
!=f.
_name
?
"SOMEFLAG"
:
_name
,
45
(
State
)(
std::max
(
_state
, f.
_state
)));
46
}
47
48
//
49
// add 2 flags and save
50
//
51
Flag
&
operator+=
(
Flag
const
&
f
)
52
{
53
_state
= (
State
)(
std::max
(
_state
, f.
_state
));
54
return
*
this
;
55
}
56
57
//
58
// compare 2 flags
59
//
60
bool
operator==
(
Flag
const
&
f
)
61
{
62
return
(
_state
==f.
_state
&&
_name
==f.
_name
);
63
}
64
65
//
66
// Assignment
67
//
68
Flag
&
operator=
(
Flag
const
&
f
)
69
{
70
_name
= f.
_name
;
71
_state
= f.
_state
;
72
return
*
this
;
73
}
74
75
// reset the state to NA
76
void
reset
() {
_state
=
fNA
;}
77
78
std::string
_name
;
79
State
_state
;
80
};
81
}
82
}
83
84
#endif
hcaldqm::flag::Flag::Flag
Flag(Flag const &f)
Definition:
Flag.h:35
hcaldqm::flag::nState
Definition:
Flag.h:24
hcaldqm::flag::fNONE
Definition:
Flag.h:17
hcaldqm::flag::Flag::_name
std::string _name
Definition:
Flag.h:78
hcaldqm::flag::Flag::_state
State _state
Definition:
Flag.h:79
hcaldqm::flag::Flag
Definition:
Flag.h:27
hcaldqm::flag::fBAD
Definition:
Flag.h:22
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:77
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
hcaldqm::flag::State
State
Definition:
Flag.h:15
hcaldqm::flag::fNA
Definition:
Flag.h:19
hcaldqm::flag::fGOOD
Definition:
Flag.h:20
hcaldqm::flag::Flag::reset
void reset()
Definition:
Flag.h:76
hcaldqm::flag::Flag::operator+
Flag operator+(Flag const &f)
Definition:
Flag.h:42
hcaldqm::flag::Flag::Flag
Flag()
Definition:
Flag.h:29
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
hcaldqm::flag::Flag::Flag
Flag(std::string const &name, State s=fNA)
Definition:
Flag.h:32
hcaldqm::flag::fRESERVED
Definition:
Flag.h:23
hcaldqm::flag::fNCDAQ
Definition:
Flag.h:18
hcaldqm::flag::Flag::operator==
bool operator==(Flag const &f)
Definition:
Flag.h:60
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
HcalCommonHeaders.h
hcaldqm::flag::Flag::operator=
Flag & operator=(Flag const &f)
Definition:
Flag.h:68
bookConverter.max
max
Definition:
bookConverter.py:166
hcaldqm::flag::Flag::operator+=
Flag & operator+=(Flag const &f)
Definition:
Flag.h:51
hcaldqm::flag::fPROBLEMATIC
Definition:
Flag.h:21
Generated for CMSSW Reference Manual by
1.8.5