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 
19 
20 //
22 
23 
24 namespace cond {
25  template <> std::unique_ptr<condex::Efficiency> deserialize<condex::Efficiency>( const std::string& payloadType,
26  const Binary& payloadData,
27  const Binary& streamerInfoData ){
28  // DESERIALIZE_BASE_CASE( condex::Efficiency ); abstract
31 
32  // here we come if none of the deserializations above match the payload type:
33  throwException(std::string("Type mismatch, target object is type \"")+payloadType+"\"", "deserialize<>" );
34  }
35 }
36 
37 
38 namespace cond {
39  template <> std::unique_ptr<BaseKeyed> deserialize<BaseKeyed>( const std::string& payloadType,
40  const Binary& payloadData,
41  const Binary& streamerInfoData ){
45 
46  // here we come if none of the deserializations above match the payload type:
47  throwException(std::string("Type mismatch, target object is type \"")+payloadType+"\"", "deserialize<>" );
48  }
49 }
50 
51 
52 namespace {
53  struct InitEfficiency {void operator()(condex::Efficiency& e){ e.initialize();}};
54 }
55 
61 // REGISTER_PLUGIN(ExDwarfListRcd, cond::KeyList);
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:21
std::unique_ptr< BaseKeyed > deserialize< BaseKeyed >(const std::string &payloadType, const Binary &payloadData, const Binary &streamerInfoData)
Definition: plugin.cc:39
#define DESERIALIZE_BASE_CASE(BASETYPENAME)
#define REGISTER_KEYLIST_PLUGIN(record_, type_, source_)
#define DESERIALIZE_POLIMORPHIC_CASE(BASETYPENAME, DERIVEDTYPENAME)
Definition: plugin.cc:24
#define REGISTER_PLUGIN(record_, type_)
#define REGISTER_PLUGIN_INIT(record_, type_, initializer_)
virtual void initialize()
Definition: Efficiency.h:25