Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:10

0001 #ifndef FWCore_Sources_PuttableSourceBase_h
0002 #define FWCore_Sources_PuttableSourceBase_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Sources
0006 // Class  :     PuttableSourceBase
0007 //
0008 /**\class PuttableSourceBase PuttableSourceBase.h "PuttableSourceBase.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  root
0018 //         Created:  Tue, 26 Sep 2017 20:51:50 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/InputSource.h"
0025 #include "FWCore/Framework/interface/Frameworkfwd.h"
0026 #include "FWCore/Framework/interface/ProducerBase.h"
0027 
0028 // forward declarations
0029 namespace edm {
0030   class PuttableSourceBase : public InputSource, public ProducerBase {
0031   public:
0032     PuttableSourceBase(ParameterSet const&, InputSourceDescription const&);
0033     PuttableSourceBase(const PuttableSourceBase&) = delete;
0034     PuttableSourceBase& operator=(const PuttableSourceBase&) = delete;
0035 
0036     // ---------- const member functions ---------------------
0037 
0038     // ---------- static member functions --------------------
0039 
0040     // ---------- member functions ---------------------------
0041     using ProducerBase::registerProducts;
0042     using ProducerBase::resolvePutIndicies;
0043     void registerProducts() final;
0044 
0045     bool hasAbilityToProduceInBeginRuns() const final { return true; }
0046 
0047     bool hasAbilityToProduceInBeginLumis() const final { return true; }
0048 
0049   protected:
0050     //If inheriting class overrides, they need to call this function as well
0051     void beginJob() override;
0052 
0053   private:
0054     void doBeginLumi(LuminosityBlockPrincipal& lbp, ProcessContext const*) override;
0055     void doBeginRun(RunPrincipal& rp, ProcessContext const*) override;
0056 
0057     virtual void beginRun(Run&);
0058     virtual void beginLuminosityBlock(LuminosityBlock&);
0059 
0060     // ---------- member data --------------------------------
0061   };
0062 }  // namespace edm
0063 
0064 #endif