File indexing completed on 2024-04-06 12:01:23
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "CondFormats/Common/interface/BaseKeyed.h"
0010 #include "CondFormats/Calibration/interface/Conf.h"
0011 #include "CondFormats/DataRecord/interface/ExEfficiency.h"
0012
0013 #include "CondFormats/DTObjects/interface/DTKeyedConfig.h"
0014 #include "CondFormats/DataRecord/interface/DTKeyedConfigContainerRcd.h"
0015 #include "CondFormats/DataRecord/interface/DTKeyedConfigListRcd.h"
0016
0017 #include "CondCore/ESSources/interface/registration_macros.h"
0018 #include "CondCore/CondDB/interface/KeyListProxy.h"
0019
0020 namespace cond {
0021 template <>
0022 std::unique_ptr<BaseKeyed> deserialize<BaseKeyed>(const std::string& payloadType,
0023 const Binary& payloadData,
0024 const Binary& streamerInfoData) {
0025 DESERIALIZE_BASE_CASE(BaseKeyed);
0026 DESERIALIZE_POLIMORPHIC_CASE(BaseKeyed, condex::ConfI);
0027 DESERIALIZE_POLIMORPHIC_CASE(BaseKeyed, DTKeyedConfig);
0028
0029
0030 throwException(std::string("Type mismatch, target object is type \"") + payloadType + "\"", "deserialize<>");
0031 }
0032 }
0033
0034 namespace cond::serialization {
0035 template <>
0036 struct BaseClassInfo<BaseKeyed> {
0037 constexpr static bool kAbstract = false;
0038 using inheriting_classes_t = edm::mpl::Vector<condex::ConfI, DTKeyedConfig>;
0039 };
0040 }
0041
0042 DEFINE_COND_CLASSNAME(condex::ConfI)
0043 DEFINE_COND_CLASSNAME(DTKeyedConfig)
0044
0045 DEFINE_COND_SERIAL_REGISTER_PLUGIN(cond::BaseKeyed);
0046
0047 REGISTER_PLUGIN_NO_SERIAL(ExDwarfRcd, cond::BaseKeyed);
0048 REGISTER_KEYLIST_PLUGIN(ExDwarfListRcd, cond::persistency::KeyList, ExDwarfRcd);
0049
0050 REGISTER_PLUGIN_NO_SERIAL(DTKeyedConfigContainerRcd, cond::BaseKeyed);
0051 REGISTER_KEYLIST_PLUGIN(DTKeyedConfigListRcd, cond::persistency::KeyList, DTKeyedConfigContainerRcd);