Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:40

0001 #ifndef PhysicsTools_MVAComputer_HelperMacros_h
0002 #define PhysicsTools_MVAComputer_HelperMacros_h
0003 
0004 #include "FWCore/Framework/interface/SourceFactory.h"
0005 #include "FWCore/Framework/interface/EventSetupRecordImplementation.h"
0006 #include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"
0007 #include "CondFormats/PhysicsToolsObjects/interface/MVAComputer.h"
0008 #include "CondCore/ESSources/interface/registration_macros.h"
0009 #include "PhysicsTools/MVAComputer/interface/MVAComputerESSourceImpl.h"
0010 
0011 #define MVA_COMPUTER_RECORD_DEFINE(T) \
0012   class T : public edm::eventsetup::EventSetupRecordImplementation<T> {}
0013 
0014 #define MVA_COMPUTER_CONTAINER_RECORD_DEFINE(T) MVA_COMPUTER_RECORD_DEFINE(T)
0015 
0016 #define MVA_COMPUTER_RECORD_PLUGIN(T)                                  \
0017   INSTANTIATE_PROXY(T, ::PhysicsTools::Calibration::MVAComputer)       \
0018   namespace {                                                          \
0019     namespace mva1 {                                                   \
0020       ONLY_REGISTER_PLUGIN(T, PhysicsTools::Calibration::MVAComputer); \
0021     }                                                                  \
0022   }                                                                    \
0023   typedef int mvaDummyTypedef1##T
0024 
0025 #define MVA_COMPUTER_RECORD_IMPLEMENT(T) \
0026   EVENTSETUP_RECORD_REG(T);              \
0027   MVA_COMPUTER_RECORD_PLUGIN(T)
0028 
0029 #define MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T)                                 \
0030   INSTANTIATE_PROXY(T, ::PhysicsTools::Calibration::MVAComputerContainer)       \
0031   namespace {                                                                   \
0032     namespace mva2 {                                                            \
0033       ONLY_REGISTER_PLUGIN(T, PhysicsTools::Calibration::MVAComputerContainer); \
0034     }                                                                           \
0035   }                                                                             \
0036   typedef int mvaDummyTypedef2##T
0037 
0038 #define MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(T) \
0039   EVENTSETUP_RECORD_REG(T);                        \
0040   MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T)
0041 
0042 #define MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(T, P)  \
0043   namespace {                                               \
0044     namespace mva3 {                                        \
0045       typedef ::PhysicsTools::MVAComputerESSourceImpl<T> P; \
0046       DEFINE_FWK_EVENTSETUP_SOURCE(P);                      \
0047     }                                                       \
0048   }                                                         \
0049   typedef int mvaDummyTypedef3##T
0050 
0051 #define MVA_COMPUTER_CONTAINER_DEFINE(N) MVA_COMPUTER_CONTAINER_RECORD_DEFINE(N##Rcd)
0052 
0053 #define MVA_COMPUTER_CONTAINER_IMPLEMENT(N)        \
0054   MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(N##Rcd); \
0055   MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(N##Rcd, N##FileSource)
0056 
0057 #endif  // PhysicsTools_MVAComputer_HelperMacros_h