CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EventStringOutputFields Class Reference

#include <EventStringOutputFields.h>

Public Member Functions

void createFields (RNTupleModel &model)
 
 EventStringOutputFields ()=default
 
void fill (const edm::EventForOutput &iEvent)
 
void registerToken (const edm::EDGetToken &token)
 

Private Attributes

RNTupleFieldPtr< std::vector< std::string > > m_evstrings
 
long m_lastLumi = -1
 
std::vector< edm::EDGetTokenm_tokens
 

Detailed Description

Definition at line 13 of file EventStringOutputFields.h.

Constructor & Destructor Documentation

◆ EventStringOutputFields()

EventStringOutputFields::EventStringOutputFields ( )
default

Member Function Documentation

◆ createFields()

void EventStringOutputFields::createFields ( RNTupleModel &  model)

◆ fill()

void EventStringOutputFields::fill ( const edm::EventForOutput iEvent)

Definition at line 10 of file EventStringOutputFields.cc.

References RNTupleFieldPtr< T >::fill(), patZpeak::handle, iEvent, m_evstrings, m_lastLumi, m_tokens, AlCaHLTBitMon_QueryRunRegistry::string, and submitPVValidationJobs::t.

Referenced by NanoAODRNTupleOutputModule::write().

10  {
11  std::vector<std::string> evstrings;
12  if (m_lastLumi != iEvent.id().luminosityBlock()) {
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 }
void fill(const T &value)
RNTupleFieldPtr< std::vector< std::string > > m_evstrings
int iEvent
Definition: GenABIO.cc:224
std::vector< edm::EDGetToken > m_tokens

◆ registerToken()

void EventStringOutputFields::registerToken ( const edm::EDGetToken token)

Member Data Documentation

◆ m_evstrings

RNTupleFieldPtr<std::vector<std::string> > EventStringOutputFields::m_evstrings
private

Definition at line 16 of file EventStringOutputFields.h.

Referenced by createFields(), and fill().

◆ m_lastLumi

long EventStringOutputFields::m_lastLumi = -1
private

Definition at line 17 of file EventStringOutputFields.h.

Referenced by fill().

◆ m_tokens

std::vector<edm::EDGetToken> EventStringOutputFields::m_tokens
private

Definition at line 15 of file EventStringOutputFields.h.

Referenced by fill(), and registerToken().