Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "CondFormats/EcalObjects/interface/EcalADCToGeVConstant.h"
0002 #include "CondFormats/DataRecord/interface/EcalADCToGeVConstantRcd.h"
0003 #include "CondTools/RunInfo/interface/BTransitionAnalyzer.h"
0004 #include <sstream>
0005 
0006 class EcalADCToGeVConstantBTransitionAnalyzer
0007     : public cond::BTransitionAnalyzer<EcalADCToGeVConstant, EcalADCToGeVConstantRcd> {
0008 public:
0009   EcalADCToGeVConstantBTransitionAnalyzer(edm::ParameterSet const& pset)
0010       : cond::BTransitionAnalyzer<EcalADCToGeVConstant, EcalADCToGeVConstantRcd>(pset) {}
0011   bool equalPayloads(edm::ESHandle<EcalADCToGeVConstant> const& payloadHandle,
0012                      edm::ESHandle<EcalADCToGeVConstant> const& payloadRefHandle) override {
0013     bool areEquals = false;
0014     std::ostringstream os;
0015     os << "["
0016        << "EcalADCToGeVConstantBTransitionAnalyzer::" << __func__ << "]: "
0017        << "Payload extracted starting from magnetic field value: ";
0018     payloadHandle->print(os);
0019     os << "\nReference payload from the target tag: ";
0020     payloadRefHandle->print(os);
0021     edm::LogInfo("EcalADCToGeVConstantBTransitionAnalyzer") << os.str();
0022     if (payloadHandle->getEBValue() == payloadRefHandle->getEBValue() &&
0023         payloadHandle->getEEValue() == payloadRefHandle->getEEValue())
0024       areEquals = true;
0025     return areEquals;
0026   }
0027 };
0028 
0029 #include "FWCore/Framework/interface/MakerMacros.h"
0030 DEFINE_FWK_MODULE(EcalADCToGeVConstantBTransitionAnalyzer);