Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-30 22:24:06

0001 #ifndef FWCore_Framework_ModuleConsumesMinimalESInfo_h
0002 #define FWCore_Framework_ModuleConsumesMinimalESInfo_h
0003 
0004 // -*- C++ -*-
0005 // Package:     FWCore/Framework
0006 // Class  :     ModuleConsumesMinimalESInfo
0007 // Minimal information about the consumes call for an EventSetup product
0008 // requested from an ED module
0009 
0010 #include "FWCore/Utilities/interface/Transition.h"
0011 #include "FWCore/Utilities/interface/ESIndices.h"
0012 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
0013 #include "FWCore/Framework/interface/DataKey.h"
0014 #include <string_view>
0015 
0016 namespace edm {
0017   struct ModuleConsumesMinimalESInfo {
0018     ModuleConsumesMinimalESInfo(Transition iTransition,
0019                                 eventsetup::EventSetupRecordKey const& iRecord,
0020                                 eventsetup::DataKey const& iDataKey,
0021                                 std::string_view iComponentLabel,
0022                                 ESResolverIndex iIndex)
0023         : transition_(iTransition),
0024           record_(iRecord),
0025           dataKey_(iDataKey.type(), iDataKey.name(), eventsetup::DataKey::DoNotCopyMemory()),
0026           componentLabel_(iComponentLabel) {}
0027     ModuleConsumesMinimalESInfo() = default;
0028     ModuleConsumesMinimalESInfo(ModuleConsumesMinimalESInfo&&) = default;
0029     ModuleConsumesMinimalESInfo& operator=(ModuleConsumesMinimalESInfo&&) = default;
0030 
0031     //want to avoid accidently copying dataKey_
0032     ModuleConsumesMinimalESInfo(ModuleConsumesMinimalESInfo const&) = delete;
0033     ModuleConsumesMinimalESInfo& operator=(ModuleConsumesMinimalESInfo const&) = delete;
0034 
0035     edm::Transition transition_;
0036     eventsetup::EventSetupRecordKey record_;
0037     eventsetup::DataKey dataKey_;
0038     std::string_view componentLabel_;
0039   };
0040 }  // namespace edm
0041 #endif  // FWCore_Framework_ModuleConsumesMinimalESInfo_h