CMS 3D CMS Logo

plugin.cc
Go to the documentation of this file.
1 /*
2  * plugin.cc
3  * CMSSW
4  *
5  * Created by Chris Jones on 7/24/05.
6  *
7  */
8 
58 
59 //
61 #include <memory>
62 
63 
64 namespace cond {
65  template <> std::unique_ptr<CSCReadoutMapping> deserialize<CSCReadoutMapping>( const std::string& payloadType,
66  const Binary& payloadData,
67  const Binary& streamerInfoData ){
68  // DESERIALIZE_BASE_CASE( CSCReadoutMapping ); abstract
70  // here we come if none of the deserializations above match the payload type:
71  throwException(std::string("Type mismatch, target object is type \"")+payloadType+"\"", "deserialize<>" );
72  }
73  template <> std::unique_ptr<CSCReadoutMappingForSliceTest> deserialize<CSCReadoutMappingForSliceTest>( const std::string& payloadType,
74  const Binary& payloadData,
75  const Binary& streamerInfoData ){
76  // DESERIALIZE_BASE_CASE( CSCReadoutMappingForSliceTest ); abstract
78  // here we come if none of the deserializations above match the payload type:
79  throwException(std::string("Type mismatch, target object is type \"")+payloadType+"\"", "deserialize<>" );
80  }
81 }
82 
83 
std::unique_ptr< CSCReadoutMapping > deserialize< CSCReadoutMapping >(const std::string &payloadType, const Binary &payloadData, const Binary &streamerInfoData)
Definition: plugin.cc:65
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:21
#define DESERIALIZE_POLIMORPHIC_CASE(BASETYPENAME, DERIVEDTYPENAME)
CSC DCS Data type.
Definition: plugin.cc:24
#define REGISTER_PLUGIN(record_, type_)
std::unique_ptr< CSCReadoutMappingForSliceTest > deserialize< CSCReadoutMappingForSliceTest >(const std::string &payloadType, const Binary &payloadData, const Binary &streamerInfoData)
Definition: plugin.cc:73