File indexing completed on 2024-04-06 12:02:14
0001 #include "FWCore/Utilities/interface/Exception.h"
0002
0003 #include "boost/serialization/export.hpp"
0004
0005 #include "CondFormats/HcalObjects/interface/DummyOOTPileupCorrection.h"
0006
0007 void DummyOOTPileupCorrection::apply(const HcalDetId& ,
0008 const double* inputCharge,
0009 const unsigned lenInputCharge,
0010 const BunchXParameter* ,
0011 unsigned ,
0012 unsigned ,
0013 unsigned ,
0014 double* correctedCharge,
0015 const unsigned lenCorrectedCharge,
0016 bool* pulseShapeCorrApplied,
0017 bool* leakCorrApplied,
0018 bool* readjustTiming) const {
0019
0020 if (inputCharge == nullptr || correctedCharge == nullptr || lenCorrectedCharge < lenInputCharge ||
0021 pulseShapeCorrApplied == nullptr || leakCorrApplied == nullptr || readjustTiming == nullptr)
0022 throw cms::Exception("Invalid arguments in DummyOOTPileupCorrection::apply");
0023
0024
0025 for (unsigned i = 0; i < lenInputCharge; ++i)
0026 correctedCharge[i] = scale_ * inputCharge[i];
0027
0028
0029
0030 *pulseShapeCorrApplied = false;
0031 *leakCorrApplied = false;
0032
0033
0034
0035 *readjustTiming = false;
0036 }
0037
0038 bool DummyOOTPileupCorrection::isEqual(const AbsOOTPileupCorrection& otherBase) const {
0039
0040
0041 const DummyOOTPileupCorrection& r = static_cast<const DummyOOTPileupCorrection&>(otherBase);
0042 return descr_ == r.descr_ && scale_ == r.scale_;
0043 }
0044
0045 BOOST_CLASS_EXPORT_IMPLEMENT(DummyOOTPileupCorrection)