00001 #ifndef PhysicsTools_MVAComputer_HelperMacros_h 00002 #define PhysicsTools_MVAComputer_HelperMacros_h 00003 00004 #include "FWCore/Framework/interface/SourceFactory.h" 00005 #include "FWCore/Framework/interface/EventSetupRecordImplementation.h" 00006 #include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" 00007 #include "CondFormats/PhysicsToolsObjects/interface/MVAComputer.h" 00008 #include "CondCore/PluginSystem/interface/registration_macros.h" 00009 #include "PhysicsTools/MVAComputer/interface/MVAComputerESSourceImpl.h" 00010 00011 #define MVA_COMPUTER_RECORD_DEFINE(T) \ 00012 class T : public edm::eventsetup::EventSetupRecordImplementation<T> {} 00013 00014 #define MVA_COMPUTER_CONTAINER_RECORD_DEFINE(T) \ 00015 MVA_COMPUTER_RECORD_DEFINE(T) 00016 00017 #define MVA_COMPUTER_RECORD_PLUGIN(T) \ 00018 INSTANTIATE_PROXY(T, ::PhysicsTools::Calibration::MVAComputer) \ 00019 namespace { namespace mva1 { \ 00020 using namespace ::PhysicsTools::Calibration; \ 00021 ONLY_REGISTER_PLUGIN(T, MVAComputer); \ 00022 }} typedef int mvaDummyTypedef1 ## T 00023 00024 #define MVA_COMPUTER_RECORD_IMPLEMENT(T) \ 00025 EVENTSETUP_RECORD_REG(T); \ 00026 MVA_COMPUTER_RECORD_PLUGIN(T) 00027 00028 #define MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T) \ 00029 INSTANTIATE_PROXY(T, ::PhysicsTools::Calibration::MVAComputerContainer) \ 00030 namespace { namespace mva2 { \ 00031 using namespace ::PhysicsTools::Calibration; \ 00032 ONLY_REGISTER_PLUGIN(T, MVAComputerContainer); \ 00033 }} typedef int mvaDummyTypedef2 ## T 00034 00035 #define MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(T) \ 00036 EVENTSETUP_RECORD_REG(T); \ 00037 MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T) 00038 00039 #define MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(T, P) \ 00040 namespace { namespace mva3 { \ 00041 typedef ::PhysicsTools::MVAComputerESSourceImpl<T> P; \ 00042 DEFINE_FWK_EVENTSETUP_SOURCE(P); \ 00043 }} typedef int mvaDummyTypedef3 ## T 00044 00045 #define MVA_COMPUTER_CONTAINER_DEFINE(N) \ 00046 MVA_COMPUTER_CONTAINER_RECORD_DEFINE(N ## Rcd) 00047 00048 #define MVA_COMPUTER_CONTAINER_IMPLEMENT(N) \ 00049 MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(N ## Rcd); \ 00050 MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(N ## Rcd, N ## FileSource) 00051 00052 #endif // PhysicsTools_MVAComputer_HelperMacros_h