src
PhysicsTools
NanoAOD
plugins
rntuple
EventStringOutputFields.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/EventForOutput.h
"
2
#include "
EventStringOutputFields.h
"
3
4
void
EventStringOutputFields::registerToken
(
const
edm::EDGetToken
&
token
) {
m_tokens
.push_back(
token
); }
5
6
void
EventStringOutputFields::createFields
(RNTupleModel &
model
) {
7
m_evstrings
=
RNTupleFieldPtr<std::vector<std::string>
>(
"EventStrings"
,
""
,
model
);
8
}
9
10
void
EventStringOutputFields::fill
(
const
edm::EventForOutput
&
iEvent
) {
11
std::vector<std::string> evstrings;
12
if
(
m_lastLumi
!=
iEvent
.id().luminosityBlock()) {
13
edm::Handle<std::string>
handle
;
14
for
(
const
auto
&
t
:
m_tokens
) {
15
iEvent
.getByToken(
t
,
handle
);
16
const
std::string
&evstr = *
handle
;
17
if
(!evstr.empty()) {
18
evstrings.push_back(evstr);
19
}
20
}
21
m_lastLumi
=
iEvent
.id().luminosityBlock();
22
}
23
m_evstrings
.
fill
(evstrings);
24
}
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:650
edm::Handle
Definition:
AssociativeIterator.h:50
RNTupleFieldPtr::fill
void fill(const T &value)
Definition:
RNTupleFieldPtr.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::EDGetToken
Definition:
EDGetToken.h:39
EventStringOutputFields::m_evstrings
RNTupleFieldPtr< std::vector< std::string > > m_evstrings
Definition:
EventStringOutputFields.h:16
iEvent
int iEvent
Definition:
GenABIO.cc:224
RNTupleFieldPtr
Definition:
RNTupleFieldPtr.h:8
patZpeak.handle
handle
Definition:
patZpeak.py:25
EventForOutput.h
EventStringOutputFields::m_lastLumi
long m_lastLumi
Definition:
EventStringOutputFields.h:17
edm::EventForOutput
Definition:
EventForOutput.h:50
EventStringOutputFields::createFields
void createFields(RNTupleModel &model)
Definition:
EventStringOutputFields.cc:6
EventStringOutputFields.h
EventStringOutputFields::m_tokens
std::vector< edm::EDGetToken > m_tokens
Definition:
EventStringOutputFields.h:15
EventStringOutputFields::fill
void fill(const edm::EventForOutput &iEvent)
Definition:
EventStringOutputFields.cc:10
EventStringOutputFields::registerToken
void registerToken(const edm::EDGetToken &token)
Definition:
EventStringOutputFields.cc:4
ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi.model
model
Definition:
ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi.py:11
unpackBuffers-CaloStage2.token
token
Definition:
unpackBuffers-CaloStage2.py:316
Generated for CMSSW Reference Manual by
1.8.14