CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/CalibTracker/SiPixelTools/plugins/SiPixelErrorsDigisToCalibDigis.h

Go to the documentation of this file.
00001 #ifndef SiPixelErrorsDigisToCalibDigis_h
00002 #define SiPixelErrorsDigisToCalibDigis_h
00003 
00010 // Original Author: Ricardo Vasquez Sierra on April 9, 2008
00011 
00012 
00013 // system include files
00014 #include <memory>
00015 
00016 // user include files
00017 #include "FWCore/Framework/interface/Frameworkfwd.h"
00018 #include "FWCore/Framework/interface/EDAnalyzer.h"
00019 
00020 #include "FWCore/Framework/interface/Event.h"
00021 #include "FWCore/ServiceRegistry/interface/Service.h"
00022 #include "FWCore/Framework/interface/MakerMacros.h"
00023 #include "FWCore/Framework/interface/ESHandle.h"
00024 
00025 #include "FWCore/Utilities/interface/InputTag.h"
00026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00027 
00028 #include "DataFormats/Common/interface/DetSetVector.h"
00029 #include "DataFormats/DetId/interface/DetId.h"
00030 
00031 #include "DataFormats/SiPixelDigi/interface/SiPixelCalibDigi.h"
00032 #include "DataFormats/SiPixelDigi/interface/SiPixelCalibDigiError.h"
00033 
00034 #include "DQMServices/Core/interface/DQMStore.h"
00035 #include "DQMServices/Core/interface/MonitorElement.h"
00036 
00037 #include "DQM/SiPixelCommon/interface/SiPixelHistogramId.h"
00038 #include "DQM/SiPixelCommon/interface/SiPixelFolderOrganizer.h"
00039 
00040 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00041 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
00042 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetType.h"
00043 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" 
00044 
00045 #include "CondFormats/SiPixelObjects/interface/SiPixelFedCablingMap.h"
00046 
00047 //
00048 // class declaration
00049 //
00050 
00051 class SiPixelErrorsDigisToCalibDigis : public edm::EDAnalyzer {
00052  public:
00053   explicit SiPixelErrorsDigisToCalibDigis(const edm::ParameterSet&);
00054   ~SiPixelErrorsDigisToCalibDigis();
00055   
00056   MonitorElement*  bookDQMHistogram2D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY);      
00057   MonitorElement*  bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name,std::string title); // take the detid to determine the size of rows and columns, this saves looking up everything in the cabling map by the user. 
00058   
00059   bool setDQMDirectory(std::string dirName);    
00060   bool setDQMDirectory(uint32_t detID); //automatically create directory hierachy based on DetID
00061  protected:
00062   
00063        edm::ESHandle<TrackerGeometry> geom_;
00064 
00065    private:
00066       virtual void beginJob() ;
00067       virtual void analyze(const edm::Event&, const edm::EventSetup&);
00068       virtual void endJob() ;
00069 
00070       // ----------member data ---------------------------
00071 
00072       // store the number of error per detector id encountered
00073       // store the location of the mismatching error in the detector id
00074 
00075       edm::InputTag siPixelProducerLabel_;
00076 
00077       DQMStore* daqBE_;
00078       SiPixelHistogramId * theHistogramIdWorker_;
00079       std::string outputFilename_;
00080       bool createOutputFile_;
00081 
00082       SiPixelFolderOrganizer* folderMaker_;
00083       std::map<uint32_t, MonitorElement*> SiPixelErrorsDigisToCalibDigis_2DErrorInformation_; 
00084       
00085       MonitorElement * temp;
00086 };
00087 
00088 #endif