Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef FWCore_Framework_RecordDependencyRegister_h
0002 #define FWCore_Framework_RecordDependencyRegister_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // Class  :     RecordDependencyRegister
0007 //
0008 /**\class RecordDependencyRegister RecordDependencyRegister.h "RecordDependencyRegister.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  root
0018 //         Created:  Thu, 26 Apr 2018 15:46:36 GMT
0019 //
0020 
0021 // system include files
0022 #include <set>
0023 
0024 // user include files
0025 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
0026 #include "FWCore/Framework/interface/findDependentRecordsFor.h"
0027 
0028 // forward declarations
0029 
0030 namespace edm {
0031   namespace eventsetup {
0032     using DepFunction = std::set<EventSetupRecordKey> (*)();
0033 
0034     std::set<EventSetupRecordKey> dependencies(EventSetupRecordKey const&);
0035     bool allowConcurrentIOVs(EventSetupRecordKey const&);
0036 
0037     void addDependencyFunction(EventSetupRecordKey iKey, DepFunction iFunction, bool allowConcurrentIOVs);
0038 
0039     template <typename T>
0040     struct RecordDependencyRegister {
0041       RecordDependencyRegister() {
0042         addDependencyFunction(EventSetupRecordKey::makeKey<T>(), &findDependentRecordsFor<T>, T::allowConcurrentIOVs_);
0043       }
0044     };
0045   }  // namespace eventsetup
0046 }  // namespace edm
0047 
0048 #endif