CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DummyOOTPileupCorrection.h
Go to the documentation of this file.
1 #ifndef CondFormats_HcalObjects_DummyOOTPileupCorrection_h
2 #define CondFormats_HcalObjects_DummyOOTPileupCorrection_h
3 
4 #include <string>
5 
6 #include "boost/serialization/version.hpp"
7 
9 
11 {
12 public:
13  // Constructor
14  inline DummyOOTPileupCorrection(const std::string& itemDescription,
15  const double scale)
16  : descr_(itemDescription), scale_(scale) {}
17 
18  // Destructor
19  inline virtual ~DummyOOTPileupCorrection() {}
20 
21  // Inspectors
22  inline const std::string& description() const {return descr_;}
23  inline double getScale() const {return scale_;}
24 
25  // Main correction function
26  void apply(const HcalDetId& id,
27  const double* inputCharge, unsigned lenInputCharge,
28  const BunchXParameter* bcParams, unsigned lenBcParams,
29  unsigned firstTimeSlice, unsigned nTimeSlices,
30  double* correctedCharge, unsigned lenCorrectedCharge,
31  bool* pulseShapeCorrApplied, bool* leakCorrApplied,
32  bool* readjustTiming) const;
33 
34  // Are we using charge or energy?
35  inline bool inputIsEnergy() const {return false;}
36 
37 protected:
38  // Comparison function must be implemented
39  bool isEqual(const AbsOOTPileupCorrection& otherBase) const;
40 
41 public:
42  // Default constructor needed for serialization.
43  // Do not use in application code.
45 
46 private:
48  double scale_;
49 
51 
52  template<class Archive>
53  inline void serialize(Archive & ar, unsigned /* version */)
54  {
55  boost::serialization::base_object<AbsOOTPileupCorrection>(*this);
56  ar & descr_ & scale_;
57  }
58 };
59 
60 BOOST_CLASS_VERSION(DummyOOTPileupCorrection, 1)
61 BOOST_CLASS_EXPORT_KEY(DummyOOTPileupCorrection)
62 
63 #endif // CondFormats_HcalObjects_DummyOOTPileupCorrection_h
DummyOOTPileupCorrection(const std::string &itemDescription, const double scale)
bool isEqual(const AbsOOTPileupCorrection &otherBase) const
void serialize(Archive &ar, unsigned)
void apply(const HcalDetId &id, const double *inputCharge, unsigned lenInputCharge, const BunchXParameter *bcParams, unsigned lenBcParams, unsigned firstTimeSlice, unsigned nTimeSlices, double *correctedCharge, unsigned lenCorrectedCharge, bool *pulseShapeCorrApplied, bool *leakCorrApplied, bool *readjustTiming) const
friend class boost::serialization::access
const std::string & description() const