Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:19

0001 #ifndef FWCore_Utilities_ProcessBlockIndex_h
0002 #define FWCore_Utilities_ProcessBlockIndex_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Utilities
0006 // Class  :     edm::ProcessBlockIndex
0007 //
0008 /**\class edm::ProcessBlockIndex
0009 
0010  Description: Identifies a ProcessBlock
0011 
0012  Usage:
0013 */
0014 //
0015 // Original Author:  W. David Dagenhart
0016 //         Created:  18 March 2020
0017 
0018 namespace edm {
0019   class ProcessBlockPrincipal;
0020 
0021   class ProcessBlockIndex {
0022   public:
0023     ProcessBlockIndex() = delete;
0024     ~ProcessBlockIndex() = default;
0025     ProcessBlockIndex(const ProcessBlockIndex&) = default;
0026     ProcessBlockIndex& operator=(const ProcessBlockIndex&) = default;
0027 
0028     bool operator==(const ProcessBlockIndex& iIndex) const { return value() == iIndex.value(); }
0029     operator unsigned int() const { return value_; }
0030 
0031     unsigned int value() const { return value_; }
0032 
0033     static ProcessBlockIndex invalidProcessBlockIndex();
0034 
0035   private:
0036     ///Only the ProcessBlockPrincipal is allowed to make one of these
0037     friend class ProcessBlockPrincipal;
0038     explicit ProcessBlockIndex(unsigned int iIndex) : value_(iIndex) {}
0039 
0040     unsigned int value_;
0041 
0042     static const unsigned int invalidValue_;
0043   };
0044 }  // namespace edm
0045 
0046 #endif