CMS 3D CMS Logo

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

#include <Run.h>

Public Member Functions

template<typename T >
TestHandle< Tget () const
 
template<typename T >
TestHandle< Tget (std::string const &iInstanceLabel) const
 
 Run (std::shared_ptr< RunPrincipal const > iPrincipal, std::string iModuleLabel, std::string iProcessName)
 

Private Attributes

std::string label_
 
std::shared_ptr< RunPrincipal const > principal_
 
std::string processName_
 

Detailed Description

Definition at line 35 of file Run.h.

Constructor & Destructor Documentation

◆ Run()

Run::Run ( std::shared_ptr< RunPrincipal const >  iPrincipal,
std::string  iModuleLabel,
std::string  iProcessName 
)

Definition at line 32 of file Run.cc.

33  : principal_{std::move(iPrincipal)}, label_{std::move(iModuleLabel)}, processName_{std::move(iProcessName)} {}

References eostools::move().

Member Function Documentation

◆ get() [1/2]

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

◆ get() [2/2]

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

Definition at line 47 of file Run.h.

47  {
48  auto h = principal_->getByLabel(
49  edm::PRODUCT_TYPE, edm::TypeID(typeid(T)), label_, iInstanceLabel, processName_, nullptr, nullptr, nullptr);
50  if (h.failedToGet()) {
51  return TestHandle<T>(std::move(h.whyFailedFactory()));
52  }
53  void const* basicWrapper = h.wrapper();
54  assert(basicWrapper);
55  Wrapper<T> const* wrapper = static_cast<Wrapper<T> const*>(basicWrapper);
56  return TestHandle<T>(wrapper->product());
57  }

References cms::cuda::assert(), watchdog::const, label_, eostools::move(), principal_, processName_, edm::PRODUCT_TYPE, and wrapper.

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

Member Data Documentation

◆ label_

std::string edm::test::Run::label_
private

◆ principal_

std::shared_ptr<RunPrincipal const> edm::test::Run::principal_
private

Definition at line 65 of file Run.h.

Referenced by get().

◆ processName_

std::string edm::test::Run::processName_
private

Definition at line 67 of file Run.h.

Referenced by get().

edm::PRODUCT_TYPE
Definition: ProductKindOfType.h:5
cms::cuda::assert
assert(be >=bs)
wrapper
static HepMC::HEPEVT_Wrapper wrapper
Definition: BeamHaloProducer.cc:47
watchdog.const
const
Definition: watchdog.py:83
edm::test::Run::principal_
std::shared_ptr< RunPrincipal const > principal_
Definition: Run.h:65
h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::test::Run::processName_
std::string processName_
Definition: Run.h:67
edm::TypeID
Definition: TypeID.h:22
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::test::Run::label_
std::string label_
Definition: Run.h:66
T
long double T
Definition: Basic3DVectorLD.h:48
TestHandle