CMS 3D CMS Logo

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::RunForOutput

Public Member Functions

void getAllProvenance (std::vector< Provenance const * > &provenances) const
 
void getAllStableProvenance (std::vector< StableProvenance const * > &provenances) const
 
template<typename PROD >
bool getByToken (EDGetToken token, Handle< PROD > &result) const
 
BasicHandle getByToken (EDGetToken token, TypeID const &typeID) 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

◆ OccurrenceForOutput()

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

Definition at line 14 of file OccurrenceForOutput.cc.

◆ ~OccurrenceForOutput()

OccurrenceForOutput::~OccurrenceForOutput ( )
virtual

Definition at line 20 of file OccurrenceForOutput.cc.

20 {}

Member Function Documentation

◆ getAllProvenance()

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

◆ getAllStableProvenance()

void OccurrenceForOutput::getAllStableProvenance ( std::vector< StableProvenance const * > &  provenances) const

◆ getByToken() [1/3]

template<typename PROD >
bool OccurrenceForOutput::getByToken ( EDGetToken  token,
Handle< PROD > &  result 
) const

Definition at line 89 of file OccurrenceForOutput.h.

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  }

References edm::PrincipalGetAdapter::checkIfComplete(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, mps_fire::result, edm::principal_get_adapter_detail::throwOnPrematureRead(), and unpackBuffers-CaloStage2::token.

◆ getByToken() [2/3]

BasicHandle OccurrenceForOutput::getByToken ( EDGetToken  token,
TypeID const &  typeID 
) const

◆ getByToken() [3/3]

template<typename PROD >
bool OccurrenceForOutput::getByToken ( EDGetTokenT< PROD token,
Handle< PROD > &  result 
) const

Definition at line 102 of file OccurrenceForOutput.h.

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  }

References edm::PrincipalGetAdapter::checkIfComplete(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, mps_fire::result, edm::principal_get_adapter_detail::throwOnPrematureRead(), and unpackBuffers-CaloStage2::token.

◆ getHandle()

template<typename PROD >
Handle< PROD > OccurrenceForOutput::getHandle ( EDGetTokenT< PROD token) const

◆ getProvenance()

Provenance OccurrenceForOutput::getProvenance ( BranchID const &  theID) const

◆ moduleCallingContext()

ModuleCallingContext const* edm::OccurrenceForOutput::moduleCallingContext ( ) const
inlineprivate

Definition at line 81 of file OccurrenceForOutput.h.

81 { return moduleCallingContext_; }

References moduleCallingContext_.

◆ principal()

Principal const & OccurrenceForOutput::principal ( ) const
protected

◆ processHistory()

ProcessHistory const & OccurrenceForOutput::processHistory ( ) const
virtual

◆ processHistoryID()

ProcessHistoryID const & OccurrenceForOutput::processHistoryID ( ) const

◆ setConsumer()

void OccurrenceForOutput::setConsumer ( EDConsumerBase const *  iConsumer)

◆ size()

size_t OccurrenceForOutput::size ( void  ) const

Friends And Related Function Documentation

◆ edmtest::TestOutputModule

friend class edmtest::TestOutputModule
friend

Definition at line 80 of file OccurrenceForOutput.h.

Member Data Documentation

◆ moduleCallingContext_

ModuleCallingContext const* edm::OccurrenceForOutput::moduleCallingContext_
private

Definition at line 85 of file OccurrenceForOutput.h.

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

◆ provRecorder_

PrincipalGetAdapter edm::OccurrenceForOutput::provRecorder_
private
edm::PrincipalGetAdapter::setConsumer
void setConsumer(EDConsumerBase const *iConsumer)
Definition: PrincipalGetAdapter.h:143
edm::PrincipalGetAdapter::principal
Principal const & principal() const
Definition: PrincipalGetAdapter.h:165
edm::PRODUCT_TYPE
Definition: ProductKindOfType.h:5
edm::OccurrenceForOutput::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition: OccurrenceForOutput.h:81
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::PrincipalGetAdapter::isComplete
bool isComplete() const
Definition: PrincipalGetAdapter.h:153
edm::Principal::getProvenance
Provenance getProvenance(BranchID const &bid, ModuleCallingContext const *mcc) const
Definition: Principal.cc:796
edm::Principal::getAllProvenance
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Principal.cc:813
edm::PrincipalGetAdapter::getByToken_
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
Definition: PrincipalGetAdapter.cc:147
edm::Principal::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:141
edm::principal_get_adapter_detail::throwOnPrematureRead
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
Definition: PrincipalGetAdapter.cc:55
edm::Principal::getAllStableProvenance
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Principal.cc:830
edm::OccurrenceForOutput::moduleCallingContext_
ModuleCallingContext const * moduleCallingContext_
Definition: OccurrenceForOutput.h:85
edm::OccurrenceForOutput::principal
Principal const & principal() const
Definition: OccurrenceForOutput.cc:24
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::Principal::size
size_t size() const
Definition: Principal.cc:298
mps_fire.result
result
Definition: mps_fire.py:303
PROD
#define PROD(A, B)
Definition: Simplify_begin.h:55
edm::PrincipalGetAdapter::checkIfComplete
bool checkIfComplete() const
Definition: PrincipalGetAdapter.h:312
edm::PrincipalGetAdapter::processHistory
ProcessHistory const & processHistory() const
Definition: PrincipalGetAdapter.cc:193
edm::OccurrenceForOutput::provRecorder_
PrincipalGetAdapter provRecorder_
Definition: OccurrenceForOutput.h:83
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316