CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 bool getByLabel (std::type_info const &, char const *, char const *, char const *, edm::WrapperHolder &) const =0
 
virtual const RunBaseoperator++ ()=0
 
 RunBase ()
 
virtual Long64_t secondaryFileIndex () const
 
virtual const RunBasetoBegin ()=0
 
virtual ~RunBase ()
 
- 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

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

Detailed Description

Definition at line 32 of file RunBase.h.

Constructor & Destructor Documentation

RunBase::RunBase ( )

Definition at line 35 of file RunBase.cc.

36  {
37  }
RunBase::~RunBase ( )
virtual

Reimplemented from edm::RunBase.

Definition at line 39 of file RunBase.cc.

40  {
41  }

Member Function Documentation

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

Implemented in fwlite::Run.

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

Definition at line 65 of file RunBase.h.

Referenced by python.Events::fileIndicies().

65 { return -1; }
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().

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

Implemented in fwlite::Run.

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

Implements edm::RunBase.

Definition at line 44 of file RunBase.cc.

References compareJSON::const, getByLabel(), edm::InputTag::instance(), edm::WrapperHolder::isPresent(), edm::WrapperHolder::isValid(), edm::InputTag::label(), edm::makeHandleExceptionFactory(), edm::InputTag::process(), edm::errors::ProductNotFound, s_prov, and relativeConstraints::value.

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

Implemented in fwlite::Run.

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

Definition at line 66 of file RunBase.h.

Referenced by python.Events::fileIndicies().

66 { return -1; }
virtual const RunBase& fwlite::RunBase::toBegin ( )
pure virtual

Implemented in fwlite::Run.