Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:41

0001 #ifndef FWCore_Framework_stream_Contexts_h
0002 #define FWCore_Framework_stream_Contexts_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // Class  :     Contexts
0007 //
0008 /**\class Contexts Contexts.h "Contexts.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Fri, 02 Aug 2013 18:19:39 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 
0025 // forward declarations
0026 
0027 namespace edm {
0028   namespace stream {
0029 
0030     template <typename R, typename G>
0031     class RunContextT {
0032     public:
0033       RunContextT(R const* iRun, G const* iGlobal) : m_run(iRun), m_global(iGlobal) {}
0034       R const* run() const { return m_run; }
0035       G const* global() const { return m_global; }
0036 
0037     private:
0038       R const* m_run;
0039       G const* m_global;
0040     };
0041 
0042     template <typename L, typename R, typename G>
0043     class LuminosityBlockContextT {
0044     public:
0045       LuminosityBlockContextT(L const* iLumi, R const* iRun, G const* iGlobal)
0046           : m_lumi(iLumi), m_run(iRun), m_global(iGlobal) {}
0047 
0048       L const* luminosityBlock() const { return m_lumi; }
0049       R const* run() const { return m_run; }
0050       G const* global() const { return m_global; }
0051 
0052     private:
0053       L const* m_lumi;
0054       R const* m_run;
0055       G const* m_global;
0056     };
0057   }  // namespace stream
0058 }  // namespace edm
0059 
0060 #endif