#include <Event.h>
Public Member Functions | |
bool | atEnd () const override |
template<typename T > | |
edm::EDGetTokenT< T > | consumes (edm::InputTag const &iTag) const |
void | draw (Option_t *opt) |
Properly setup for edm::Ref, etc and then call TTree method. More... | |
Long64_t | draw (char const *varexp, const TCut &selection, Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0) |
Long64_t | draw (char const *varexp, char const *selection, Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0) |
Event (TFile *iFile, bool useCache=true, std::function< void(TBranch const &)> baFunc=[](TBranch const &) {}) | |
Event (Event const &)=delete | |
edm::EventAuxiliary const & | eventAuxiliary () const override |
std::vector< edm::BranchDescription > const & | getBranchDescriptions () const |
std::string const | getBranchNameFor (std::type_info const &, char const *iModuleLabel, char const *iProductInstanceLabel, char const *iProcessName) const override |
Return the branch name in the TFile which contains the data. More... | |
bool | getByLabel (std::type_info const &, char const *, char const *, char const *, void *) const override |
This function should only be called by fwlite::Handle<> More... | |
edm::WrapperBase const * | getByProductID (edm::ProductID const &) const override |
fwlite::LuminosityBlock const & | getLuminosityBlock () const |
std::vector< std::string > const & | getProcessHistory () const |
fwlite::Run const & | getRun () const |
TFile * | getTFile () const |
edm::OptionalThinnedKey | getThinnedKeyFrom (edm::ProductID const &parent, unsigned int key, edm::ProductID const &thinned) const |
std::optional< std::tuple< edm::WrapperBase const *, unsigned int > > | getThinnedProduct (edm::ProductID const &pid, unsigned int key) const |
void | getThinnedProducts (edm::ProductID const &pid, std::vector< edm::WrapperBase const *> &foundContainers, std::vector< unsigned int > &keys) const |
Long64_t | indexFromEventId (edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, edm::EventNumber_t event) |
Find index of given event-id. More... | |
bool | isValid () const |
operator bool () const | |
Event const & | operator++ () override |
Advance to next event in the TFile. More... | |
Event const & | operator= (Event const &)=delete |
edm::ParameterSet const * | parameterSet (edm::ParameterSetID const &psID) const override |
edm::ProcessHistory const & | processHistory () const override |
Long64_t | scan (char const *varexp="", char const *selection="", Option_t *option="", Long64_t nentries=1000000000, Long64_t firstentry=0) |
Long64_t | size () const |
Returns number of events in the file. More... | |
bool | to (Long64_t iIndex) |
Go to the event at index iIndex. More... | |
bool | to (const edm::EventID &id) |
Go to event by Run & Event number. More... | |
bool | to (edm::RunNumber_t run, edm::EventNumber_t event) |
bool | to (edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, edm::EventNumber_t event) |
Event const & | toBegin () override |
Go to the very first Event. More... | |
edm::TriggerNames const & | triggerNames (edm::TriggerResults const &triggerResults) const override |
edm::TriggerResultsByName | triggerResultsByName (edm::TriggerResults const &triggerResults) const override |
~Event () override | |
Public Member Functions inherited from fwlite::EventBase | |
EventBase () | |
virtual Long64_t | fileIndex () const |
virtual Long64_t | secondaryFileIndex () const |
~EventBase () override | |
Public Member Functions inherited from edm::EventBase | |
int | bunchCrossing () const |
EventBase () | |
edm::EventAuxiliary::ExperimentType | experimentType () const |
template<typename T > | |
bool | get (ProductID 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... | |
template<typename T > | |
bool | getByLabel (InputTag const &, Handle< T > &) const |
template<typename T > | |
bool | getByToken (edm::EDGetTokenT< T > const &token, edm::Handle< T > &result) const |
edm::EventID | id () const |
bool | isRealData () const |
edm::LuminosityBlockNumber_t | luminosityBlock () const |
int | orbitNumber () const |
edm::Timestamp | time () const |
Static Public Member Functions | |
static void | throwProductNotFoundException (std::type_info const &, char const *, char const *, char const *) |
Private Member Functions | |
void | fillParameterSetRegistry () const |
bool | getByTokenImp (edm::EDGetToken, edm::WrapperBase const *&) const override |
edm::ProcessHistory const & | history () const |
void | setGetter (std::shared_ptr< edm::EDProductGetter const > getter) |
void | updateAux (Long_t eventIndex) const |
Private Attributes | |
edm::EventAuxiliary | aux_ |
TBranch * | auxBranch_ |
fwlite::BranchMapReader | branchMap_ |
fwlite::DataGetterHelper | dataHelper_ |
EntryFinder | entryFinder_ |
TTree * | eventHistoryTree_ |
std::vector< edm::EventProcessHistoryID > | eventProcessHistoryIDs_ |
TFile * | file_ |
int | fileVersion_ |
edm::ProcessHistoryMap | historyMap_ |
std::vector< char const * > | labels_ |
std::shared_ptr< fwlite::LuminosityBlock > | lumi_ |
bool | parameterSetRegistryFilled_ |
edm::EventAuxiliary const * | pAux_ |
edm::EventAux const * | pOldAux_ |
std::vector< std::string > | procHistoryNames_ |
std::shared_ptr< fwlite::Run > | run_ |
std::shared_ptr< RunFactory > | runFactory_ |
Friends | |
class | ChainEvent |
class | EventHistoryGetter |
class | internal::ProductGetter |
class | MultiChainEvent |
Additional Inherited Members | |
Static Protected Member Functions inherited from fwlite::EventBase | |
template<typename T > | |
static edm::EDGetTokenT< T > | makeTokenUsing (unsigned int iIndex) |
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) |
Event::Event | ( | TFile * | iFile, |
bool | useCache = true , |
||
std::function< void(TBranch const &)> | baFunc = [](TBranch const&) {} |
||
) |
Definition at line 114 of file Event.cc.
References auxBranch_, branchMap_, edm::BranchTypeToAuxBranchName(), edm::BranchTypeToAuxiliaryBranchName(), eventHistoryTree_, edm::poolNames::eventHistoryTreeName(), edm::poolNames::eventTreeName(), Exception, fileVersion_, fwlite::BranchMapReader::getEventTree(), fwlite::BranchMapReader::getFileVersion(), edm::InEvent, pAux_, pOldAux_, runFactory_, and fwlite::BranchMapReader::updateEvent().
|
delete |
|
override |
|
overridevirtual |
Implements fwlite::EventBase.
Definition at line 267 of file Event.cc.
References branchMap_, fwlite::BranchMapReader::getEventEntry(), or, and size().
Referenced by FWHLTTriggerTableView::fillAverageAcceptFractions(), FWFileEntry::filterEventsWithCustomParser(), getByLabel(), and getByTokenImp().
|
inline |
Definition at line 136 of file Event.h.
References dataHelper_, fwlite::DataGetterHelper::getBranchIDFor(), edm::InputTag::instance(), edm::InputTag::label(), and edm::InputTag::process().
void Event::draw | ( | Option_t * | opt | ) |
Properly setup for edm::Ref, etc and then call TTree method.
Definition at line 238 of file Event.cc.
References branchMap_, dataHelper_, fwlite::BranchMapReader::getEventTree(), fwlite::DataGetterHelper::getter(), findAndChange::op, and das-up-to-nevents::opt.
Long64_t Event::draw | ( | char const * | varexp, |
const TCut & | selection, | ||
Option_t * | option = "" , |
||
Long64_t | nentries = 1000000000 , |
||
Long64_t | firstentry = 0 |
||
) |
Definition at line 242 of file Event.cc.
References branchMap_, dataHelper_, mps_merge::firstentry, fwlite::BranchMapReader::getEventTree(), fwlite::DataGetterHelper::getter(), findAndChange::op, fileinputsource_cfi::option, and corrVsCorr::selection.
Long64_t Event::draw | ( | char const * | varexp, |
char const * | selection, | ||
Option_t * | option = "" , |
||
Long64_t | nentries = 1000000000 , |
||
Long64_t | firstentry = 0 |
||
) |
Definition at line 247 of file Event.cc.
References branchMap_, dataHelper_, mps_merge::firstentry, fwlite::BranchMapReader::getEventTree(), fwlite::DataGetterHelper::getter(), findAndChange::op, fileinputsource_cfi::option, and corrVsCorr::selection.
|
overridevirtual |
Implements edm::EventBase.
Definition at line 309 of file Event.cc.
References aux_, branchMap_, fwlite::BranchMapReader::getEventEntry(), and updateAux().
Referenced by getLuminosityBlock(), and getRun().
|
private |
Definition at line 427 of file Event.cc.
References b, branchMap_, Exception, edm::poolNames::fileFormatVersionBranchName(), fwlite::BranchMapReader::getFile(), mps_fire::i, edm::poolNames::idToParameterSetBlobsBranchName(), edm::pset::Registry::insertMapped(), edm::pset::Registry::instance(), B2GTnPMonitor_cfi::item, edm::poolNames::metaDataTreeName(), edm::poolNames::parameterSetMapBranchName(), parameterSetRegistryFilled_, edm::FileFormatVersion::parameterSetsByReference(), edm::poolNames::parameterSetsTreeName(), muonDTDigis_cfi::pset, and edm::FileFormatVersion::triggerPathsTracked().
Referenced by parameterSet(), triggerNames(), and triggerResultsByName().
|
inline |
Definition at line 176 of file Event.h.
References branchMap_, and fwlite::BranchMapReader::getBranchDescriptions().
Referenced by FWLiteJobMetadataManager::doUpdate(), and FWLiteJobMetadataManager::hasModuleLabel().
|
overridevirtual |
Return the branch name in the TFile which contains the data.
Implements fwlite::EventBase.
Definition at line 281 of file Event.cc.
References dataHelper_, and fwlite::DataGetterHelper::getBranchNameFor().
Referenced by FWFileEntry::getBranchName(), and FWFileEntry::runFilter().
|
overridevirtual |
This function should only be called by fwlite::Handle<>
Implements fwlite::EventBase.
Definition at line 288 of file Event.cc.
References atEnd(), branchMap_, dataHelper_, Exception, fwlite::DataGetterHelper::getByLabel(), and fwlite::BranchMapReader::getEventEntry().
|
overridevirtual |
Implements fwlite::EventBase.
Definition at line 386 of file Event.cc.
References branchMap_, dataHelper_, fwlite::DataGetterHelper::getByProductID(), and fwlite::BranchMapReader::getEventEntry().
Referenced by fwlite::internal::ProductGetter::getIt().
|
overrideprivatevirtual |
Implements fwlite::EventBase.
Definition at line 300 of file Event.cc.
References atEnd(), branchMap_, dataHelper_, Exception, fwlite::DataGetterHelper::getByBranchID(), fwlite::BranchMapReader::getEventEntry(), and edm::EDGetToken::index().
fwlite::LuminosityBlock const & Event::getLuminosityBlock | ( | ) | const |
Definition at line 514 of file Event.cc.
References branchMap_, eventAuxiliary(), lumi_, edm::EventAuxiliary::luminosityBlock(), writedatasetfile::run, edm::EventAuxiliary::run(), and runFactory_.
std::vector< std::string > const & Event::getProcessHistory | ( | ) | const |
Definition at line 272 of file Event.cc.
References history(), ValidateTausOnZEEFastSim_cff::proc, and procHistoryNames_.
Referenced by FWLiteJobMetadataManager::doUpdate().
fwlite::Run const & Event::getRun | ( | ) | const |
Definition at line 526 of file Event.cc.
References branchMap_, eventAuxiliary(), writedatasetfile::run, edm::EventAuxiliary::run(), run_, and runFactory_.
Referenced by FWMagField::checkFieldInfo().
|
inline |
Definition at line 180 of file Event.h.
References branchMap_, and fwlite::BranchMapReader::getFile().
edm::OptionalThinnedKey Event::getThinnedKeyFrom | ( | edm::ProductID const & | parent, |
unsigned int | key, | ||
edm::ProductID const & | thinned | ||
) | const |
Definition at line 404 of file Event.cc.
References branchMap_, dataHelper_, fwlite::BranchMapReader::getEventEntry(), fwlite::DataGetterHelper::getThinnedKeyFrom(), submitPVResolutionJobs::key, and class-composition::parent.
Referenced by fwlite::internal::ProductGetter::getThinnedKeyFrom().
std::optional< std::tuple< edm::WrapperBase const *, unsigned int > > Event::getThinnedProduct | ( | edm::ProductID const & | pid, |
unsigned int | key | ||
) | const |
Definition at line 391 of file Event.cc.
References branchMap_, dataHelper_, fwlite::BranchMapReader::getEventEntry(), fwlite::DataGetterHelper::getThinnedProduct(), and submitPVResolutionJobs::key.
Referenced by fwlite::internal::ProductGetter::getThinnedProduct().
void Event::getThinnedProducts | ( | edm::ProductID const & | pid, |
std::vector< edm::WrapperBase const *> & | foundContainers, | ||
std::vector< unsigned int > & | keys | ||
) | const |
Definition at line 397 of file Event.cc.
References branchMap_, dataHelper_, fwlite::BranchMapReader::getEventEntry(), fwlite::DataGetterHelper::getThinnedProducts(), and relativeConstraints::keys.
Referenced by fwlite::internal::ProductGetter::getThinnedProducts().
|
private |
Definition at line 325 of file Event.cc.
References aux_, b, branchMap_, edm::poolNames::eventHistoryBranchName(), eventHistoryTree_, eventProcessHistoryIDs_, Exception, edm::errors::FatalRootError, fileVersion_, fwlite::BranchMapReader::getEventEntry(), fwlite::BranchMapReader::getFile(), historyMap_, edm::EventAuxiliary::id(), pfDeepBoostedJetPreprocessParams_cfi::lower_bound, edm::poolNames::metaDataTreeName(), edm::poolNames::processHistoryBranchName(), edm::EventAuxiliary::processHistoryID(), edm::poolNames::processHistoryMapBranchName(), procHistoryNames_, edm::ProcessHistory::setProcessHistoryID(), filterCSVwithJSON::target, and updateAux().
Referenced by getProcessHistory(), fwlite::EventHistoryGetter::history(), and processHistory().
Long64_t Event::indexFromEventId | ( | edm::RunNumber_t | run, |
edm::LuminosityBlockNumber_t | lumi, | ||
edm::EventNumber_t | event | ||
) |
Find index of given event-id.
Definition at line 202 of file Event.cc.
References branchMap_, mps_splice::entry, entryFinder_, fwlite::EntryFinder::fillIndex(), fwlite::EntryFinder::findEvent(), fwlite::EntryFinder::invalidEntry, and writedatasetfile::run.
bool Event::isValid | ( | void | ) | const |
Definition at line 260 of file Event.cc.
References branchMap_, fwlite::BranchMapReader::getEventEntry(), and size().
Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().
Event::operator bool | ( | ) | const |
|
overridevirtual |
Advance to next event in the TFile.
Implements fwlite::EventBase.
Definition at line 194 of file Event.cc.
References branchMap_, fwlite::BranchMapReader::getEventEntry(), size(), and fwlite::BranchMapReader::updateEvent().
|
overridevirtual |
Implements edm::EventBase.
Definition at line 482 of file Event.cc.
References fillParameterSetRegistry(), edm::EventBase::parameterSetForID_(), and parameterSetRegistryFilled_.
|
inlineoverridevirtual |
Long64_t Event::scan | ( | char const * | varexp = "" , |
char const * | selection = "" , |
||
Option_t * | option = "" , |
||
Long64_t | nentries = 1000000000 , |
||
Long64_t | firstentry = 0 |
||
) |
Definition at line 252 of file Event.cc.
References branchMap_, dataHelper_, mps_merge::firstentry, fwlite::BranchMapReader::getEventTree(), fwlite::DataGetterHelper::getter(), findAndChange::op, fileinputsource_cfi::option, and corrVsCorr::selection.
|
inlineprivate |
Definition at line 215 of file Event.h.
References dataHelper_, and fwlite::DataGetterHelper::setGetter().
Long64_t Event::size | ( | void | ) | const |
Returns number of events in the file.
Definition at line 258 of file Event.cc.
References branchMap_, and fwlite::BranchMapReader::getEventTree().
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), atEnd(), FWHLTTriggerTableView::fillAverageAcceptFractions(), isValid(), FWFileEntry::openFile(), operator++(), and to().
|
static |
Definition at line 501 of file Event.cc.
References Exception, and edm::errors::ProductNotFound.
Referenced by fwlite::ChainEvent::throwProductNotFoundException().
bool Event::to | ( | Long64_t | iIndex | ) |
Go to the event at index iIndex.
Definition at line 208 of file Event.cc.
References branchMap_, size(), and fwlite::BranchMapReader::updateEvent().
Referenced by FWHLTTriggerTableView::fillAverageAcceptFractions(), FWFileEntry::filterEventsWithCustomParser(), and to().
bool Event::to | ( | const edm::EventID & | id | ) |
Go to event by Run & Event number.
Definition at line 228 of file Event.cc.
References edmPickEvents::event, edm::EventBase::luminosityBlock(), writedatasetfile::run, and to().
bool Event::to | ( | edm::RunNumber_t | run, |
edm::EventNumber_t | event | ||
) |
Definition at line 217 of file Event.cc.
References writedatasetfile::run, to(), and mitigatedMETSequence_cff::U.
bool Event::to | ( | edm::RunNumber_t | run, |
edm::LuminosityBlockNumber_t | lumi, | ||
edm::EventNumber_t | event | ||
) |
Definition at line 219 of file Event.cc.
References branchMap_, mps_splice::entry, entryFinder_, fwlite::EntryFinder::fillIndex(), fwlite::EntryFinder::findEvent(), fwlite::EntryFinder::invalidEntry, writedatasetfile::run, and fwlite::BranchMapReader::updateEvent().
|
overridevirtual |
Go to the very first Event.
Implements fwlite::EventBase.
Definition at line 230 of file Event.cc.
References branchMap_, and fwlite::BranchMapReader::updateEvent().
Referenced by FWHLTTriggerTableView::fillAverageAcceptFractions(), and FWFileEntry::filterEventsWithCustomParser().
|
overridevirtual |
Implements edm::EventBase.
Definition at line 411 of file Event.cc.
References Exception, fillParameterSetRegistry(), names, parameterSetRegistryFilled_, edm::EventBase::triggerNames_(), and triggerResults.
Referenced by FWHLTTriggerTableView::fillAverageAcceptFractions(), and FWFileEntry::filterEventsWithCustomParser().
|
overridevirtual |
Implements edm::EventBase.
Definition at line 489 of file Event.cc.
References fillParameterSetRegistry(), names, parameterSetRegistryFilled_, edm::EventBase::triggerNames_(), and triggerResults.
|
private |
Definition at line 315 of file Event.cc.
References aux_, auxBranch_, edm::conversion(), and pOldAux_.
Referenced by eventAuxiliary(), and history().
|
friend |
|
friend |
|
friend |
|
friend |
|
mutableprivate |
Definition at line 232 of file Event.h.
Referenced by eventAuxiliary(), history(), and updateAux().
|
private |
Definition at line 236 of file Event.h.
Referenced by Event(), and updateAux().
|
mutableprivate |
Definition at line 225 of file Event.h.
Referenced by atEnd(), draw(), Event(), eventAuxiliary(), fillParameterSetRegistry(), getBranchDescriptions(), getByLabel(), getByProductID(), getByTokenImp(), getLuminosityBlock(), getRun(), getTFile(), getThinnedKeyFrom(), getThinnedProduct(), getThinnedProducts(), history(), indexFromEventId(), isValid(), operator++(), scan(), size(), to(), and toBegin().
|
private |
Definition at line 240 of file Event.h.
Referenced by consumes(), draw(), getBranchNameFor(), getByLabel(), getByProductID(), getByTokenImp(), getThinnedKeyFrom(), getThinnedProduct(), getThinnedProducts(), scan(), and setGetter().
|
mutableprivate |
Definition at line 233 of file Event.h.
Referenced by indexFromEventId(), and to().
|
private |
|
mutableprivate |
|
private |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
Definition at line 223 of file Event.h.
Referenced by getLuminosityBlock().
|
mutableprivate |
Definition at line 238 of file Event.h.
Referenced by fillParameterSetRegistry(), parameterSet(), triggerNames(), and triggerResultsByName().
|
private |
|
private |
Definition at line 235 of file Event.h.
Referenced by Event(), updateAux(), and ~Event().
|
mutableprivate |
Definition at line 231 of file Event.h.
Referenced by getProcessHistory(), and history().
|
mutableprivate |
|
mutableprivate |
Definition at line 241 of file Event.h.
Referenced by Event(), getLuminosityBlock(), and getRun().