CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::ESConsumesCollector Class Reference

#include "FWCore/Framework/interface/ESConsumesCollector.h"

Public Member Functions

template<typename Product >
auto consumes (ESInputTag const &tag)
 
template<typename Product , typename Record >
auto consumes (ESInputTag const &tag)
 
template<typename Product >
auto consumes (eventsetup::EventSetupRecordKey const &, ESInputTag const &tag)
 
 ESConsumesCollector ()=delete
 
 ESConsumesCollector (ESConsumesCollector const &)=default
 
 ESConsumesCollector (ESConsumesCollector &&)=default
 
ESConsumesCollectoroperator= (ESConsumesCollector const &)=default
 
ESConsumesCollectoroperator= (ESConsumesCollector &&)=default
 

Private Member Functions

 ESConsumesCollector (ESProducer *const iConsumer)
 

Private Attributes

edm::propagate_const< ESProducer * > m_consumer {nullptr}
 

Friends

class ESProducer
 

Detailed Description

Description: Helper class to gather consumes information for the EventSetup.

Usage: The constructor of an ESProducer module can get an instance of edm::ESConsumesCollector by calling consumesCollector() method. This instance can then be passed to helper classes in order to register the event-setup data the helper will request from an Event, LuminosityBlock or Run on behalf of the module.

Caveat: The ESConsumesCollector should be used during the time that modules are being constructed. It should not be saved and used later. It will not work if it is used to call the consumes function during beginJob, beginRun, beginLuminosity block, event processing or at any later time. As of now, an ESConsumesCollector is provided for only ESProducer subclasses–i.e. those that call setWhatProduced(this, ...).

Definition at line 38 of file ESConsumesCollector.h.

Constructor & Destructor Documentation

edm::ESConsumesCollector::ESConsumesCollector ( )
delete
edm::ESConsumesCollector::ESConsumesCollector ( ESConsumesCollector const &  )
default
edm::ESConsumesCollector::ESConsumesCollector ( ESConsumesCollector &&  )
default
edm::ESConsumesCollector::ESConsumesCollector ( ESProducer *const  iConsumer)
inlineexplicitprivate

Definition at line 67 of file ESConsumesCollector.h.

67  :
68  m_consumer{iConsumer}
69  {}
edm::propagate_const< ESProducer * > m_consumer

Member Function Documentation

template<typename Product >
auto edm::ESConsumesCollector::consumes ( ESInputTag const &  tag)
inline

Definition at line 49 of file ESConsumesCollector.h.

49  {
50  return ESGetTokenT<Product>{tag};
51  }
template<typename Product , typename Record >
auto edm::ESConsumesCollector::consumes ( ESInputTag const &  tag)
inline

Definition at line 54 of file ESConsumesCollector.h.

54  {
55  return ESGetTokenT<Product>{tag};
56  }
template<typename Product >
auto edm::ESConsumesCollector::consumes ( eventsetup::EventSetupRecordKey const &  ,
ESInputTag const &  tag 
)
inline

Definition at line 59 of file ESConsumesCollector.h.

59  {
60  return ESGetTokenT<Product>{tag};
61  }
ESConsumesCollector& edm::ESConsumesCollector::operator= ( ESConsumesCollector const &  )
default
ESConsumesCollector& edm::ESConsumesCollector::operator= ( ESConsumesCollector &&  )
default

Friends And Related Function Documentation

friend class ESProducer
friend

Definition at line 65 of file ESConsumesCollector.h.

Member Data Documentation

edm::propagate_const<ESProducer*> edm::ESConsumesCollector::m_consumer {nullptr}
private

Definition at line 72 of file ESConsumesCollector.h.