CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
edm::OccurrenceForOutput Class Reference

#include <OccurrenceForOutput.h>

Inheritance diagram for edm::OccurrenceForOutput:
edm::EventForOutput edm::LuminosityBlockForOutput edm::ProcessBlockForOutput edm::RunForOutput

Public Member Functions

void getAllProvenance (std::vector< Provenance const * > &provenances) const
 
void getAllStableProvenance (std::vector< StableProvenance const * > &provenances) const
 
BasicHandle getByToken (EDGetToken token, TypeID const &typeID) const
 
template<typename PROD >
bool getByToken (EDGetToken token, Handle< PROD > &result) const
 
template<typename PROD >
bool getByToken (EDGetTokenT< PROD > token, Handle< PROD > &result) const
 
template<typename PROD >
Handle< PRODgetHandle (EDGetTokenT< PROD > token) const
 
Provenance getProvenance (BranchID const &theID) const
 
 OccurrenceForOutput (Principal const &ep, ModuleDescription const &md, ModuleCallingContext const *, bool isAtEnd)
 
virtual ProcessHistory const & processHistory () const
 
ProcessHistoryID const & processHistoryID () const
 
void setConsumer (EDConsumerBase const *iConsumer)
 
size_t size () const
 
virtual ~OccurrenceForOutput ()
 

Protected Member Functions

Principal const & principal () const
 

Private Member Functions

ModuleCallingContext const * moduleCallingContext () const
 

Private Attributes

ModuleCallingContext const * moduleCallingContext_
 
PrincipalGetAdapter provRecorder_
 

Friends

class edmtest::TestOutputModule
 

Detailed Description

Definition at line 45 of file OccurrenceForOutput.h.

Constructor & Destructor Documentation

edm::OccurrenceForOutput::OccurrenceForOutput ( Principal const &  ep,
ModuleDescription const &  md,
ModuleCallingContext const *  moduleCallingContext,
bool  isAtEnd 
)

Definition at line 14 of file OccurrenceForOutput.cc.

ModuleCallingContext const * moduleCallingContext() const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
edm::OccurrenceForOutput::~OccurrenceForOutput ( )
virtual

Definition at line 20 of file OccurrenceForOutput.cc.

20 {}

Member Function Documentation

void edm::OccurrenceForOutput::getAllProvenance ( std::vector< Provenance const * > &  provenances) const

Definition at line 32 of file OccurrenceForOutput.cc.

References edm::Principal::getAllProvenance(), edm::PrincipalGetAdapter::principal(), and provRecorder_.

32  {
34  }
Principal const & principal() const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Principal.cc:862
PrincipalGetAdapter provRecorder_
void edm::OccurrenceForOutput::getAllStableProvenance ( std::vector< StableProvenance const * > &  provenances) const

Definition at line 36 of file OccurrenceForOutput.cc.

References edm::Principal::getAllStableProvenance(), edm::PrincipalGetAdapter::principal(), and provRecorder_.

36  {
38  }
Principal const & principal() const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Principal.cc:879
PrincipalGetAdapter provRecorder_
BasicHandle edm::OccurrenceForOutput::getByToken ( EDGetToken  token,
TypeID const &  typeID 
) const

Definition at line 44 of file OccurrenceForOutput.cc.

References edm::PrincipalGetAdapter::getByToken_(), edm::PrincipalGetAdapter::isComplete(), moduleCallingContext_, edm::PRODUCT_TYPE, provRecorder_, mps_fire::result, and edm::principal_get_adapter_detail::throwOnPrematureRead().

Referenced by SummaryTableOutputBranches::fill(), EventStringOutputBranches::fill(), TriggerOutputBranches::fill(), TableOutputBranches::fill(), edm::RootOutputFile::fillBranches(), edm::StreamerOutputModuleBase::getTriggerResults(), evf::EvFOutputModule::getTriggerResults(), evf::GlobalEvFOutputModule::getTriggerResults(), edm::detail::TriggerResultsBasedEventSelector::wantEvent(), FRDOutputModule::write(), edm::ProvenanceCheckerOutputModule::write(), RawEventOutputModuleForBU< Consumer >::write(), and NanoAODOutputModule::writeRun().

44  {
46  if (result.failedToGet()) {
47  return result;
48  }
49  if (!provRecorder_.isComplete() && result.wrapper()->isMergeable()) {
50  principal_get_adapter_detail::throwOnPrematureRead("RunOrLumi", typeID, token);
51  }
52  return result;
53  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
tuple result
Definition: mps_fire.py:311
ModuleCallingContext const * moduleCallingContext_
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
PrincipalGetAdapter provRecorder_
template<typename PROD >
bool edm::OccurrenceForOutput::getByToken ( EDGetToken  token,
Handle< PROD > &  result 
) const

Definition at line 89 of file OccurrenceForOutput.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::HandleBase::failedToGet(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

89  {
91  principal_get_adapter_detail::throwOnPrematureRead("RunOrLumi", TypeID(typeid(PROD)), token);
92  }
93  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
94  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
95  if (result.failedToGet()) {
96  return false;
97  }
98  return true;
99  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
def move
Definition: eostools.py:511
ModuleCallingContext const * moduleCallingContext_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
PrincipalGetAdapter provRecorder_
template<typename PROD >
bool edm::OccurrenceForOutput::getByToken ( EDGetTokenT< PROD token,
Handle< PROD > &  result 
) const

Definition at line 102 of file OccurrenceForOutput.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::HandleBase::failedToGet(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

102  {
104  principal_get_adapter_detail::throwOnPrematureRead("RunOrLumi", TypeID(typeid(PROD)), token);
105  }
106  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
107  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
108  if (result.failedToGet()) {
109  return false;
110  }
111  return true;
112  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
def move
Definition: eostools.py:511
ModuleCallingContext const * moduleCallingContext_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
PrincipalGetAdapter provRecorder_
template<typename PROD >
Handle< PROD > edm::OccurrenceForOutput::getHandle ( EDGetTokenT< PROD token) const

Definition at line 115 of file OccurrenceForOutput.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

Referenced by edm::StreamerOutputModuleBase::beginRun(), evf::EvFOutputModule::beginRun(), and evf::GlobalEvFOutputModule::globalBeginRun().

115  {
117  principal_get_adapter_detail::throwOnPrematureRead("RunOrLumi", TypeID(typeid(PROD)), token);
118  }
119  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
120  return convert_handle<PROD>(std::move(bh)); // throws on conversion error
121  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
def move
Definition: eostools.py:511
ModuleCallingContext const * moduleCallingContext_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
PrincipalGetAdapter provRecorder_
Provenance edm::OccurrenceForOutput::getProvenance ( BranchID const &  theID) const

Definition at line 28 of file OccurrenceForOutput.cc.

References edm::Principal::getProvenance(), edm::PrincipalGetAdapter::principal(), and provRecorder_.

Referenced by edm::AsciiOutputModule::write(), and edm::ProvenanceCheckerOutputModule::write().

28  {
30  }
Principal const & principal() const
Provenance const & getProvenance(BranchID const &bid) const
Definition: Principal.cc:837
PrincipalGetAdapter provRecorder_
ModuleCallingContext const* edm::OccurrenceForOutput::moduleCallingContext ( ) const
inlineprivate

Definition at line 81 of file OccurrenceForOutput.h.

References moduleCallingContext_.

81 { return moduleCallingContext_; }
ModuleCallingContext const * moduleCallingContext_
Principal const & edm::OccurrenceForOutput::principal ( ) const
protected
ProcessHistory const & edm::OccurrenceForOutput::processHistory ( ) const
virtual
ProcessHistoryID const & edm::OccurrenceForOutput::processHistoryID ( ) const
void edm::OccurrenceForOutput::setConsumer ( EDConsumerBase const *  iConsumer)
size_t edm::OccurrenceForOutput::size ( void  ) const

Friends And Related Function Documentation

friend class edmtest::TestOutputModule
friend

Definition at line 80 of file OccurrenceForOutput.h.

Member Data Documentation

ModuleCallingContext const* edm::OccurrenceForOutput::moduleCallingContext_
private

Definition at line 85 of file OccurrenceForOutput.h.

Referenced by getByToken(), getHandle(), and moduleCallingContext().

PrincipalGetAdapter edm::OccurrenceForOutput::provRecorder_
private