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 TIBDetId tib1 = TIBDetId(rawdetid); 00032 Name << "TIB"; 00033 } else if(stripdet.subDetector() == SiStripDetId::TID) { 00034 TIDDetId tid1 = TIDDetId(rawdetid); 00035 if( tid1.side() == 1 ) { 00036 Name << "TID-"; 00037 } 00038 else if( tid1.side() == 2 ) { 00039 Name << "TID+"; 00040 } 00041 else { 00042 Name << "???"; 00043 } 00044 } else if(stripdet.subDetector() == SiStripDetId::TOB) { 00045 TOBDetId tob1 = TOBDetId(rawdetid); 00046 Name << "TOB"; 00047 } else if( stripdet.subDetector() == SiStripDetId::TEC) { 00048 TECDetId tec1 = TECDetId(rawdetid); 00049 if( tec1.side() == 1 ) { 00050 Name << "TEC-"; 00051 } 00052 else if( tec1.side() == 2 ) { 00053 Name << "TEC+"; 00054 } 00055 else { 00056 Name << "???"; 00057 } 00058 } else{ 00059 Name << "???"; 00060 } 00061 00062 return Name.str(); 00063 00064 }