CMS 3D CMS Logo

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

#include <SonicOneEDAnalyzer.h>

Inheritance diagram for SonicOneEDAnalyzer< Client, Capabilities >:
edm::one::EDAnalyzer< Capabilities... > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef Client::Input Input
 
typedef Client::Output Output
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

virtual void acquire (edm::Event const &iEvent, edm::EventSetup const &iSetup, Input &iInput)=0
 
void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) final
 
virtual void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup, Output const &iOutput)=0
 
 SonicOneEDAnalyzer (edm::ParameterSet const &cfg)
 
 ~SonicOneEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< Capabilities... >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void setDebugName (const std::string &debugName)
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Protected Attributes

Client client_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

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

Definition at line 18 of file SonicOneEDAnalyzer.h.

Member Typedef Documentation

◆ Input

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

Definition at line 21 of file SonicOneEDAnalyzer.h.

◆ Output

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

Definition at line 22 of file SonicOneEDAnalyzer.h.

Constructor & Destructor Documentation

◆ SonicOneEDAnalyzer()

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

Definition at line 24 of file SonicOneEDAnalyzer.h.

24  : client_(cfg.getParameter<edm::ParameterSet>("Client")) {
25  //ExternalWork is not compatible with one modules, so Sync mode is enforced
26  if (client_.mode() != SonicMode::Sync)
27  throw cms::Exception("UnsupportedMode") << "SonicOneEDAnalyzer can only use Sync mode for clients";
28  }

References SonicOneEDAnalyzer< Client, Capabilities >::client_, and Sync.

◆ ~SonicOneEDAnalyzer()

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

Member Function Documentation

◆ acquire()

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

◆ analyze() [1/2]

template<typename Client , typename... Capabilities>
void SonicOneEDAnalyzer< Client, Capabilities >::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
inlinefinalvirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 35 of file SonicOneEDAnalyzer.h.

35  {
37  acquire(iEvent, iSetup, client_.input());
38  sonic_utils::printDebugTime(client_.debugName(), "acquire() time: ", t0);
39 
40  //pattern similar to ExternalWork, but blocking
42  client_.dispatch();
43 
44  //measure time between acquire and produce
45  sonic_utils::printDebugTime(client_.debugName(), "dispatch() time: ", t1);
46 
48  analyze(iEvent, iSetup, client_.output());
49  sonic_utils::printDebugTime(client_.debugName(), "analyze() time: ", t2);
50 
51  //reset client data
52  client_.reset();
53  }

References SonicOneEDAnalyzer< Client, Capabilities >::acquire(), SonicOneEDAnalyzer< Client, Capabilities >::client_, iEvent, submitPVValidationJobs::now, sonic_utils::printDebugTime(), FrontierCondition_GT_autoExpress_cfi::t0, RandomServiceHelper::t1, and RandomServiceHelper::t2.

◆ analyze() [2/2]

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

◆ setDebugName()

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

Definition at line 58 of file SonicOneEDAnalyzer.h.

58 { client_.setDebugName(debugName); }

References SonicOneEDAnalyzer< Client, Capabilities >::client_.

Member Data Documentation

◆ client_

template<typename Client , typename... Capabilities>
Client SonicOneEDAnalyzer< Client, Capabilities >::client_
protected
SonicOneEDAnalyzer::client_
Client client_
Definition: SonicOneEDAnalyzer.h:60
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
sonic_utils::printDebugTime
void printDebugTime(std::string_view debugName, std::string_view msg, const TimePoint &t0)
Definition: sonic_utils.cc:8
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
SonicOneEDAnalyzer::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) final
Definition: SonicOneEDAnalyzer.h:35
SonicMode::Sync
edm::ParameterSet
Definition: ParameterSet.h:47
iEvent
int iEvent
Definition: GenABIO.cc:224
looper.cfg
cfg
Definition: looper.py:297
cms::Exception
Definition: Exception.h:70
SonicOneEDAnalyzer::acquire
virtual void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, Input &iInput)=0