CMS 3D CMS Logo

OccurrenceForOutput.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_OccurrenceForOutput_h
2 #define FWCore_Framework_OccurrenceForOutput_h
3 
4 // -*- C++ -*-
5 //
6 // Package: Framework
7 // Class : OccurrenceForOutput
8 //
12 /*----------------------------------------------------------------------
13 ----------------------------------------------------------------------*/
14 
20 
26 
27 #include <memory>
28 #include <string>
29 #include <typeinfo>
30 #include <vector>
31 
32 class testEventGetRefBeforePut;
33 
34 namespace edmtest {
35  class TestOutputModule;
36 }
37 
38 namespace edm {
39 
40  class BranchDescription;
41  class ModuleCallingContext;
42  class Principal;
43  class EDConsumerBase;
44 
46  public:
47  OccurrenceForOutput(Principal const& ep, ModuleDescription const& md, ModuleCallingContext const*, bool isAtEnd);
48  virtual ~OccurrenceForOutput();
49 
50  //Used in conjunction with EDGetToken
51  void setConsumer(EDConsumerBase const* iConsumer);
52 
53  ProcessHistoryID const& processHistoryID() const;
54 
55  BasicHandle getByToken(EDGetToken token, TypeID const& typeID) const;
56 
57  template <typename PROD>
59 
60  template <typename PROD>
62 
63  template <typename PROD>
65 
66  Provenance getProvenance(BranchID const& theID) const;
67 
68  void getAllProvenance(std::vector<Provenance const*>& provenances) const;
69 
70  void getAllStableProvenance(std::vector<StableProvenance const*>& provenances) const;
71 
72  virtual ProcessHistory const& processHistory() const;
73 
74  size_t size() const;
75 
76  protected:
77  Principal const& principal() const;
78 
79  private:
80  friend class edmtest::TestOutputModule; // For testing
82 
84 
86  };
87 
88  template <typename PROD>
92  }
94  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
95  if (result.failedToGet()) {
96  return false;
97  }
98  return true;
99  }
100 
101  template <typename PROD>
105  }
107  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
108  if (result.failedToGet()) {
109  return false;
110  }
111  return true;
112  }
113 
114  template <typename PROD>
118  }
120  return convert_handle<PROD>(std::move(bh)); // throws on conversion error
121  }
122 
123 } // namespace edm
124 #endif
edm::OccurrenceForOutput::OccurrenceForOutput
OccurrenceForOutput(Principal const &ep, ModuleDescription const &md, ModuleCallingContext const *, bool isAtEnd)
Definition: OccurrenceForOutput.cc:14
edm::OccurrenceForOutput::size
size_t size() const
Definition: OccurrenceForOutput.cc:42
edm::OccurrenceForOutput::~OccurrenceForOutput
virtual ~OccurrenceForOutput()
Definition: OccurrenceForOutput.cc:20
Handle.h
edm::PRODUCT_TYPE
Definition: ProductKindOfType.h:5
edm::BasicHandle
Definition: BasicHandle.h:43
propagate_const.h
edm::OccurrenceForOutput::moduleCallingContext
ModuleCallingContext const * moduleCallingContext() const
Definition: OccurrenceForOutput.h:81
edm::PrincipalGetAdapter
Definition: PrincipalGetAdapter.h:132
edmtest
Definition: AlignPCLThresholdsReader.cc:12
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm::OccurrenceForOutput::getHandle
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: OccurrenceForOutput.h:115
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::OccurrenceForOutput::getAllStableProvenance
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: OccurrenceForOutput.cc:36
TypeID.h
edm::Principal
Definition: Principal.h:57
edm::OccurrenceForOutput::TestOutputModule
friend class edmtest::TestOutputModule
Definition: OccurrenceForOutput.h:80
edm::Handle
Definition: AssociativeIterator.h:50
edm::ModuleDescription
Definition: ModuleDescription.h:21
edm::OccurrenceForOutput
Definition: OccurrenceForOutput.h:45
edm::EDConsumerBase
Definition: EDConsumerBase.h:70
edm::PrincipalGetAdapter::getByToken_
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
Definition: PrincipalGetAdapter.cc:147
edm::OccurrenceForOutput::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: OccurrenceForOutput.cc:26
BranchListIndex.h
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::BranchID
Definition: BranchID.h:14
edm::Hash< ProcessHistoryType >
edm::OccurrenceForOutput::processHistory
virtual ProcessHistory const & processHistory() const
Definition: OccurrenceForOutput.cc:40
EDGetToken.h
edm::OccurrenceForOutput::getByToken
BasicHandle getByToken(EDGetToken token, TypeID const &typeID) const
Definition: OccurrenceForOutput.cc:44
edm::OccurrenceForOutput::moduleCallingContext_
ModuleCallingContext const * moduleCallingContext_
Definition: OccurrenceForOutput.h:85
ConvertHandle.h
edm::OccurrenceForOutput::getAllProvenance
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: OccurrenceForOutput.cc:32
edm::EDGetToken
Definition: EDGetToken.h:35
edm::OccurrenceForOutput::principal
Principal const & principal() const
Definition: OccurrenceForOutput.cc:24
edm::TypeID
Definition: TypeID.h:22
Wrapper.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
Frameworkfwd.h
edm::OccurrenceForOutput::getProvenance
Provenance getProvenance(BranchID const &theID) const
Definition: OccurrenceForOutput.cc:28
BasicHandle.h
edm::OccurrenceForOutput::setConsumer
void setConsumer(EDConsumerBase const *iConsumer)
Definition: OccurrenceForOutput.cc:22
PrincipalGetAdapter.h
mps_fire.result
result
Definition: mps_fire.py:311
PROD
#define PROD(A, B)
Definition: Simplify_begin.h:55
edm::ProcessHistory
Definition: ProcessHistory.h:13
edm::Provenance
Definition: Provenance.h:34
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::PrincipalGetAdapter::checkIfComplete
bool checkIfComplete() const
Definition: PrincipalGetAdapter.h:312
edm::OccurrenceForOutput::provRecorder_
PrincipalGetAdapter provRecorder_
Definition: OccurrenceForOutput.h:83
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:318