CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::test::EventFromSource Class Reference

#include <EventFromSource.h>

Public Member Functions

EventAuxiliary const & aux () const
 
EventNumber_t event () const
 
 EventFromSource (EventPrincipal const &iPrincipal, edm::ServiceToken iToken)
 
template<typename T >
TestHandle< Tget (std::string const &iModule, std::string const &iInstanceLabel, std::string const &iProcess) const
 
LuminosityBlockNumber_t luminosityBlock () const
 
RunNumber_t run () const
 

Private Attributes

EventPrincipal const * principal_
 
edm::ServiceToken token_
 

Detailed Description

Definition at line 38 of file EventFromSource.h.

Constructor & Destructor Documentation

◆ EventFromSource()

edm::test::EventFromSource::EventFromSource ( EventPrincipal const &  iPrincipal,
edm::ServiceToken  iToken 
)
inline

Definition at line 40 of file EventFromSource.h.

41  : principal_(&iPrincipal), token_(iToken) {}
edm::ServiceToken token_
EventPrincipal const * principal_

Member Function Documentation

◆ aux()

EventAuxiliary const& edm::test::EventFromSource::aux ( ) const
inline

Definition at line 64 of file EventFromSource.h.

References edm::EventPrincipal::aux(), and principal_.

64 { return principal_->aux(); }
EventAuxiliary const & aux() const
EventPrincipal const * principal_

◆ event()

EventNumber_t edm::test::EventFromSource::event ( ) const
inline

Definition at line 63 of file EventFromSource.h.

References edm::EventPrincipal::aux(), edm::EventAuxiliary::event(), and principal_.

63 { return principal_->aux().event(); }
EventNumber_t event() const
EventAuxiliary const & aux() const
EventPrincipal const * principal_

◆ get()

template<typename T >
TestHandle<T> edm::test::EventFromSource::get ( std::string const &  iModule,
std::string const &  iInstanceLabel,
std::string const &  iProcess 
) const
inline

Definition at line 45 of file EventFromSource.h.

References cms::cuda::assert(), runTheMatrix::const, edm::Principal::getByLabel(), h, eostools::move(), principal_, edm::PRODUCT_TYPE, token_, and wrapper.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

47  {
49 
50  auto h = principal_->getByLabel(
51  edm::PRODUCT_TYPE, edm::TypeID(typeid(T)), iModule, iInstanceLabel, iProcess, nullptr, nullptr, nullptr);
52  if (h.failedToGet()) {
53  return TestHandle<T>(std::move(h.whyFailedFactory()));
54  }
55  void const* basicWrapper = h.wrapper();
56  assert(basicWrapper);
57  Wrapper<T> const* wrapper = static_cast<Wrapper<T> const*>(basicWrapper);
58  return TestHandle<T>(wrapper->product());
59  }
edm::ServiceToken token_
assert(be >=bs)
BasicHandle getByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: Principal.cc:576
EventPrincipal const * principal_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
long double T
def move(src, dest)
Definition: eostools.py:511
static HepMC::HEPEVT_Wrapper wrapper

◆ luminosityBlock()

LuminosityBlockNumber_t edm::test::EventFromSource::luminosityBlock ( ) const
inline

Definition at line 62 of file EventFromSource.h.

References edm::EventPrincipal::luminosityBlock(), and principal_.

62 { return principal_->luminosityBlock(); }
LuminosityBlockNumber_t luminosityBlock() const
EventPrincipal const * principal_

◆ run()

RunNumber_t edm::test::EventFromSource::run ( ) const
inline

Definition at line 61 of file EventFromSource.h.

References principal_, and edm::EventPrincipal::run().

61 { return principal_->run(); }
RunNumber_t run() const
EventPrincipal const * principal_

Member Data Documentation

◆ principal_

EventPrincipal const* edm::test::EventFromSource::principal_
private

Definition at line 68 of file EventFromSource.h.

Referenced by aux(), event(), get(), luminosityBlock(), and run().

◆ token_

edm::ServiceToken edm::test::EventFromSource::token_
private

Definition at line 69 of file EventFromSource.h.

Referenced by get().