CMS 3D CMS Logo

SiStripModuleHV.cc

Go to the documentation of this file.
00001 #include "CondFormats/SiStripObjects/interface/SiStripModuleHV.h"
00002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00003 
00004 
00005 bool SiStripModuleHV::put(std::vector<uint32_t>& DetId) {
00006   // put in SiStripModuelHV::v_hvoff of DetId
00007  
00008   
00009   v_hvoff.insert(v_hvoff.end(),DetId.begin(),DetId.end());
00010   std::sort(v_hvoff.begin(),v_hvoff.end());
00011 
00012   
00013   std::vector<uint32_t> v_detidcompare;
00014  
00015   for(unsigned int in= 0;in<v_hvoff.size();in++){
00016      v_detidcompare.push_back(v_hvoff[in]);
00017      
00018  
00019     if(in>0){
00020       if(v_detidcompare[in-1]==v_hvoff[in]){
00021         std::cout << "detid: " << v_hvoff[in] << "already stored, skipping this input \n";
00022         return false;}
00023     }
00024    
00025   }
00026     
00027   return true;
00028 }
00029 
00030 
00031 
00032 void SiStripModuleHV::getDetIds(std::vector<uint32_t>& DetIds_) const {
00033   // returns vector of DetIds in map
00034   DetIds_.clear();
00035   DetIds_.insert(DetIds_.end(),v_hvoff.begin(),v_hvoff.end());
00036  }
00037 
00038 
00039 
00040 
00041 bool SiStripModuleHV::IsModuleHVOff(uint32_t DetID) const{
00042   return std::binary_search(v_hvoff.begin(),v_hvoff.end(),DetID);
00043 }

Generated on Tue Jun 9 17:26:50 2009 for CMSSW by  doxygen 1.5.4