CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::RecordEventID< T > Class Template Reference

#include <PileUp.h>

Public Member Functions

bool operator() (EventPrincipal const &eventPrincipal, size_t fileNameHash)
 
 RecordEventID (std::vector< edm::SecondaryEventIDAndFileInfo > &ids, T &eventOperator)
 

Private Attributes

int eventCount
 
TeventOperator_
 
std::vector< edm::SecondaryEventIDAndFileInfo > & ids_
 

Detailed Description

template<typename T>
class edm::RecordEventID< T >

Definition at line 148 of file PileUp.h.

Constructor & Destructor Documentation

template<typename T>
edm::RecordEventID< T >::RecordEventID ( std::vector< edm::SecondaryEventIDAndFileInfo > &  ids,
T eventOperator 
)
inline

Definition at line 155 of file PileUp.h.

156  : ids_(ids), eventOperator_(eventOperator), eventCount(1) {
157  }
std::vector< edm::SecondaryEventIDAndFileInfo > & ids_
Definition: PileUp.h:151

Member Function Documentation

template<typename T>
bool edm::RecordEventID< T >::operator() ( EventPrincipal const &  eventPrincipal,
size_t  fileNameHash 
)
inline

Definition at line 158 of file PileUp.h.

References edm::EventPrincipal::id().

158  {
159  bool used = eventOperator_(eventPrincipal, eventCount);
160  if(used) {
161  ++eventCount;
162  ids_.emplace_back(eventPrincipal.id(), fileNameHash);
163  }
164  return used;
165  }
std::vector< edm::SecondaryEventIDAndFileInfo > & ids_
Definition: PileUp.h:151

Member Data Documentation

template<typename T>
int edm::RecordEventID< T >::eventCount
private

Definition at line 153 of file PileUp.h.

template<typename T>
T& edm::RecordEventID< T >::eventOperator_
private

Definition at line 152 of file PileUp.h.

template<typename T>
std::vector<edm::SecondaryEventIDAndFileInfo>& edm::RecordEventID< T >::ids_
private

Definition at line 151 of file PileUp.h.