IOPool
Input
src
OneLumiPoolSource.cc
Go to the documentation of this file.
1
/*----------------------------------------------------------------------
2
----------------------------------------------------------------------*/
3
#include "
PoolSource.h
"
4
#include "
FWCore/Framework/interface/InputSourceMacros.h
"
5
#include "
FWCore/Framework/interface/LuminosityBlockPrincipal.h
"
6
#include "
FWCore/Framework/interface/EventPrincipal.h
"
7
8
#include "
DataFormats/Provenance/interface/ProductRegistry.h
"
9
#include "
FWCore/Framework/interface/HistoryAppender.h
"
10
11
namespace
edm
{
12
13
class
OneLumiPoolSource
:
public
PoolSource
{
14
public
:
15
explicit
OneLumiPoolSource
(
ParameterSet
const
&
pset
,
InputSourceDescription
const
&
desc
);
16
17
private
:
18
ItemType
getNextItemType
()
override
;
19
std::shared_ptr<LuminosityBlockAuxiliary>
readLuminosityBlockAuxiliary_
()
override
;
20
21
void
readEvent_
(
EventPrincipal
& eventPrincipal)
override
{
22
PoolSource::readEvent_
(eventPrincipal);
23
eventPrincipal.
setRunAndLumiNumber
(eventPrincipal.
run
(), 1);
24
}
25
26
bool
seenFirstLumi_
=
false
;
27
};
28
29
OneLumiPoolSource::OneLumiPoolSource
(
ParameterSet
const
&
pset
,
InputSourceDescription
const
&
desc
)
30
:
PoolSource
(
pset
,
desc
) {}
31
32
std::shared_ptr<LuminosityBlockAuxiliary>
OneLumiPoolSource::readLuminosityBlockAuxiliary_
() {
33
auto
ret
=
PoolSource::readLuminosityBlockAuxiliary_
();
34
auto
hist
=
ret
->processHistoryID();
35
*
ret
=
LuminosityBlockAuxiliary
(
ret
->run(), 1,
ret
->beginTime(),
ret
->endTime());
36
ret
->setProcessHistoryID(
hist
);
37
return
ret
;
38
}
39
40
InputSource::ItemType
OneLumiPoolSource::getNextItemType
() {
41
auto
type
=
PoolSource::getNextItemType
();
42
if
(
type
==
IsLumi
) {
43
if
(
seenFirstLumi_
) {
44
do
{
45
edm::HistoryAppender
historyAppender;
46
auto
prodReg = std::make_shared<edm::ProductRegistry>();
47
prodReg->setFrozen();
48
edm::ProcessConfiguration
procConfig;
49
50
LuminosityBlockPrincipal
temp
(prodReg, procConfig, &historyAppender, 0);
51
readLuminosityBlock_
(
temp
);
52
type
=
PoolSource::getNextItemType
();
53
}
while
(
type
==
IsLumi
);
54
}
else
{
55
seenFirstLumi_
=
true
;
56
}
57
}
58
return
type
;
59
}
60
}
// namespace edm
61
using namespace
edm
;
62
63
DEFINE_FWK_INPUT_SOURCE
(
OneLumiPoolSource
);
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition:
runTheMatrix.py:373
edm::OneLumiPoolSource
Definition:
OneLumiPoolSource.cc:13
edm::PoolSource
Definition:
PoolSource.h:32
edm::OneLumiPoolSource::seenFirstLumi_
bool seenFirstLumi_
Definition:
OneLumiPoolSource.cc:26
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::LuminosityBlockPrincipal
Definition:
LuminosityBlockPrincipal.h:31
edm::PoolSource::readLuminosityBlock_
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal) override
Definition:
PoolSource.cc:195
edm::InputSourceDescription
Definition:
InputSourceDescription.h:20
ProductRegistry.h
edm::OneLumiPoolSource::getNextItemType
ItemType getNextItemType() override
Definition:
OneLumiPoolSource.cc:40
groupFilesInBlocks.temp
list temp
Definition:
groupFilesInBlocks.py:142
edm::EventPrincipal::setRunAndLumiNumber
void setRunAndLumiNumber(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition:
EventPrincipal.cc:170
PoolSource.h
edm::LuminosityBlockAuxiliary
Definition:
LuminosityBlockAuxiliary.h:15
edm::EventPrincipal
Definition:
EventPrincipal.h:46
compare.hist
hist
Definition:
compare.py:376
EventPrincipal.h
DEFINE_FWK_INPUT_SOURCE
#define DEFINE_FWK_INPUT_SOURCE(type)
Definition:
InputSourceMacros.h:8
edm::PoolSource::readLuminosityBlockAuxiliary_
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_() override
Definition:
PoolSource.cc:169
edm::OneLumiPoolSource::readEvent_
void readEvent_(EventPrincipal &eventPrincipal) override
Definition:
OneLumiPoolSource.cc:21
HistoryAppender.h
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::InputSource::IsLumi
Definition:
InputSource.h:78
type
type
Definition:
SiPixelVCal_PayloadInspector.cc:37
edm::PoolSource::readEvent_
void readEvent_(EventPrincipal &eventPrincipal) override
Definition:
PoolSource.cc:217
gainCalibHelper::gainCalibPI::type
type
Definition:
SiPixelGainCalibHelper.h:39
edm::OneLumiPoolSource::OneLumiPoolSource
OneLumiPoolSource(ParameterSet const &pset, InputSourceDescription const &desc)
Definition:
OneLumiPoolSource.cc:29
edm::HistoryAppender
Definition:
HistoryAppender.h:13
LuminosityBlockPrincipal.h
InputSourceMacros.h
edm::InputSource::ItemType
ItemType
Definition:
InputSource.h:78
edm::PoolSource::getNextItemType
ItemType getNextItemType() override
Definition:
PoolSource.cc:249
edm::EventPrincipal::run
RunNumber_t run() const
Definition:
EventPrincipal.h:110
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
edm::OneLumiPoolSource::readLuminosityBlockAuxiliary_
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_() override
Definition:
OneLumiPoolSource.cc:32
edm::ProcessConfiguration
Definition:
ProcessConfiguration.h:14
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
Generated for CMSSW Reference Manual by
1.8.16