Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:07

0001 #ifndef CondFormats_HcalObjects_AbsHcalAlgoData_h_
0002 #define CondFormats_HcalObjects_AbsHcalAlgoData_h_
0003 
0004 #include <typeinfo>
0005 
0006 //
0007 // Classes inheriting from this one are supposed to configure
0008 // various Hcal reco algorithms
0009 //
0010 class AbsHcalAlgoData {
0011 public:
0012   inline virtual ~AbsHcalAlgoData() {}
0013 
0014   // Comparison operators. Note that they are not virtual and should
0015   // not be overriden by derived classes. These operators are very
0016   // useful for I/O testing.
0017   inline bool operator==(const AbsHcalAlgoData& r) const { return (typeid(*this) == typeid(r)) && this->isEqual(r); }
0018   inline bool operator!=(const AbsHcalAlgoData& r) const { return !(*this == r); }
0019 
0020 protected:
0021   // Method needed to compare objects for equality.
0022   // Must be implemented by derived classes.
0023   virtual bool isEqual(const AbsHcalAlgoData&) const = 0;
0024 };
0025 
0026 #endif  // CondFormats_HcalObjects_AbsHcalAlgoData_h_