Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoLocalFastTime_FTLCommonAlgos_MTDRecHitAlgoBase_HH
0002 #define RecoLocalFastTime_FTLCommonAlgos_MTDRecHitAlgoBase_HH
0003 
0004 /** \class MTDRecHitAlgoBase
0005   *  Template algorithm to make rechits from uncalibrated rechits
0006   *
0007   *  \author Lindsey Gray
0008   */
0009 
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 #include "FWCore/Framework/interface/ConsumesCollector.h"
0012 
0013 #include "DataFormats/FTLRecHit/interface/FTLRecHit.h"
0014 #include "DataFormats/FTLRecHit/interface/FTLUncalibratedRecHit.h"
0015 
0016 namespace edm {
0017   class Event;
0018   class EventSetup;
0019 }  // namespace edm
0020 
0021 class MTDRecHitAlgoBase {
0022 public:
0023   /// Constructor
0024   MTDRecHitAlgoBase(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes)
0025       : name_(conf.getParameter<std::string>("algoName")){};
0026 
0027   /// Destructor
0028   virtual ~MTDRecHitAlgoBase(){};
0029 
0030   /// get event and eventsetup information
0031   virtual void getEvent(const edm::Event&) = 0;
0032   virtual void getEventSetup(const edm::EventSetup&) = 0;
0033 
0034   /// make rechits from dataframes
0035   virtual FTLRecHit makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags) const = 0;
0036 
0037   const std::string& name() const { return name_; }
0038 
0039 private:
0040   std::string name_;
0041 };
0042 
0043 #include "FWCore/PluginManager/interface/PluginFactory.h"
0044 typedef edmplugin::PluginFactory<MTDRecHitAlgoBase*(const edm::ParameterSet&, edm::ConsumesCollector&)>
0045     MTDRecHitAlgoFactory;
0046 
0047 #endif