CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/DQM/SiStripHistoricInfoClient/src/HDQMInspectorConfigSiStrip.cc

Go to the documentation of this file.
00001 #include "DQM/SiStripHistoricInfoClient/interface/HDQMInspectorConfigSiStrip.h"
00002 
00003 #include "DQM/SiStripCommon/interface/SiStripFolderOrganizer.h"
00004 #include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
00005 #include "DataFormats/SiStripDetId/interface/TIBDetId.h"
00006 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00007 #include "DataFormats/SiStripDetId/interface/TOBDetId.h"
00008 #include "DataFormats/SiStripDetId/interface/TECDetId.h"
00009 
00010 #include <iostream>
00011 #include <sstream>
00012 
00013 HDQMInspectorConfigSiStrip::HDQMInspectorConfigSiStrip ()
00014 {
00015 }
00016 
00017 
00018 HDQMInspectorConfigSiStrip::~HDQMInspectorConfigSiStrip ()
00019 {
00020 }
00021 
00022 
00023 std::string HDQMInspectorConfigSiStrip::translateDetId(const uint32_t id) const
00024 {
00025   std::stringstream Name;
00026 
00027   uint32_t rawdetid = id;
00028   SiStripDetId stripdet = SiStripDetId(rawdetid);
00029 
00030   if(stripdet.subDetector() == SiStripDetId::TIB) {
00031     Name << "TIB";
00032   } else if(stripdet.subDetector() == SiStripDetId::TID) {
00033     TIDDetId tid1 = TIDDetId(rawdetid);
00034     if( tid1.side() == 1 ) {
00035       Name << "TID-";
00036     }
00037     else if( tid1.side() == 2 ) {
00038       Name << "TID+";
00039     }
00040     else {
00041       Name << "???";
00042     }
00043   } else if(stripdet.subDetector() == SiStripDetId::TOB) {
00044     Name << "TOB";
00045   } else if( stripdet.subDetector() == SiStripDetId::TEC) {
00046     TECDetId tec1 = TECDetId(rawdetid);
00047     if( tec1.side() == 1 ) {
00048       Name << "TEC-";
00049     }
00050     else if( tec1.side() == 2 ) {
00051       Name << "TEC+";
00052     }
00053     else {
00054       Name << "???";
00055     }
00056   } else{
00057     Name << "???";
00058   }
00059 
00060   return Name.str();
00061 
00062 }