Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:03

0001 #ifndef Framework_eventsetuprecord_registration_macro_h
0002 #define Framework_eventsetuprecord_registration_macro_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Framework
0006 // Class  :     eventsetuprecord_registration_macro
0007 //
0008 /**\class eventsetuprecord_registration_macro eventsetuprecord_registration_macro.h FWCore/Framework/interface/eventsetuprecord_registration_macro.h
0009 
0010  Description: CPP macro used to register a new EventSetupRecord into the system
0011 
0012  Usage:
0013     Special code is needed to 'register' a new class that inherits from EventSetupRecord with they system.  The
0014 macro EVENTSETUP_RECORD_REG is used to create that code.
0015 
0016      Example: You have a new record defined called 'DummyRecord'.  Then to register that record with the system
0017      you place the line
0018 
0019      EVENTSETUP_RECORD_REG(DummyRecord);
0020 
0021      at 'file scope' (i.e., not within a namespace, class or function) in the .cc file for DummyRecord
0022 */
0023 //
0024 // Author:      Chris Jones
0025 // Created:     Wed Apr  6 14:33:32 EDT 2005
0026 //
0027 
0028 // system include files
0029 
0030 // user include files
0031 #include "FWCore/Framework/interface/HCMethods.h"
0032 #include "FWCore/Framework/interface/EventSetup.h"
0033 
0034 #include "FWCore/Framework/interface/RecordDependencyRegister.h"
0035 
0036 #define EVENTSETUP_RECORD_NAME2(_a_, _b_) EVENTSETUP_RECORD_NAME2_HIDDEN(_a_, _b_)
0037 #define EVENTSETUP_RECORD_NAME2_HIDDEN(_a_, _b_) _a_##_b_
0038 
0039 #define EVENTSETUP_RECORD_REG(_recordclassname_) \
0040   TYPELOOKUP_DATA_REG(_recordclassname_);        \
0041   static const edm::eventsetup::RecordDependencyRegister<_recordclassname_> EVENTSETUP_RECORD_NAME2(s_factory, __LINE__)
0042 
0043 #endif