CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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, const std::string &debugName="", bool verbose=true)
 
 ~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

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

Definition at line 18 of file SonicAcquirer.h.

Constructor & Destructor Documentation

template<typename Client, typename Module>
SonicAcquirer< Client, Module >::SonicAcquirer ( edm::ParameterSet const &  cfg,
const std::string &  debugName = "",
bool  verbose = true 
)
inline

Definition at line 20 of file SonicAcquirer.h.

21  : clientPset_(cfg.getParameterSet("Client")), debugName_(debugName), verbose_(verbose) {}
tuple cfg
Definition: looper.py:296
static constexpr int verbose
std::string debugName_
Definition: SonicAcquirer.h:48
edm::ParameterSet clientPset_
Definition: SonicAcquirer.h:46
template<typename Client, typename Module>
SonicAcquirer< Client, Module >::~SonicAcquirer ( )
overridedefault

Member Function Documentation

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 31 of file SonicAcquirer.h.

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

31  {
33  acquire(iEvent, iSetup, client_->input());
34  if (verbose_)
35  sonic_utils::printDebugTime(debugName_, "acquire() time: ", t0);
37  client_->dispatch(holder);
38  }
std::chrono::time_point< std::chrono::high_resolution_clock > t_dispatch_
Definition: SonicAcquirer.h:50
int iEvent
Definition: GenABIO.cc:224
std::string debugName_
Definition: SonicAcquirer.h:48
void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, edm::WaitingTaskWithArenaHolder holder) final
Definition: SonicAcquirer.h:31
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:47
template<typename Client, typename Module>
virtual void SonicAcquirer< Client, Module >::acquire ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup,
Input iInput 
)
pure virtual
template<typename Client, typename Module>
void SonicAcquirer< Client, Module >::beginStream ( edm::StreamID  )
inlineoverride

Definition at line 27 of file SonicAcquirer.h.

27 { makeClient(); }
void makeClient()
Definition: SonicAcquirer.h:43
template<typename Client, typename Module>
void SonicAcquirer< Client, Module >::makeClient ( )
inlineprotected

Definition at line 43 of file SonicAcquirer.h.

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

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

Member Data Documentation

template<typename Client, typename Module>
std::unique_ptr<Client> SonicAcquirer< Client, Module >::client_
protected
template<typename Client, typename Module>
edm::ParameterSet SonicAcquirer< Client, Module >::clientPset_
protected
template<typename Client, typename Module>
std::string SonicAcquirer< Client, Module >::debugName_
protected
template<typename Client, typename Module>
std::chrono::time_point<std::chrono::high_resolution_clock> SonicAcquirer< Client, Module >::t_dispatch_
protected
template<typename Client, typename Module>
bool SonicAcquirer< Client, Module >::verbose_
protected