Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:42

0001 
0002 #ifndef DataFormats_SiStripCommon_SiStripNullKey_H
0003 #define DataFormats_SiStripCommon_SiStripNullKey_H
0004 
0005 #include "DataFormats/SiStripCommon/interface/ConstantsForGranularity.h"
0006 #include "DataFormats/SiStripCommon/interface/SiStripKey.h"
0007 
0008 class SiStripNullKey;
0009 
0010 /** Debug info for SiStripNullKey class. */
0011 std::ostream& operator<<(std::ostream&, const SiStripNullKey&);
0012 
0013 /**
0014    @class SiStripNullKey
0015    @author R.Bainbridge
0016 
0017    @brief Concrete implementation of abstract base, signifying null
0018    values or an "unknown" position or view.
0019 */
0020 class SiStripNullKey : public SiStripKey {
0021 public:
0022   // ---------- Constructors ----------
0023 
0024   /** Default constructor */
0025   SiStripNullKey();
0026 
0027   // ---------- Utility methods ----------
0028 
0029   /** Identifies key objects with identical member data. */
0030   bool isEqual(const SiStripKey&) const override;
0031 
0032   /** "Consistent" means identical and/or null (ie, "all") data. */
0033   bool isConsistent(const SiStripKey&) const override;
0034 
0035   /** Identifies all member data as being "valid" or null ("all"). */
0036   bool isValid() const override;
0037 
0038   /** All member data to level of "Granularity" are valid. If
0039       sistrip::Granularity is "undefined", returns false. */
0040   bool isValid(const sistrip::Granularity&) const override;
0041 
0042   /** Identifies all member data as being invalid. */
0043   bool isInvalid() const override;
0044 
0045   /** All member data to level of "Granularity" are invalid. If
0046       sistrip::Granularity is "undefined", returns true.  */
0047   bool isInvalid(const sistrip::Granularity&) const override;
0048 
0049   // ---------- Print methods ----------
0050 
0051   /** Print member data of the key  */
0052   void print(std::stringstream& ss) const override;
0053 
0054   /** A terse summary of the key  */
0055   void terse(std::stringstream& ss) const override { ; }
0056 
0057 private:
0058   // ---------- Private methods ----------
0059 
0060   void initFromValue() override;
0061   void initFromKey() override;
0062   void initFromPath() override;
0063   void initGranularity() override;
0064 };
0065 
0066 #endif  // DataFormats_SiStripCommon_SiStripNullKey_H