Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:03:37

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     // There a couple cases that need explanation.
0045     //
0046     // consumesMany
0047     //    The label, instance and process are all empty.
0048     //
0049     // process is empty - A get will search over processes in reverse
0050     //    time order (unknown which process the product will be gotten
0051     //    from and it is possible for this to vary from event to event)
0052 
0053   private:
0054     TypeID type_;
0055     std::string_view label_;
0056     std::string_view instance_;
0057     std::string_view process_;
0058     BranchType branchType_;
0059     KindOfType kindOfType_;
0060     bool alwaysGets_;
0061     bool skipCurrentProcess_;
0062   };
0063 }  // namespace edm
0064 #endif