00001 #ifndef CalibTracker_SiStripESProducers_SiStripQualityConfigurableFakeESSource
00002 #define CalibTracker_SiStripESProducers_SiStripQualityConfigurableFakeESSource
00003
00004
00005 #include <memory>
00006 #include "boost/shared_ptr.hpp"
00007
00008
00009 #include "FWCore/Framework/interface/ModuleFactory.h"
00010 #include "FWCore/Framework/interface/ESProducer.h"
00011
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013
00014 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00017
00018 #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h"
00019 #include "CondFormats/SiStripObjects/interface/SiStripBadStrip.h"
00020 #include "CondFormats/DataRecord/interface/SiStripBadModuleRcd.h"
00021
00022 #include "DataFormats/SiStripDetId/interface/SiStripSubStructure.h"
00023 #include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
00024 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00025 #include "DataFormats/SiStripDetId/interface/TIBDetId.h"
00026 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00027 #include "DataFormats/SiStripDetId/interface/TOBDetId.h"
00028 #include "DataFormats/SiStripDetId/interface/TECDetId.h"
00029
00030
00031
00032
00033
00034
00035 class SiStripQualityConfigurableFakeESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
00036 public:
00037 SiStripQualityConfigurableFakeESSource(const edm::ParameterSet&);
00038 ~SiStripQualityConfigurableFakeESSource(){};
00039
00040
00041 std::auto_ptr<SiStripBadStrip> produce(const SiStripBadModuleRcd&);
00042
00043 private:
00044
00045 void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&,
00046 const edm::IOVSyncValue& iov,
00047 edm::ValidityInterval& iValidity);
00048
00049 SiStripQualityConfigurableFakeESSource( const SiStripQualityConfigurableFakeESSource& );
00050
00051 void selectDetectors(const std::vector<uint32_t>& , std::vector<uint32_t>& );
00052
00053 bool isTIBDetector(const uint32_t & therawid,
00054 uint32_t requested_layer,
00055 uint32_t requested_bkw_frw,
00056 uint32_t requested_int_ext,
00057 uint32_t requested_string,
00058 uint32_t requested_ster,
00059 uint32_t requested_detid) const;
00060
00061 bool isTOBDetector(const uint32_t & therawid,
00062 uint32_t requested_layer,
00063 uint32_t requested_bkw_frw,
00064 uint32_t requested_rod,
00065 uint32_t requested_ster,
00066 uint32_t requested_detid) const;
00067
00068 bool isTIDDetector(const uint32_t & therawid,
00069 uint32_t requested_side,
00070 uint32_t requested_wheel,
00071 uint32_t requested_ring,
00072 uint32_t requested_ster,
00073 uint32_t requested_detid) const;
00074
00075 bool isTECDetector(const uint32_t & therawid,
00076 uint32_t requested_side,
00077 uint32_t requested_wheel,
00078 uint32_t requested_petal_bkw_frw,
00079 uint32_t requested_petal,
00080 uint32_t requested_ring,
00081 uint32_t requested_ster,
00082 uint32_t requested_detid) const;
00083
00084 typedef std::vector< edm::ParameterSet > Parameters;
00085 Parameters BadComponentList_;
00086
00087
00088 const edm::ParameterSet& iConfig_;
00089 edm::FileInPath fp_;
00090 bool printdebug_;
00091 };
00092
00093 #endif