Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-11 03:34:12

0001 #ifndef FWCore_Framework_EventForTransformer_h
0002 #define FWCore_Framework_EventForTransformer_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:     Framework
0007 // Class  :     EventForTransformer
0008 //
0009 /**\class edm::EventForTransformer
0010 
0011 */
0012 /*----------------------------------------------------------------------
0013 ----------------------------------------------------------------------*/
0014 
0015 #include "DataFormats/Common/interface/BasicHandle.h"
0016 #include "DataFormats/Common/interface/WrapperBase.h"
0017 
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019 #include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"
0020 #include "FWCore/Utilities/interface/TypeID.h"
0021 #include "FWCore/Utilities/interface/ProductResolverIndex.h"
0022 
0023 #include <memory>
0024 
0025 namespace edm {
0026 
0027   class EventPrincipal;
0028 
0029   class EventForTransformer {
0030   public:
0031     EventForTransformer(EventPrincipal const&, ModuleCallingContext) noexcept;
0032 
0033     BasicHandle get(edm::TypeID const& iTypeID, ProductResolverIndex iIndex) const;
0034 
0035     void put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp, BasicHandle const& iGetHandle);
0036 
0037     ModuleCallingContext const& moduleCallingContext() const noexcept { return mcc_; }
0038 
0039   private:
0040     EventPrincipal const& eventPrincipal_;
0041     ModuleCallingContext mcc_;
0042   };
0043 }  // namespace edm
0044 #endif