CMS 3D CMS Logo

AbsHcalAlgoData.h
Go to the documentation of this file.
1 #ifndef CondFormats_HcalObjects_AbsHcalAlgoData_h_
2 #define CondFormats_HcalObjects_AbsHcalAlgoData_h_
3 
4 #include <typeinfo>
5 
6 //
7 // Classes inheriting from this one are supposed to configure
8 // various Hcal reco algorithms
9 //
11 {
12 public:
13  inline virtual ~AbsHcalAlgoData() {}
14 
15  // Comparison operators. Note that they are not virtual and should
16  // not be overriden by derived classes. These operators are very
17  // useful for I/O testing.
18  inline bool operator==(const AbsHcalAlgoData& r) const
19  {return (typeid(*this) == typeid(r)) && this->isEqual(r);}
20  inline bool operator!=(const AbsHcalAlgoData& r) const
21  {return !(*this == r);}
22 
23 protected:
24  // Method needed to compare objects for equality.
25  // Must be implemented by derived classes.
26  virtual bool isEqual(const AbsHcalAlgoData&) const = 0;
27 };
28 
29 #endif // CondFormats_HcalObjects_AbsHcalAlgoData_h_
bool operator==(const AbsHcalAlgoData &r) const
virtual ~AbsHcalAlgoData()
virtual bool isEqual(const AbsHcalAlgoData &) const =0
bool operator!=(const AbsHcalAlgoData &r) const