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::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 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 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 ProcessHistory const & processHistory () const =0
 
edm::Timestamp time () const
 
virtual TriggerNames const & triggerNames (edm::TriggerResults const &triggerResults) const =0
 
virtual TriggerResultsByName triggerResultsByName (std::string const &process) const =0
 

Private Member Functions

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

Additional Inherited Members

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

Detailed Description

Definition at line 32 of file EventBase.h.

Constructor & Destructor Documentation

EventBase::EventBase ( )

Definition at line 29 of file EventBase.cc.

30  {
31  }
EventBase::~EventBase ( )
virtual

Reimplemented from edm::EventBase.

Definition at line 33 of file EventBase.cc.

34  {
35  }

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 59 of file EventBase.h.

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

59 { 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

Implements edm::EventBase.

Definition at line 38 of file EventBase.cc.

References compareJSON::const, 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.

38  {
39  edm::WrapperBase const* prod = nullptr;
40  void* prodPtr = &prod;
41  getByLabel(iWrapperInfo,
42  iTag.label().c_str(),
43  iTag.instance().empty()?static_cast<char const*>(0):iTag.instance().c_str(),
44  iTag.process().empty()?static_cast<char const*> (0):iTag.process().c_str(),
45  prodPtr);
46  if(prod == nullptr || !prod->isPresent()) {
47  edm::TypeID productType(iWrapperInfo);
48 
49  edm::BasicHandle failed(edm::makeHandleExceptionFactory([=]()->std::shared_ptr<cms::Exception>{
50  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<edm::Exception>(edm::errors::ProductNotFound));
51  *whyFailed
52  << "getByLabel: Found zero products matching all criteria\n"
53  << "Looking for type: " << productType << "\n"
54  << "Looking for module label: " << iTag.label() << "\n"
55  << "Looking for productInstanceName: " << iTag.instance() << "\n"
56  << (iTag.process().empty() ? "" : "Looking for process: ") << iTag.process() << "\n"
57  << "The data is registered in the file but is not available for this event\n";
58  return whyFailed;
59  }));
60  return failed;
61  }
62 
64  return value;
65  }
virtual bool getByLabel(std::type_info const &, char const *, char const *, char const *, void *) const =0
bool isPresent() const
Definition: WrapperBase.h:21
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)
string const
Definition: compareJSON.py:14
std::string const & label() const
Definition: InputTag.h:42
std::string const & process() const
Definition: InputTag.h:46
std::string const & instance() const
Definition: InputTag.h:43
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 60 of file EventBase.h.

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

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