CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
fwlite::RunBase Class Referenceabstract

#include <RunBase.h>

Inheritance diagram for fwlite::RunBase:
edm::RunBase fwlite::Run

Public Member Functions

virtual bool atEnd () const =0
 
virtual Long64_t fileIndex () const
 
virtual bool getByLabel (std::type_info const &, char const *, char const *, char const *, void *) const =0
 
virtual const RunBaseoperator++ ()=0
 
 RunBase ()
 
virtual Long64_t secondaryFileIndex () const
 
virtual const RunBasetoBegin ()=0
 
 ~RunBase () override
 
- Public Member Functions inherited from edm::RunBase
Timestamp const & beginTime () const
 
Timestamp const & endTime () const
 
template<typename PROD >
bool getByLabel (InputTag const &tag, Handle< PROD > &result) const
 same as above, but using the InputTag class More...
 
template<typename T >
bool getByLabel (InputTag const &tag, Handle< T > &result) const
 
RunID const & id () const
 
RunNumber_t run () const
 
virtual edm::RunAuxiliary const & runAuxiliary () const =0
 
 RunBase ()
 

Private Member Functions

edm::BasicHandle getByLabelImpl (std::type_info const &, std::type_info const &, const edm::InputTag &) const override
 

Detailed Description

Definition at line 32 of file RunBase.h.

Constructor & Destructor Documentation

◆ RunBase()

RunBase::RunBase ( )

Definition at line 35 of file RunBase.cc.

35 {}

◆ ~RunBase()

RunBase::~RunBase ( )
overridevirtual

Reimplemented from edm::RunBase.

Definition at line 37 of file RunBase.cc.

37 {}

Member Function Documentation

◆ atEnd()

virtual bool fwlite::RunBase::atEnd ( ) const
pure virtual

Implemented in fwlite::Run.

◆ fileIndex()

virtual Long64_t fwlite::RunBase::fileIndex ( ) const
inlinevirtual

Definition at line 53 of file RunBase.h.

Referenced by python.Events::fileIndicies().

53 { return -1; }

◆ getByLabel()

virtual bool fwlite::RunBase::getByLabel ( std::type_info const &  ,
char const *  ,
char const *  ,
char const *  ,
void *   
) const
pure virtual

Implemented in fwlite::Run.

Referenced by getByLabelImpl().

◆ getByLabelImpl()

edm::BasicHandle RunBase::getByLabelImpl ( std::type_info const &  iWrapperInfo,
std::type_info const &  ,
const edm::InputTag iTag 
) const
overrideprivatevirtual

Implements edm::RunBase.

Definition at line 39 of file RunBase.cc.

References runTheMatrix::const, runEdmFileComparison::failed, getByLabel(), edm::InputTag::instance(), edm::InputTag::label(), edm::makeHandleExceptionFactory(), edm::InputTag::process(), dumpMFGeometry_cfg::prod, edm::errors::ProductNotFound, s_prov, and relativeConstraints::value.

41  {
42  edm::WrapperBase* prod = nullptr;
43  void* prodPtr = &prod;
44  getByLabel(iWrapperInfo,
45  iTag.label().c_str(),
46  iTag.instance().empty() ? static_cast<char const*>(nullptr) : iTag.instance().c_str(),
47  iTag.process().empty() ? static_cast<char const*>(nullptr) : iTag.process().c_str(),
48  prodPtr);
49  if (prod == nullptr || !prod->isPresent()) {
50  edm::TypeID productType(iWrapperInfo);
51 
52  edm::BasicHandle failed(edm::makeHandleExceptionFactory([=]() -> std::shared_ptr<cms::Exception> {
53  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<edm::Exception>(edm::errors::ProductNotFound));
54  *whyFailed << "getByLabel: Found zero products matching all criteria\n"
55  << "Looking for type: " << productType << "\n"
56  << "Looking for module label: " << iTag.label() << "\n"
57  << "Looking for productInstanceName: " << iTag.instance() << "\n"
58  << (iTag.process().empty() ? "" : "Looking for process: ") << iTag.process() << "\n";
59  return whyFailed;
60  }));
61  return failed;
62  }
64  return value;
65  }
std::string const & instance() const
Definition: InputTag.h:37
std::string const & label() const
Definition: InputTag.h:36
virtual bool getByLabel(std::type_info const &, char const *, char const *, char const *, void *) const =0
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
std::string const & process() const
Definition: InputTag.h:40
static const edm::Provenance s_prov(std::shared_ptr< edm::BranchDescription const >(&s_branch, edm::do_nothing_deleter()), s_id)

◆ operator++()

virtual const RunBase& fwlite::RunBase::operator++ ( )
pure virtual

Implemented in fwlite::Run.

◆ secondaryFileIndex()

virtual Long64_t fwlite::RunBase::secondaryFileIndex ( ) const
inlinevirtual

Definition at line 54 of file RunBase.h.

Referenced by python.Events::fileIndicies().

54 { return -1; }

◆ toBegin()

virtual const RunBase& fwlite::RunBase::toBegin ( )
pure virtual

Implemented in fwlite::Run.