CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/PhysicsTools/MVAComputer/interface/HelperMacros.h

Go to the documentation of this file.
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                 ONLY_REGISTER_PLUGIN(T, PhysicsTools::Calibration::MVAComputer);                \
00021         }} typedef int mvaDummyTypedef1 ## T
00022 
00023 #define MVA_COMPUTER_RECORD_IMPLEMENT(T)                        \
00024         EVENTSETUP_RECORD_REG(T);                               \
00025         MVA_COMPUTER_RECORD_PLUGIN(T)
00026 
00027 #define MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T)                 \
00028         INSTANTIATE_PROXY(T, ::PhysicsTools::Calibration::MVAComputerContainer) \
00029         namespace { namespace mva2 {                            \
00030                 ONLY_REGISTER_PLUGIN(T, PhysicsTools::Calibration::MVAComputerContainer);       \
00031         }} typedef int mvaDummyTypedef2 ## T
00032 
00033 #define MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(T)              \
00034         EVENTSETUP_RECORD_REG(T);                               \
00035         MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T)
00036 
00037 #define MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(T, P)      \
00038         namespace { namespace mva3 {                            \
00039                 typedef ::PhysicsTools::MVAComputerESSourceImpl<T> P; \
00040                 DEFINE_FWK_EVENTSETUP_SOURCE(P);                \
00041         }} typedef int mvaDummyTypedef3 ## T
00042 
00043 #define MVA_COMPUTER_CONTAINER_DEFINE(N)                        \
00044         MVA_COMPUTER_CONTAINER_RECORD_DEFINE(N ## Rcd)
00045 
00046 #define MVA_COMPUTER_CONTAINER_IMPLEMENT(N)                     \
00047         MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(N ## Rcd);      \
00048         MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(N ## Rcd, N ## FileSource)
00049 
00050 #endif // PhysicsTools_MVAComputer_HelperMacros_h