CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoLocalTracker/SiStripZeroSuppression/interface/SiStripRawProcessingAlgorithms.h

Go to the documentation of this file.
00001 #ifndef RecoLocalTracker_SiStripZeroSuppression_SiStripRawProcessingAlgorithms_h
00002 #define RecoLocalTracker_SiStripZeroSuppression_SiStripRawProcessingAlgorithms_h
00003 
00004 #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripPedestalsSubtractor.h"
00005 #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripCommonModeNoiseSubtractor.h"
00006 #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripFedZeroSuppression.h"
00007 #include "RecoLocalTracker/SiStripZeroSuppression/interface/SiStripAPVRestorer.h"
00008 
00009 #include "DataFormats/Common/interface/DetSet.h"
00010 #include "DataFormats/Common/interface/DetSetVector.h"
00011 
00012 class SiStripRawProcessingAlgorithms {
00013   friend class SiStripRawProcessingFactory;
00014 
00015  public: 
00016   void initialize(const edm::EventSetup&);
00017   void initialize(const edm::EventSetup&, const edm::Event&);
00018   int16_t SuppressVirginRawData(const uint32_t&, const uint16_t&, std::vector<int16_t>&, edm::DetSet<SiStripDigi>&);
00019   int16_t SuppressVirginRawData(const edm::DetSet<SiStripRawDigi>&, edm::DetSet<SiStripDigi>& );
00020   
00021   int16_t SuppressProcessedRawData(const uint32_t&, const uint16_t&, std::vector<int16_t>&, edm::DetSet<SiStripDigi>&);
00022   int16_t SuppressProcessedRawData(const edm::DetSet<SiStripRawDigi>&, edm::DetSet<SiStripDigi>&  );
00023 
00024   inline std::vector<bool>& GetAPVFlags(){return restorer->GetAPVFlags();}
00025   inline std::map<uint16_t, std::vector < int16_t> >& GetBaselineMap(){return restorer->GetBaselineMap();}
00026   inline std::map< uint16_t, std::map< uint16_t, int16_t> >& GetSmoothedPoints(){return restorer->GetSmoothedPoints();}
00027   inline const std::vector< std::pair<short,float> >& getAPVsCM(){return subtractorCMN->getAPVsCM();}
00028 
00029   const std::auto_ptr<SiStripPedestalsSubtractor> subtractorPed;
00030   const std::auto_ptr<SiStripCommonModeNoiseSubtractor> subtractorCMN;
00031   const std::auto_ptr<SiStripFedZeroSuppression> suppressor;
00032   const std::auto_ptr<SiStripAPVRestorer> restorer;
00033 
00034  private:
00035   const bool doAPVRestore;
00036   const bool useCMMeanMap;
00037 
00038   SiStripRawProcessingAlgorithms(std::auto_ptr<SiStripPedestalsSubtractor> ped,
00039                                  std::auto_ptr<SiStripCommonModeNoiseSubtractor> cmn,
00040                                  std::auto_ptr<SiStripFedZeroSuppression> zs,
00041                                  std::auto_ptr<SiStripAPVRestorer> res,
00042                                  bool doAPVRest,
00043                                  bool useCMMap); 
00044    
00045 };
00046 #endif
00047