Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:41

0001 /*
0002  *  plugin.cc
0003  *  CMSSW
0004  *
0005  *  Created by Chris Jones on 7/24/05.
0006  *
0007  */
0008 
0009 #include "CondCore/ESSources/interface/registration_macros.h"
0010 #include "CondFormats/HcalObjects/interface/AllObjects.h"
0011 #include "CondFormats/DataRecord/interface/HcalAllRcds.h"
0012 
0013 #include "CondFormats/DataRecord/interface/HcalOOTPileupCorrectionRcd.h"
0014 #include "CondFormats/HcalObjects/interface/OOTPileupCorrectionColl.h"
0015 
0016 #include "CondFormats/DataRecord/interface/HcalOOTPileupCompatibilityRcd.h"
0017 #include "CondFormats/HcalObjects/interface/OOTPileupCorrectionBuffer.h"
0018 
0019 #include "CondFormats/DataRecord/interface/HcalOOTPileupCorrectionMapCollRcd.h"
0020 #include "CondFormats/HcalObjects/interface/OOTPileupCorrectionMapColl.h"
0021 
0022 #include "CondFormats/DataRecord/interface/HcalInterpolatedPulseCollRcd.h"
0023 #include "CondFormats/HcalObjects/interface/HcalInterpolatedPulseColl.h"
0024 
0025 #include "CondFormats/DataRecord/interface/HBHENegativeEFilterRcd.h"
0026 #include "CondFormats/HcalObjects/interface/HBHENegativeEFilter.h"
0027 
0028 #include "CondFormats/DataRecord/interface/HFPhase1PMTParamsRcd.h"
0029 #include "CondFormats/HcalObjects/interface/HFPhase1PMTParams.h"
0030 
0031 //
0032 #include "CondCore/CondDB/interface/Serialization.h"
0033 
0034 // required for compiling ( the only available constructor in this class ). Can't be used in persistency without this...
0035 namespace cond {
0036   template <>
0037   HcalCalibrationQIEData* createPayload<HcalCalibrationQIEData>(const std::string& payloadTypeName) {
0038     if (payloadTypeName == "HcalCalibrationQIEData")
0039       return new HcalCalibrationQIEData(nullptr);
0040     throwException(std::string("Type mismatch, target object is type \"") + payloadTypeName + "\"", "createPayload");
0041   }
0042 
0043 }  // namespace cond
0044 
0045 namespace cond::serialization {
0046   template <>
0047   std::unique_ptr<HcalCalibrationQIEData> makeClass<HcalCalibrationQIEData>() {
0048     return std::make_unique<HcalCalibrationQIEData>(nullptr);
0049   }
0050 }  // namespace cond::serialization
0051 
0052 namespace {
0053   struct InitHcalElectronicsMap {
0054     void operator()(HcalElectronicsMap& e) { e.initialize(); }
0055   };
0056 }  // namespace
0057 namespace {
0058   struct InitHcalDcsMap {
0059     void operator()(HcalDcsMap& e) { e.initialize(); }
0060   };
0061 }  // namespace
0062 namespace {
0063   struct InitHcalFrontEndMap {
0064     void operator()(HcalFrontEndMap& e) { e.initialize(); }
0065   };
0066 }  // namespace
0067 namespace {
0068   struct InitHcalSiPMCharacteristics {
0069     void operator()(HcalSiPMCharacteristics& e) { e.initialize(); }
0070   };
0071 }  // namespace
0072 
0073 REGISTER_PLUGIN(HcalPedestalsRcd, HcalPedestals);
0074 REGISTER_PLUGIN(HcalPedestalWidthsRcd, HcalPedestalWidths);
0075 REGISTER_PLUGIN(HcalGainsRcd, HcalGains);
0076 REGISTER_PLUGIN(HcalGainWidthsRcd, HcalGainWidths);
0077 REGISTER_PLUGIN(HcalPFCutsRcd, HcalPFCuts);
0078 REGISTER_PLUGIN_INIT(HcalElectronicsMapRcd, HcalElectronicsMap, InitHcalElectronicsMap);
0079 REGISTER_PLUGIN_INIT(HcalFrontEndMapRcd, HcalFrontEndMap, InitHcalFrontEndMap);
0080 REGISTER_PLUGIN(HcalChannelQualityRcd, HcalChannelQuality);
0081 REGISTER_PLUGIN(HcalQIEDataRcd, HcalQIEData);
0082 REGISTER_PLUGIN(HcalQIETypesRcd, HcalQIETypes);
0083 REGISTER_PLUGIN(HcalCalibrationQIEDataRcd, HcalCalibrationQIEData);
0084 REGISTER_PLUGIN(HcalZSThresholdsRcd, HcalZSThresholds);
0085 REGISTER_PLUGIN(HcalRespCorrsRcd, HcalRespCorrs);
0086 REGISTER_PLUGIN(HcalLUTCorrsRcd, HcalLUTCorrs);
0087 REGISTER_PLUGIN(HcalPFCorrsRcd, HcalPFCorrs);
0088 REGISTER_PLUGIN(HcalTimeCorrsRcd, HcalTimeCorrs);
0089 REGISTER_PLUGIN(HcalL1TriggerObjectsRcd, HcalL1TriggerObjects);
0090 REGISTER_PLUGIN(HcalValidationCorrsRcd, HcalValidationCorrs);
0091 REGISTER_PLUGIN(HcalLutMetadataRcd, HcalLutMetadata);
0092 REGISTER_PLUGIN(HcalDcsRcd, HcalDcsValues);
0093 REGISTER_PLUGIN_INIT(HcalDcsMapRcd, HcalDcsMap, InitHcalDcsMap);
0094 REGISTER_PLUGIN(HcalRecoParamsRcd, HcalRecoParams);
0095 REGISTER_PLUGIN(HcalLongRecoParamsRcd, HcalLongRecoParams);
0096 REGISTER_PLUGIN(HcalZDCLowGainFractionsRcd, HcalZDCLowGainFractions);
0097 REGISTER_PLUGIN(HcalMCParamsRcd, HcalMCParams);
0098 REGISTER_PLUGIN(HcalFlagHFDigiTimeParamsRcd, HcalFlagHFDigiTimeParams);
0099 REGISTER_PLUGIN(HcalTimingParamsRcd, HcalTimingParams);
0100 REGISTER_PLUGIN(HcalOOTPileupCorrectionRcd, OOTPileupCorrectionColl);
0101 REGISTER_PLUGIN(HcalOOTPileupCompatibilityRcd, OOTPileupCorrectionBuffer);
0102 REGISTER_PLUGIN(HcalOOTPileupCorrectionMapCollRcd, OOTPileupCorrectionMapColl);
0103 REGISTER_PLUGIN(HcalInterpolatedPulseCollRcd, HcalInterpolatedPulseColl);
0104 REGISTER_PLUGIN(HBHENegativeEFilterRcd, HBHENegativeEFilter);
0105 REGISTER_PLUGIN(HcalSiPMParametersRcd, HcalSiPMParameters);
0106 REGISTER_PLUGIN_INIT(HcalSiPMCharacteristicsRcd, HcalSiPMCharacteristics, InitHcalSiPMCharacteristics);
0107 REGISTER_PLUGIN(HcalTPParametersRcd, HcalTPParameters);
0108 REGISTER_PLUGIN(HcalTPChannelParametersRcd, HcalTPChannelParameters);
0109 REGISTER_PLUGIN(HFPhase1PMTParamsRcd, HFPhase1PMTParams);  // is HcalItemCollById<HFPhase1PMTData>