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
 
void beginJob () override
 
 SonicOneEDAnalyzer (edm::ParameterSet const &cfg, const std::string &debugName, bool verbose=true)
 
 ~SonicOneEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< Capabilities... >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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 makeClient ()
 
- 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

std::unique_ptr< Client > client_
 
edm::ParameterSet clientPset_
 
std::string debugName_
 
bool verbose_
 

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,
const std::string &  debugName,
bool  verbose = true 
)
inline

Definition at line 24 of file SonicOneEDAnalyzer.h.

25  : clientPset_(cfg.getParameterSet("Client")), debugName_(debugName), verbose_(verbose) {
26  //ExternalWork is not compatible with one modules, so Sync mode is enforced
27  if (clientPset_.getParameter<std::string>("mode") != "Sync") {
28  edm::LogWarning("ResetClientMode") << "Resetting client mode to Sync for SonicOneEDAnalyzer";
29  clientPset_.addParameter<std::string>("mode", "Sync");
30  }
31  }

◆ ~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 42 of file SonicOneEDAnalyzer.h.

42  {
44  acquire(iEvent, iSetup, client_->input());
45  if (verbose_)
46  sonic_utils::printDebugTime(debugName_, "acquire() time: ", t0);
47 
48  //pattern similar to ExternalWork, but blocking
50  client_->dispatch();
51 
52  //measure time between acquire and produce
53  if (verbose_)
54  sonic_utils::printDebugTime(debugName_, "dispatch() time: ", t1);
55 
57  analyze(iEvent, iSetup, client_->output());
58  if (verbose_)
59  sonic_utils::printDebugTime(debugName_, "analyze() time: ", t2);
60 
61  //reset client data
62  client_->reset();
63  }

Referenced by SonicOneEDAnalyzer< TritonClient, Capabilities... >::analyze().

◆ 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

◆ beginJob()

template<typename Client, typename... Capabilities>
void SonicOneEDAnalyzer< Client, Capabilities >::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 37 of file SonicOneEDAnalyzer.h.

37 { makeClient(); }

◆ makeClient()

template<typename Client, typename... Capabilities>
void SonicOneEDAnalyzer< Client, Capabilities >::makeClient ( )
inlineprotected

Definition at line 68 of file SonicOneEDAnalyzer.h.

68 { client_ = std::make_unique<Client>(clientPset_, debugName_); }

Referenced by SonicOneEDAnalyzer< TritonClient, Capabilities... >::beginJob().

Member Data Documentation

◆ client_

template<typename Client, typename... Capabilities>
std::unique_ptr<Client> SonicOneEDAnalyzer< Client, Capabilities >::client_
protected

◆ clientPset_

template<typename Client, typename... Capabilities>
edm::ParameterSet SonicOneEDAnalyzer< Client, Capabilities >::clientPset_
protected

◆ debugName_

template<typename Client, typename... Capabilities>
std::string SonicOneEDAnalyzer< Client, Capabilities >::debugName_
protected

◆ verbose_

template<typename Client, typename... Capabilities>
bool SonicOneEDAnalyzer< Client, Capabilities >::verbose_
protected
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
SonicOneEDAnalyzer::client_
std::unique_ptr< Client > client_
Definition: SonicOneEDAnalyzer.h:72
submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
SonicOneEDAnalyzer::debugName_
std::string debugName_
Definition: SonicOneEDAnalyzer.h:73
sonic_utils::printDebugTime
void printDebugTime(std::string_view debugName, std::string_view msg, const TimePoint &t0)
Definition: sonic_utils.cc:8
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:149
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
SonicOneEDAnalyzer::clientPset_
edm::ParameterSet clientPset_
Definition: SonicOneEDAnalyzer.h:71
SonicOneEDAnalyzer::analyze
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) final
Definition: SonicOneEDAnalyzer.h:42
SonicOneEDAnalyzer::makeClient
void makeClient()
Definition: SonicOneEDAnalyzer.h:68
edm::ParameterSet::addParameter
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
iEvent
int iEvent
Definition: GenABIO.cc:224
SonicOneEDAnalyzer::verbose_
bool verbose_
Definition: SonicOneEDAnalyzer.h:74
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SonicOneEDAnalyzer::acquire
virtual void acquire(edm::Event const &iEvent, edm::EventSetup const &iSetup, Input &iInput)=0