Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:02

0001 #ifndef FWCore_ServiceRegistry_ConsumesInfo_h
0002 #define FWCore_ServiceRegistry_ConsumesInfo_h
0003 
0004 /**\class edm::ConsumesInfo
0005 
0006    Description: Contains information about a product
0007    a module will get (consume).
0008 
0009    Usage: These are typically returned by the PathsAndConsumesOfModules
0010    object obtained in the PreBeginJob callback for a service.
0011 */
0012 //
0013 // Original Author: W. David Dagenhart
0014 //         Created: 12/4/2014
0015 
0016 #include "FWCore/Utilities/interface/BranchType.h"
0017 #include "FWCore/Utilities/interface/ProductKindOfType.h"
0018 #include "FWCore/Utilities/interface/TypeID.h"
0019 
0020 #include <string_view>
0021 
0022 namespace edm {
0023   class ConsumesInfo {
0024   public:
0025     ConsumesInfo(TypeID const& iType,
0026                  char const* iLabel,
0027                  char const* iInstance,
0028                  char const* iProcess,
0029                  BranchType iBranchType,
0030                  KindOfType iKindOfType,
0031                  bool iAlwaysGets,
0032                  bool iSkipCurrentProcess_);
0033 
0034     TypeID const& type() const { return type_; }
0035     std::string_view label() const { return label_; }
0036     std::string_view instance() const { return instance_; }
0037     std::string_view process() const { return process_; }
0038     BranchType branchType() const { return branchType_; }
0039     KindOfType kindOfType() const { return kindOfType_; }
0040     bool alwaysGets() const { return alwaysGets_; }
0041     bool skipCurrentProcess() const { return skipCurrentProcess_; }
0042 
0043     // This provides information from EDConsumerBase
0044     //
0045     // process is empty - A get will search over processes in reverse
0046     //    time order (unknown which process the product will be gotten
0047     //    from and it is possible for this to vary from event to event)
0048 
0049   private:
0050     TypeID type_;
0051     std::string_view label_;
0052     std::string_view instance_;
0053     std::string_view process_;
0054     BranchType branchType_;
0055     KindOfType kindOfType_;
0056     bool alwaysGets_;
0057     bool skipCurrentProcess_;
0058   };
0059 }  // namespace edm
0060 #endif