CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
SonicEDProducer< Client, Capabilities > Class Template Referenceabstract

#include <SonicEDProducer.h>

Inheritance diagram for SonicEDProducer< Client, Capabilities >:
edm::stream::EDProducer< edm::ExternalWork, Capabilities... >

Public Types

typedef Client::Input Input
 
typedef Client::Output Output
 
- Public Types inherited from edm::stream::EDProducer< edm::ExternalWork, Capabilities... >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Public Member Functions

void acquire (edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder holder) final
 
virtual void acquire (edm::Event const &iEvent, edm::EventSetup const &iSetup, Input &iInput)=0
 
void produce (edm::Event &iEvent, edm::EventSetup const &iSetup) final
 
virtual void produce (edm::Event &iEvent, edm::EventSetup const &iSetup, Output const &iOutput)=0
 
 SonicEDProducer (edm::ParameterSet const &cfg)
 
 ~SonicEDProducer () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::ExternalWork, Capabilities... >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Protected Member Functions

void setDebugName (const std::string &debugName)
 

Protected Attributes

Client client_
 

Detailed Description

template<typename Client, typename... Capabilities>
class SonicEDProducer< Client, Capabilities >

Definition at line 17 of file SonicEDProducer.h.

Member Typedef Documentation

◆ Input

template<typename Client , typename... Capabilities>
typedef Client::Input SonicEDProducer< Client, Capabilities >::Input

Definition at line 20 of file SonicEDProducer.h.

◆ Output

template<typename Client , typename... Capabilities>
typedef Client::Output SonicEDProducer< Client, Capabilities >::Output

Definition at line 21 of file SonicEDProducer.h.

Constructor & Destructor Documentation

◆ SonicEDProducer()

template<typename Client , typename... Capabilities>
SonicEDProducer< Client, Capabilities >::SonicEDProducer ( edm::ParameterSet const &  cfg)
inline

Definition at line 23 of file SonicEDProducer.h.

23 : client_(cfg.getParameter<edm::ParameterSet>("Client")) {}

◆ ~SonicEDProducer()

template<typename Client , typename... Capabilities>
SonicEDProducer< Client, Capabilities >::~SonicEDProducer ( )
overridedefault

Member Function Documentation

◆ acquire() [1/2]

template<typename Client , typename... Capabilities>
void SonicEDProducer< Client, Capabilities >::acquire ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup,
edm::WaitingTaskWithArenaHolder  holder 
)
inlinefinal

Definition at line 29 of file SonicEDProducer.h.

29  {
31  acquire(iEvent, iSetup, client_.input());
33  if (!client_.debugName().empty())
34  edm::LogInfo(client_.debugName()) << "Load time: "
35  << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count();
36  client_.dispatch(holder);
37  }

References SonicEDProducer< Client, Capabilities >::client_, iEvent, fileCollector::now, FrontierCondition_GT_autoExpress_cfi::t0, and RandomServiceHelper::t1.

◆ acquire() [2/2]

template<typename Client , typename... Capabilities>
virtual void SonicEDProducer< Client, Capabilities >::acquire ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup,
Input iInput 
)
pure virtual

◆ produce() [1/2]

template<typename Client , typename... Capabilities>
void SonicEDProducer< Client, Capabilities >::produce ( edm::Event iEvent,
edm::EventSetup const &  iSetup 
)
inlinefinal

Definition at line 40 of file SonicEDProducer.h.

40  {
41  //todo: measure time between acquire and produce
42  produce(iEvent, iSetup, client_.output());
43  }

References SonicEDProducer< Client, Capabilities >::client_, and iEvent.

◆ produce() [2/2]

template<typename Client , typename... Capabilities>
virtual void SonicEDProducer< Client, Capabilities >::produce ( edm::Event iEvent,
edm::EventSetup const &  iSetup,
Output const &  iOutput 
)
pure virtual

◆ setDebugName()

template<typename Client , typename... Capabilities>
void SonicEDProducer< Client, Capabilities >::setDebugName ( const std::string &  debugName)
inlineprotected

Definition at line 48 of file SonicEDProducer.h.

48 { client_.setDebugName(debugName); }

References SonicEDProducer< Client, Capabilities >::client_.

Member Data Documentation

◆ client_

template<typename Client , typename... Capabilities>
Client SonicEDProducer< Client, Capabilities >::client_
protected
SonicEDProducer::acquire
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder holder) final
Definition: SonicEDProducer.h:29
edm::LogInfo
Definition: MessageLogger.h:254
SonicEDProducer::client_
Client client_
Definition: SonicEDProducer.h:50
fileCollector.now
now
Definition: fileCollector.py:207
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
SonicEDProducer::produce
void produce(edm::Event &iEvent, edm::EventSetup const &iSetup) final
Definition: SonicEDProducer.h:40
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
edm::ParameterSet
Definition: ParameterSet.h:36
iEvent
int iEvent
Definition: GenABIO.cc:224
looper.cfg
cfg
Definition: looper.py:297