Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
DataFormats
Luminosity
src
LumiInfoRunHeader.cc
Go to the documentation of this file.
1
#include "
DataFormats/Luminosity/interface/LumiInfoRunHeader.h
"
2
3
LumiInfoRunHeader::LumiInfoRunHeader
(
std::string
& lumiProvider,
4
std::string
& fillingSchemeName,
5
std::bitset<LumiConstants::numBX>& fillingScheme)
6
: lumiProvider_(lumiProvider), fillingSchemeName_(fillingSchemeName), fillingScheme_(fillingScheme) {
7
setBunchSpacing
();
8
}
9
10
bool
LumiInfoRunHeader::isProductEqual
(
LumiInfoRunHeader
const
&
o
)
const
{
11
return
(
lumiProvider_
== o.
lumiProvider_
&&
fillingSchemeName_
== o.
fillingSchemeName_
&&
12
fillingScheme_
== o.
fillingScheme_
);
13
}
14
15
//==============================================================================
16
17
void
LumiInfoRunHeader::setFillingScheme
(
const
std::bitset<LumiConstants::numBX>& fillingScheme) {
18
fillingScheme_
= fillingScheme;
19
setBunchSpacing
();
20
}
21
22
// This function determines the bunch spacing from the filling scheme
23
// and sets bunchSpacing_ accordingly.
24
25
void
LumiInfoRunHeader::setBunchSpacing
(
void
) {
26
int
lastFilledBunch = -1;
27
int
minimumSpacingFound =
LumiConstants::numBX
;
28
29
for
(
unsigned
int
i
= 0;
i
<
LumiConstants::numBX
;
i
++) {
30
if
(
fillingScheme_
[
i
]) {
31
if
(lastFilledBunch >= 0) {
32
int
thisSpacing = i - lastFilledBunch;
33
if
(thisSpacing < minimumSpacingFound)
34
minimumSpacingFound = thisSpacing;
35
}
36
lastFilledBunch =
i
;
37
}
38
}
39
40
// If no bunches are filled, then just leave bunchSpacing at 0
41
if
(lastFilledBunch == -1)
42
bunchSpacing_
= 0;
43
else
44
bunchSpacing_
=
LumiConstants::bxSpacingInt
* minimumSpacingFound;
45
}
mps_fire.i
i
Definition:
mps_fire.py:428
LumiInfoRunHeader::bunchSpacing_
int bunchSpacing_
Definition:
LumiInfoRunHeader.h:73
LumiInfoRunHeader::fillingScheme_
std::bitset< LumiConstants::numBX > fillingScheme_
Definition:
LumiInfoRunHeader.h:72
LumiConstants::numBX
static const unsigned int numBX
Definition:
LumiConstants.h:8
LumiInfoRunHeader.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
LumiConstants::bxSpacingInt
static const int bxSpacingInt
Definition:
LumiConstants.h:10
LumiInfoRunHeader::LumiInfoRunHeader
LumiInfoRunHeader()
Default constructor.
Definition:
LumiInfoRunHeader.h:26
LumiInfoRunHeader::setBunchSpacing
void setBunchSpacing()
Definition:
LumiInfoRunHeader.cc:25
LumiInfoRunHeader::lumiProvider_
std::string lumiProvider_
Definition:
LumiInfoRunHeader.h:70
LumiInfoRunHeader
Definition:
LumiInfoRunHeader.h:21
LumiInfoRunHeader::fillingSchemeName_
std::string fillingSchemeName_
Definition:
LumiInfoRunHeader.h:71
LumiInfoRunHeader::isProductEqual
bool isProductEqual(LumiInfoRunHeader const &o) const
Product compare function.
Definition:
LumiInfoRunHeader.cc:10
class-composition.o
tuple o
Definition:
class-composition.py:65
LumiInfoRunHeader::setFillingScheme
void setFillingScheme(const std::bitset< LumiConstants::numBX > &fillingScheme)
Set filling scheme.
Definition:
LumiInfoRunHeader.cc:17
Generated for CMSSW Reference Manual by
1.8.5