Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoLocalFastTime_FTLCommonAlgos_MTDUncalibratedRecHitRecAlgoBase_HH
0002 #define RecoLocalFastTime_FTLCommonAlgos_MTDUncalibratedRecHitRecAlgoBase_HH
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/Framework/interface/ConsumesCollector.h"
0006 
0007 #include "DataFormats/FTLDigi/interface/FTLDigiCollections.h"
0008 #include "DataFormats/FTLRecHit/interface/FTLUncalibratedRecHit.h"
0009 
0010 namespace edm {
0011   class Event;
0012   class EventSetup;
0013 }  // namespace edm
0014 
0015 template <typename DataFrame>
0016 class MTDUncalibratedRecHitAlgoBase {
0017 public:
0018   /// Constructor
0019   MTDUncalibratedRecHitAlgoBase(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes) {}
0020 
0021   /// Destructor
0022   virtual ~MTDUncalibratedRecHitAlgoBase() {}
0023 
0024   /// get event and eventsetup information
0025   virtual void getEvent(const edm::Event&) = 0;
0026   virtual void getEventSetup(const edm::EventSetup&) = 0;
0027 
0028   /// make the rec hit
0029   virtual FTLUncalibratedRecHit makeRecHit(const DataFrame& dataFrame) const = 0;
0030 
0031   const std::string& name() const { return name_; }
0032 
0033 private:
0034   std::string name_;
0035 };
0036 
0037 typedef MTDUncalibratedRecHitAlgoBase<BTLDataFrame> BTLUncalibratedRecHitAlgoBase;
0038 typedef MTDUncalibratedRecHitAlgoBase<ETLDataFrame> ETLUncalibratedRecHitAlgoBase;
0039 
0040 #include "FWCore/PluginManager/interface/PluginFactory.h"
0041 typedef edmplugin::PluginFactory<BTLUncalibratedRecHitAlgoBase*(const edm::ParameterSet&, edm::ConsumesCollector&)>
0042     BTLUncalibratedRecHitAlgoFactory;
0043 typedef edmplugin::PluginFactory<ETLUncalibratedRecHitAlgoBase*(const edm::ParameterSet&, edm::ConsumesCollector&)>
0044     ETLUncalibratedRecHitAlgoFactory;
0045 
0046 #endif