CMS 3D CMS Logo

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

#include <Event.h>

Public Member Functions

 Event (EventPrincipal const &iPrincipal, std::string iModuleLabel, std::string iProcessName, bool modulePassed)
 
template<typename T >
TestHandle< Tget () const
 
template<typename T >
TestHandle< Tget (std::string const &iInstanceLabel) const
 
bool modulePassed () const
 

Private Attributes

std::string label_
 
bool modulePassed_
 
EventPrincipal const * principal_
 
std::string processName_
 

Detailed Description

Definition at line 36 of file Event.h.

Constructor & Destructor Documentation

◆ Event()

Event::Event ( EventPrincipal const &  iPrincipal,
std::string  iModuleLabel,
std::string  iProcessName,
bool  modulePassed 
)

Definition at line 32 of file Event.cc.

33  : principal_{&iPrincipal},
34  label_{std::move(iModuleLabel)},
35  processName_{std::move(iProcessName)},
EventPrincipal const * principal_
Definition: Event.h:67
bool modulePassed() const
Definition: Event.h:60
std::string label_
Definition: Event.h:68
std::string processName_
Definition: Event.h:69
def move(src, dest)
Definition: eostools.py:511
bool modulePassed_
Definition: Event.h:70

Member Function Documentation

◆ get() [1/2]

template<typename T >
TestHandle<T> edm::test::Event::get ( ) const
inline

◆ get() [2/2]

template<typename T >
TestHandle<T> edm::test::Event::get ( std::string const &  iInstanceLabel) const
inline

Definition at line 48 of file Event.h.

References cms::cuda::assert(), runTheMatrix::const, edm::Principal::getByLabel(), h, label_, eostools::move(), principal_, processName_, edm::PRODUCT_TYPE, 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().

48  {
49  auto h = principal_->getByLabel(
50  edm::PRODUCT_TYPE, edm::TypeID(typeid(T)), label_, iInstanceLabel, processName_, nullptr, nullptr, nullptr);
51  if (h.failedToGet()) {
52  return TestHandle<T>(std::move(h.whyFailedFactory()));
53  }
54  void const* basicWrapper = h.wrapper();
55  assert(basicWrapper);
56  Wrapper<T> const* wrapper = static_cast<Wrapper<T> const*>(basicWrapper);
57  return TestHandle<T>(wrapper->product());
58  }
assert(be >=bs)
EventPrincipal const * principal_
Definition: Event.h:67
BasicHandle getByLabel(KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
Definition: Principal.cc:576
std::string label_
Definition: Event.h:68
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
std::string processName_
Definition: Event.h:69
def move(src, dest)
Definition: eostools.py:511
static HepMC::HEPEVT_Wrapper wrapper

◆ modulePassed()

bool edm::test::Event::modulePassed ( ) const
inline

Definition at line 60 of file Event.h.

References modulePassed_.

60 { return modulePassed_; }
bool modulePassed_
Definition: Event.h:70

Member Data Documentation

◆ label_

std::string edm::test::Event::label_
private

◆ modulePassed_

bool edm::test::Event::modulePassed_
private

Definition at line 70 of file Event.h.

Referenced by modulePassed().

◆ principal_

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

Definition at line 67 of file Event.h.

Referenced by get().

◆ processName_

std::string edm::test::Event::processName_
private

Definition at line 69 of file Event.h.

Referenced by get().