Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:21

0001 #ifndef RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitWorkerRunOneDigiBase_hh
0002 #define RecoLocalCalo_EcalRecProducers_EcalUncalibRecHitWorkerRunOneDigiBase_hh
0003 
0004 #include "RecoLocalCalo/EcalRecProducers/interface/EcalUncalibRecHitWorkerBaseClass.h"
0005 
0006 //! this is a compatibility base after the primary application (EcalUncalibRecHitProducer) moved to full collection used in argument
0007 //! given reduced overhead by running on the full collection as input,
0008 //! derived classes with CPU constraints should move to EcalUncalibRecHitWorkerBaseClass
0009 
0010 class EcalUncalibRecHitWorkerRunOneDigiBase : public EcalUncalibRecHitWorkerBaseClass {
0011 public:
0012   EcalUncalibRecHitWorkerRunOneDigiBase(const edm::ParameterSet& p, edm::ConsumesCollector& c)
0013       : EcalUncalibRecHitWorkerBaseClass(p, c) {}
0014   EcalUncalibRecHitWorkerRunOneDigiBase(const edm::ParameterSet& p) : EcalUncalibRecHitWorkerBaseClass(p) {}
0015   EcalUncalibRecHitWorkerRunOneDigiBase() {}
0016   ~EcalUncalibRecHitWorkerRunOneDigiBase() override {}
0017 
0018   virtual bool run(const edm::Event& evt,
0019                    const EcalDigiCollection::const_iterator& digi,
0020                    EcalUncalibratedRecHitCollection& result) = 0;
0021 
0022   void run(const edm::Event& evt, const EcalDigiCollection& digis, EcalUncalibratedRecHitCollection& result) override {
0023     result.reserve(result.size() + digis.size());
0024     for (auto it = digis.begin(); it != digis.end(); ++it)
0025       run(evt, it, result);
0026   }
0027 };
0028 
0029 #endif