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 (const std::type_info &, const char *, const char *, const char *, void *) 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<class T >
bool getByLabel (const InputTag &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 (const std::type_info &, const std::type_info &, const edm::InputTag &) const
 

Detailed Description

Definition at line 32 of file RunBase.h.

Constructor & Destructor Documentation

RunBase::RunBase ( )

Definition at line 44 of file RunBase.cc.

45  {
46  }
RunBase::~RunBase ( )
virtual

Reimplemented from edm::RunBase.

Definition at line 48 of file RunBase.cc.

49  {
50  }

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 57 of file RunBase.h.

Referenced by python.Events::fileIndicies().

57 { return -1; }
virtual bool fwlite::RunBase::getByLabel ( const std::type_info &  ,
const char *  ,
const char *  ,
const char *  ,
void *   
) const
pure virtual

Implemented in fwlite::Run.

Referenced by getByLabelImpl().

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

Implements edm::RunBase.

Definition at line 53 of file RunBase.cc.

References getByLabel(), edm::InputTag::instance(), edm::InputTag::label(), edm::InputTag::process(), CrabTask::prod, edm::errors::ProductNotFound, s_prov(), and relativeConstraints::value.

54  {
56  void* prodPtr = &prod;
57  getByLabel(iWrapperInfo,
58  iTag.label().c_str(),
59  iTag.instance().empty()?static_cast<const char*>(0):iTag.instance().c_str(),
60  iTag.process().empty()?static_cast<const char*> (0):iTag.process().c_str(),
61  prodPtr);
62  if(0==prod) {
63  edm::TypeID productType(iWrapperInfo);
64  boost::shared_ptr<cms::Exception> whyFailed(new edm::Exception(edm::errors::ProductNotFound));
65  *whyFailed
66  << "getByLabel: Found zero products matching all criteria\n"
67  << "Looking for type: " << productType << "\n"
68  << "Looking for module label: " << iTag.label() << "\n"
69  << "Looking for productInstanceName: " << iTag.instance() << "\n"
70  << (iTag.process().empty() ? "" : "Looking for process: ") << iTag.process() << "\n";
71 
72  edm::BasicHandle failed(whyFailed);
73  return failed;
74  }
75  edm::BasicHandle value(boost::shared_ptr<edm::EDProduct>(prod,null_deleter()),&s_prov);
76  return value;
77  }
virtual bool getByLabel(const std::type_info &, const char *, const char *, const char *, void *) const =0
tuple prod
Definition: CrabTask.py:87
static const edm::Provenance s_prov(boost::shared_ptr< edm::ConstBranchDescription >(&s_branch, null_deleter()), s_id)
std::string const & label() const
Definition: InputTag.h:25
std::string const & process() const
Definition: InputTag.h:29
std::string const & instance() const
Definition: InputTag.h:26
virtual const RunBase& fwlite::RunBase::operator++ ( )
pure virtual

Implemented in fwlite::Run.

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

Definition at line 58 of file RunBase.h.

Referenced by python.Events::fileIndicies().

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

Implemented in fwlite::Run.