00001 #ifndef SHALLOW_DIGIS_PRODUCER 00002 #define SHALLOW_DIGIS_PRODUCER 00003 00004 #include "FWCore/Framework/interface/EDProducer.h" 00005 #include "FWCore/Framework/interface/Frameworkfwd.h" 00006 #include "FWCore/Framework/interface/ESHandle.h" 00007 #include "FWCore/Utilities/interface/InputTag.h" 00008 class SiStripNoises; 00009 00010 class ShallowDigisProducer : public edm::EDProducer { 00011 00012 public: 00013 00014 explicit ShallowDigisProducer(const edm::ParameterSet&); 00015 00016 private: 00017 struct products { 00018 std::auto_ptr<std::vector<unsigned> > id; 00019 std::auto_ptr<std::vector<unsigned> > subdet; 00020 std::auto_ptr<std::vector<unsigned> > strip; 00021 std::auto_ptr<std::vector<unsigned> > adc; 00022 std::auto_ptr<std::vector<float> > noise; 00023 products() 00024 : id(new std::vector<unsigned>()), 00025 subdet(new std::vector<unsigned>()), 00026 strip(new std::vector<unsigned>()), 00027 adc(new std::vector<unsigned>()), 00028 noise(new std::vector<float>()) {} 00029 }; 00030 std::vector<edm::InputTag> inputTags; 00031 edm::ESHandle<SiStripNoises> noiseHandle; 00032 00033 void produce(edm::Event&, const edm::EventSetup&); 00034 template<class T> bool findInput(edm::Handle<T>&, const edm::Event&); 00035 template<class T> void recordDigis(const T &, products&); 00036 void insert(products&, edm::Event&); 00037 00038 }; 00039 00040 #endif