CMS 3D CMS Logo

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

#include <LuminosityBlockBase.h>

Inheritance diagram for fwlite::LuminosityBlockBase:
edm::LuminosityBlockBase fwlite::LuminosityBlock

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
 
 LuminosityBlockBase ()
 
virtual const LuminosityBlockBaseoperator++ ()=0
 
virtual Long64_t secondaryFileIndex () const
 
virtual const LuminosityBlockBasetoBegin ()=0
 
virtual ~LuminosityBlockBase ()
 
- Public Member Functions inherited from edm::LuminosityBlockBase
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
 
LuminosityBlockID id () const
 
LuminosityBlockNumber_t luminosityBlock () const
 
virtual edm::LuminosityBlockAuxiliary const & luminosityBlockAuxiliary () const =0
 
 LuminosityBlockBase ()
 
RunNumber_t run () const
 

Private Member Functions

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

Detailed Description

Definition at line 31 of file LuminosityBlockBase.h.

Constructor & Destructor Documentation

LuminosityBlockBase::LuminosityBlockBase ( )

Definition at line 35 of file LuminosityBlockBase.cc.

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

Reimplemented from edm::LuminosityBlockBase.

Definition at line 39 of file LuminosityBlockBase.cc.

40  {
41  }

Member Function Documentation

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

Implemented in fwlite::LuminosityBlock.

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

Definition at line 53 of file LuminosityBlockBase.h.

Referenced by python.Events::fileIndicies().

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

Implemented in fwlite::LuminosityBlock.

Referenced by getByLabelImpl().

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

Implements edm::LuminosityBlockBase.

Definition at line 44 of file LuminosityBlockBase.cc.

References runEdmFileComparison::failed, getByLabel(), edm::InputTag::instance(), edm::WrapperBase::isPresent(), edm::InputTag::label(), edm::makeHandleExceptionFactory(), edm::InputTag::process(), parseEventContent::prod, edm::errors::ProductNotFound, s_prov, and relativeConstraints::value.

Referenced by secondaryFileIndex().

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

Implemented in fwlite::LuminosityBlock.

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

Definition at line 54 of file LuminosityBlockBase.h.

References getByLabelImpl().

Referenced by python.Events::fileIndicies().

54 { return -1; }
virtual const LuminosityBlockBase& fwlite::LuminosityBlockBase::toBegin ( )
pure virtual

Implemented in fwlite::LuminosityBlock.