CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/CondFormats/SiPixelObjects/interface/SiPixelFrameReverter.h

Go to the documentation of this file.
00001 #ifndef SiPixelTools_SiPixelFrameReverter_H
00002 #define SiPixelTools_SiPixelFrameReverter_H
00003 
00004 #include "CondFormats/SiPixelObjects/interface/SiPixelFedCabling.h"
00005 #include "CondFormats/SiPixelObjects/interface/CablingPathToDetUnit.h"
00006 #include "CondFormats/SiPixelObjects/interface/SiPixelFrameConverter.h"
00007 #include "CondFormats/SiPixelObjects/interface/GlobalPixel.h"
00008 #include "CondFormats/SiPixelObjects/interface/LocalPixel.h"
00009 #include "CondFormats/SiPixelObjects/interface/ElectronicIndex.h"
00010 #include "CondFormats/SiPixelObjects/interface/DetectorIndex.h"
00011 #include "FWCore/Framework/interface/Event.h"
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013 
00014 #include <boost/cstdint.hpp>
00015 
00016 class SiPixelFedCablingMap;
00017 
00018 class SiPixelFrameReverter {
00019 public:
00020 
00021   SiPixelFrameReverter(const edm::EventSetup&, const SiPixelFedCabling* map);
00022 
00023   void buildStructure(edm::EventSetup const&);
00024 
00025   // Function to find FedId given detId
00026   int findFedId(uint32_t detId);
00027 
00028   // Function to find Fed link given detId and pixel row and col on plaquette
00029   // returns -1 if link can't be found
00030   short findLinkInFed(uint32_t detId, sipixelobjects::GlobalPixel global);
00031 
00032   // Function to find Roc number on a link given detId and pixel row and col on plaquette
00033   // returns -1 if Roc can't be found
00034   short findRocInLink(uint32_t detId, sipixelobjects::GlobalPixel global);
00035 
00036   // Function to find the Roc number within a plaquette given detId and pixel row and col on plaquette
00037   // returns -1 if Roc can't be found
00038   short findRocInDet(uint32_t detId, sipixelobjects::GlobalPixel global);
00039 
00040   // Function to find local pixel given detId and pixel row and col on plaquette
00041   sipixelobjects::LocalPixel findPixelInRoc(uint32_t detId, sipixelobjects::GlobalPixel global);
00042 
00043 
00044 private:
00045 
00046   const SiPixelFedCabling * map_;
00047 
00048   std::map< uint32_t,std::vector<sipixelobjects::CablingPathToDetUnit> > DetToFedMap;
00049 
00050 };
00051 #endif
00052 
00053