CMS 3D CMS Logo

HelperMacros.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_MVAComputer_HelperMacros_h
2 #define PhysicsTools_MVAComputer_HelperMacros_h
3 
10 
11 #define MVA_COMPUTER_RECORD_DEFINE(T) \
12  class T : public edm::eventsetup::EventSetupRecordImplementation<T> {}
13 
14 #define MVA_COMPUTER_CONTAINER_RECORD_DEFINE(T) MVA_COMPUTER_RECORD_DEFINE(T)
15 
16 #define MVA_COMPUTER_RECORD_PLUGIN(T) \
17  INSTANTIATE_PROXY(T, ::PhysicsTools::Calibration::MVAComputer) \
18  namespace { \
19  namespace mva1 { \
20  ONLY_REGISTER_PLUGIN(T, PhysicsTools::Calibration::MVAComputer); \
21  } \
22  } \
23  typedef int mvaDummyTypedef1##T
24 
25 #define MVA_COMPUTER_RECORD_IMPLEMENT(T) \
26  EVENTSETUP_RECORD_REG(T); \
27  MVA_COMPUTER_RECORD_PLUGIN(T)
28 
29 #define MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T) \
30  INSTANTIATE_PROXY(T, ::PhysicsTools::Calibration::MVAComputerContainer) \
31  namespace { \
32  namespace mva2 { \
33  ONLY_REGISTER_PLUGIN(T, PhysicsTools::Calibration::MVAComputerContainer); \
34  } \
35  } \
36  typedef int mvaDummyTypedef2##T
37 
38 #define MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(T) \
39  EVENTSETUP_RECORD_REG(T); \
40  MVA_COMPUTER_CONTAINER_RECORD_PLUGIN(T)
41 
42 #define MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(T, P) \
43  namespace { \
44  namespace mva3 { \
45  typedef ::PhysicsTools::MVAComputerESSourceImpl<T> P; \
46  DEFINE_FWK_EVENTSETUP_SOURCE(P); \
47  } \
48  } \
49  typedef int mvaDummyTypedef3##T
50 
51 #define MVA_COMPUTER_CONTAINER_DEFINE(N) MVA_COMPUTER_CONTAINER_RECORD_DEFINE(N##Rcd)
52 
53 #define MVA_COMPUTER_CONTAINER_IMPLEMENT(N) \
54  MVA_COMPUTER_CONTAINER_RECORD_IMPLEMENT(N##Rcd); \
55  MVA_COMPUTER_CONTAINER_FILE_SOURCE_IMPLEMENT(N##Rcd, N##FileSource)
56 
57 #endif // PhysicsTools_MVAComputer_HelperMacros_h