CMS 3D CMS Logo

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

#include <EventBase.h>

Inheritance diagram for fwlite::EventBase:
edm::EventBase fwlite::ChainEvent fwlite::Event fwlite::EventContainer fwlite::MultiChainEvent

Public Member Functions

virtual bool atEnd () const =0
 
 EventBase ()
 
virtual Long64_t fileIndex () const
 
virtual std::string const getBranchNameFor (std::type_info const &, char const *, char const *, char const *) const =0
 
virtual bool getByLabel (std::type_info const &, char const *, char const *, char const *, void *) const =0
 
virtual edm::WrapperBase const * getByProductID (edm::ProductID const &) const =0
 
virtual EventBase const & operator++ ()=0
 
virtual Long64_t secondaryFileIndex () const
 
virtual EventBase const & toBegin ()=0
 
virtual ~EventBase ()
 
- Public Member Functions inherited from edm::EventBase
int bunchCrossing () const
 
virtual edm::EventAuxiliary const & eventAuxiliary () const =0
 
 EventBase ()
 
edm::EventAuxiliary::ExperimentType experimentType () const
 
template<typename T >
bool get (ProductID const &, Handle< T > &) const
 
template<typename T >
bool getByLabel (InputTag const &, Handle< T > &) const
 
template<>
bool getByLabel (edm::InputTag const &tag, Handle< FWGenericObject > &result) const
 Specialize the getByLabel method to work with a Handle<FWGenericObject> More...
 
edm::EventID id () const
 
bool isRealData () const
 
edm::LuminosityBlockNumber_t luminosityBlock () const
 
int orbitNumber () const
 
virtual edm::ParameterSet const * parameterSet (edm::ParameterSetID const &psID) const =0
 
virtual ProcessHistory const & processHistory () const =0
 
edm::Timestamp time () const
 
virtual TriggerNames const & triggerNames (edm::TriggerResults const &triggerResults) const =0
 
virtual TriggerResultsByName triggerResultsByName (edm::TriggerResults const &triggerResults) const =0
 

Private Member Functions

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

Additional Inherited Members

- Static Protected Member Functions inherited from edm::EventBase
static edm::ParameterSet const * parameterSetForID_ (edm::ParameterSetID const &psID)
 
static TriggerNames const * triggerNames_ (edm::TriggerResults const &triggerResults)
 

Detailed Description

Definition at line 37 of file EventBase.h.

Constructor & Destructor Documentation

EventBase::EventBase ( )

Definition at line 33 of file EventBase.cc.

34  {
35  }
EventBase::~EventBase ( )
virtual

Reimplemented from edm::EventBase.

Definition at line 37 of file EventBase.cc.

38  {
39  }

Member Function Documentation

virtual bool fwlite::EventBase::atEnd ( ) const
pure virtual
virtual Long64_t fwlite::EventBase::fileIndex ( ) const
inlinevirtual

Reimplemented in fwlite::MultiChainEvent, fwlite::EventContainer, and fwlite::ChainEvent.

Definition at line 66 of file EventBase.h.

Referenced by fwlite::EventContainer::fileIndex(), and python.Events::fileIndicies().

66 { return -1; }
virtual std::string const fwlite::EventBase::getBranchNameFor ( std::type_info const &  ,
char const *  ,
char const *  ,
char const *   
) const
pure virtual
virtual bool fwlite::EventBase::getByLabel ( std::type_info const &  ,
char const *  ,
char const *  ,
char const *  ,
void *   
) const
pure virtual
edm::BasicHandle EventBase::getByLabelImpl ( std::type_info const &  iWrapperInfo,
std::type_info const &  ,
const edm::InputTag iTag 
) const
privatevirtual

Definition at line 42 of file EventBase.cc.

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

42  {
43  edm::WrapperBase const* prod = nullptr;
44  void* prodPtr = &prod;
45  getByLabel(iWrapperInfo,
46  iTag.label().c_str(),
47  iTag.instance().empty() ? static_cast<char const*>(nullptr) : iTag.instance().c_str(),
48  iTag.process().empty() ? static_cast<char const*> (nullptr) : iTag.process().c_str(),
49  prodPtr);
50  if(prod == nullptr || !prod->isPresent()) {
51  edm::TypeID productType(iWrapperInfo);
52 
53  edm::BasicHandle failed(edm::makeHandleExceptionFactory([=]()->std::shared_ptr<cms::Exception>{
54  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<edm::Exception>(edm::errors::ProductNotFound));
55  *whyFailed
56  << "getByLabel: Found zero products matching all criteria\n"
57  << "Looking for type: " << productType << "\n"
58  << "Looking for module label: " << iTag.label() << "\n"
59  << "Looking for productInstanceName: " << iTag.instance() << "\n"
60  << (iTag.process().empty() ? "" : "Looking for process: ") << iTag.process() << "\n"
61  << "The data is registered in the file but is not available for this event\n";
62  return whyFailed;
63  }));
64  return failed;
65  }
66 
68  return value;
69  }
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)
static const edm::Provenance s_prov(std::shared_ptr< edm::BranchDescription const >(&s_branch, edm::do_nothing_deleter()), s_id)
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 edm::WrapperBase const* fwlite::EventBase::getByProductID ( edm::ProductID const &  ) const
pure virtual
virtual edm::BasicHandle fwlite::EventBase::getImpl ( std::type_info const &  ,
edm::ProductID const &   
) const
privatevirtual

Implements edm::EventBase.

Referenced by getByLabelImpl().

virtual EventBase const& fwlite::EventBase::operator++ ( )
pure virtual
virtual Long64_t fwlite::EventBase::secondaryFileIndex ( ) const
inlinevirtual

Reimplemented in fwlite::MultiChainEvent, and fwlite::EventContainer.

Definition at line 67 of file EventBase.h.

Referenced by python.Events::fileIndicies(), and fwlite::EventContainer::secondaryFileIndex().

67 { return -1; }
virtual EventBase const& fwlite::EventBase::toBegin ( )
pure virtual