CMS 3D CMS Logo

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

#include <SonicAcquirer.h>

Inheritance diagram for SonicAcquirer< Client, Module >:

Public Types

typedef Client::Input Input
 

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 beginStream (edm::StreamID) override
 
 SonicAcquirer (edm::ParameterSet const &cfg)
 
 ~SonicAcquirer () override=default
 

Protected Member Functions

void makeClient ()
 

Protected Attributes

std::unique_ptr< Client > client_
 
edm::ParameterSet clientPset_
 
std::string debugName_
 
std::chrono::time_point< std::chrono::high_resolution_clock > t_dispatch_
 
bool verbose_
 

Detailed Description

template<typename Client, typename Module>
class SonicAcquirer< Client, Module >

Definition at line 15 of file SonicAcquirer.h.

Member Typedef Documentation

◆ Input

template<typename Client, typename Module>
typedef Client::Input SonicAcquirer< Client, Module >::Input

Definition at line 18 of file SonicAcquirer.h.

Constructor & Destructor Documentation

◆ SonicAcquirer()

template<typename Client, typename Module>
SonicAcquirer< Client, Module >::SonicAcquirer ( edm::ParameterSet const &  cfg)
inline

Definition at line 20 of file SonicAcquirer.h.

21  : clientPset_(cfg.getParameterSet("Client")),
22  debugName_(cfg.getParameter<std::string>("@module_label")),
23  verbose_(clientPset_.getUntrackedParameter<bool>("verbose")) {}
T getUntrackedParameter(std::string const &, T const &) const
std::string debugName_
Definition: SonicAcquirer.h:50
edm::ParameterSet clientPset_
Definition: SonicAcquirer.h:48

◆ ~SonicAcquirer()

template<typename Client, typename Module>
SonicAcquirer< Client, Module >::~SonicAcquirer ( )
overridedefault

Member Function Documentation

◆ acquire() [1/2]

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

Definition at line 33 of file SonicAcquirer.h.

Referenced by SonicAcquirer< TritonClient, edm::stream::EDProducer< edm::ExternalWork, Capabilities... > >::acquire().

33  {
35  acquire(iEvent, iSetup, client_->input());
36  if (verbose_)
37  sonic_utils::printDebugTime(debugName_, "acquire() time: ", t0);
39  client_->dispatch(holder);
40  }
std::chrono::time_point< std::chrono::high_resolution_clock > t_dispatch_
Definition: SonicAcquirer.h:52
int iEvent
Definition: GenABIO.cc:224
std::string debugName_
Definition: SonicAcquirer.h:50
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder holder) final
Definition: SonicAcquirer.h:33
void printDebugTime(std::string_view debugName, std::string_view msg, const TimePoint &t0)
Definition: sonic_utils.cc:8
std::unique_ptr< Client > client_
Definition: SonicAcquirer.h:49

◆ acquire() [2/2]

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

◆ beginStream()

template<typename Client, typename Module>
void SonicAcquirer< Client, Module >::beginStream ( edm::StreamID  )
inlineoverride

Definition at line 29 of file SonicAcquirer.h.

29 { makeClient(); }
void makeClient()
Definition: SonicAcquirer.h:45

◆ makeClient()

template<typename Client, typename Module>
void SonicAcquirer< Client, Module >::makeClient ( )
inlineprotected

Definition at line 45 of file SonicAcquirer.h.

Referenced by SonicAcquirer< TritonClient, edm::stream::EDProducer< edm::ExternalWork, Capabilities... > >::beginStream().

45 { client_ = std::make_unique<Client>(clientPset_, debugName_); }
std::string debugName_
Definition: SonicAcquirer.h:50
edm::ParameterSet clientPset_
Definition: SonicAcquirer.h:48
std::unique_ptr< Client > client_
Definition: SonicAcquirer.h:49

Member Data Documentation

◆ client_

template<typename Client, typename Module>
std::unique_ptr<Client> SonicAcquirer< Client, Module >::client_
protected

◆ clientPset_

template<typename Client, typename Module>
edm::ParameterSet SonicAcquirer< Client, Module >::clientPset_
protected

◆ debugName_

template<typename Client, typename Module>
std::string SonicAcquirer< Client, Module >::debugName_
protected

◆ t_dispatch_

template<typename Client, typename Module>
std::chrono::time_point<std::chrono::high_resolution_clock> SonicAcquirer< Client, Module >::t_dispatch_
protected

◆ verbose_

template<typename Client, typename Module>
bool SonicAcquirer< Client, Module >::verbose_
protected