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
void setConsumer(EDConsumerBase const *iConsumer)
ModuleCallingContext const * moduleCallingContext() const
OccurrenceForOutput(Principal const &ep, ModuleDescription const &md, ModuleCallingContext const *, bool isAtEnd)
void getAllStableProvenance(std::vector< StableProvenance const *> &provenances) const
friend class edmtest::TestOutputModule
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
BasicHandle getByToken(EDGetToken token, TypeID const &typeID) const
void getAllProvenance(std::vector< Provenance const *> &provenances) const
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
ProcessHistoryID const & processHistoryID() const
ModuleCallingContext const * moduleCallingContext_
virtual ProcessHistory const & processHistory() const
HLT enums.
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
Provenance getProvenance(BranchID const &theID) const
Principal const & principal() const
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_