Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef SecondaryInput_SecondaryProducer_h
0002 #define SecondaryInput_SecondaryProducer_h
0003 
0004 /** \class SecondaryProducer
0005  *
0006  * \author Bill Tanenbaum
0007  *
0008  *
0009  ************************************************************/
0010 
0011 #include "DataFormats/Provenance/interface/EventID.h"
0012 #include "FWCore/Framework/interface/one/EDProducer.h"
0013 #include "FWCore/Utilities/interface/get_underlying_safe.h"
0014 
0015 #include <memory>
0016 
0017 namespace edm {
0018   class EventPrincipal;
0019   class ProcessConfiguration;
0020   class VectorInputSource;
0021 
0022   class SecondaryProducer : public one::EDProducer<> {
0023   public:
0024     /** standard constructor*/
0025     explicit SecondaryProducer(ParameterSet const& pset);
0026 
0027     /**Default destructor*/
0028     virtual ~SecondaryProducer();
0029 
0030     /**Accumulates the pileup events into this event*/
0031     void produce(Event& e1, EventSetup const& c) override;
0032 
0033     bool processOneEvent(EventPrincipal const& eventPrincipal, Event& e);
0034 
0035   private:
0036     virtual void put(Event&) {}
0037     void beginJob() override;
0038     void endJob() override;
0039     std::shared_ptr<VectorInputSource> makeSecInput(ParameterSet const& ps);
0040 
0041     std::shared_ptr<ProductRegistry const> productRegistry() const { return get_underlying_safe(productRegistry_); }
0042     std::shared_ptr<ProductRegistry>& productRegistry() { return get_underlying_safe(productRegistry_); }
0043 
0044     edm::propagate_const<std::shared_ptr<ProductRegistry>> productRegistry_;
0045     edm::propagate_const<std::shared_ptr<VectorInputSource>> secInput_;
0046     edm::propagate_const<std::unique_ptr<ProcessConfiguration>> processConfiguration_;
0047     edm::propagate_const<std::unique_ptr<EventPrincipal>> eventPrincipal_;
0048     bool sequential_;
0049     bool specified_;
0050     bool sameLumiBlock_;
0051     bool firstEvent_;
0052     bool firstLoop_;
0053     EventNumber_t expectedEventNumber_;
0054   };
0055 }  // namespace edm
0056 
0057 #endif