9 #include <boost/cstdint.hpp> 17 fp_(iConfig.getUntrackedParameter<
edm::
FileInPath>(
"file",
edm::
FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat")))
20 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::SiStripNoisesDQMService]";
25 edm::LogInfo(
"SiStripNoisesDQMService") <<
"[SiStripNoisesDQMService::~SiStripNoisesDQMService]";
30 std::cout <<
"SiStripNoisesDQMService::readNoises" << std::endl;
34 std::cout <<
"[readBadComponents]: opened requested file" << std::endl;
43 uint32_t stripsPerApv = 128;
51 std::vector<MonitorElement*>::iterator newEnd = remove_if(MEs.begin(), MEs.end(), StringNotMatch(
"CMSubNoisePerStrip__det__"));
52 MEs.erase(newEnd, MEs.end());
55 const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo> DetInfos =
reader.getAllData();
56 for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo>::const_iterator it = DetInfos.begin(); it != DetInfos.end(); ++it) {
68 std::string MEname(
"CMSubNoisePerStrip__det__"+boost::lexical_cast<string>(it->first));
69 for( std::vector<MonitorElement*>::const_iterator MEit = MEs.begin();
70 MEit != MEs.end(); ++MEit ) {
71 if( (*MEit)->getName() == MEname ) {
86 uint32_t nBinsX = histo->GetXaxis()->GetNbins();
88 if( nBinsX != stripsPerApv*(it->second.nApvs) ) {
89 std::cout <<
"ERROR: number of bin = " << nBinsX <<
" != number of strips = " << stripsPerApv*(it->second.nApvs) << std::endl;
95 for( uint32_t iBin = 1; iBin <= nBinsX; ++iBin ) {
97 obj_->
setData( histo->GetBinContent(iBin), theSiStripVector );
101 std::cout <<
"ERROR: histo = " << histo << std::endl;
105 std::cout <<
"ERROR: ME = " << mE << std::endl;
108 if( theSiStripVector.empty() ) {
109 for(
unsigned short j=0; j<128*it->second.nApvs; ++j){
114 if ( !
obj_->
put(it->first, theSiStripVector) )
115 edm::LogError(
"SiStripNoisesFakeESSource::produce ")<<
" detid already exists"<<std::endl;
T getUntrackedParameter(std::string const &, T const &) const
std::vector< uint16_t > InputVector
~SiStripNoisesDQMService()
SiStripNoisesDQMService(const edm::ParameterSet &, const edm::ActivityRegistry &)
bool put(const uint32_t &detID, const InputVector &input)
TH1F * getTH1F(void) const
edm::ParameterSet iConfig_
std::string fullPath() const
void setData(float noise_, InputVector &vped)
void openRequestedFile()
Uses DQMStore to access the DQM file.