DummyOOTPileupCorrection

guid_defined

version

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
#ifndef CondFormats_HcalObjects_DummyOOTPileupCorrection_h
#define CondFormats_HcalObjects_DummyOOTPileupCorrection_h

#include <string>

#include "boost/serialization/version.hpp"

#include "CondFormats/HcalObjects/interface/AbsOOTPileupCorrection.h"

class DummyOOTPileupCorrection : public AbsOOTPileupCorrection {
public:
  // Constructor
  inline DummyOOTPileupCorrection(const std::string& itemDescription, const double scale)
      : descr_(itemDescription), scale_(scale) {}

  // Destructor
  inline ~DummyOOTPileupCorrection() override {}

  // Inspectors
  inline const std::string& description() const { return descr_; }
  inline double getScale() const { return scale_; }

  // Main correction function
  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 override;

  // Are we using charge or energy?
  inline bool inputIsEnergy() const override { return false; }

protected:
  // Comparison function must be implemented
  bool isEqual(const AbsOOTPileupCorrection& otherBase) const override;

public:
  // Default constructor needed for serialization.
  // Do not use in application code.
  inline DummyOOTPileupCorrection() {}

private:
  std::string descr_;
  double scale_;

  friend class boost::serialization::access;

  template <class Archive>
  inline void serialize(Archive& ar, unsigned /* version */) {
    boost::serialization::base_object<AbsOOTPileupCorrection>(*this);
    ar & descr_ & scale_;
  }
};

BOOST_CLASS_VERSION(DummyOOTPileupCorrection, 1)
BOOST_CLASS_EXPORT_KEY(DummyOOTPileupCorrection)

#endif  // CondFormats_HcalObjects_DummyOOTPileupCorrection_h