9 #include <boost/cstdint.hpp>
17 fp_(iConfig.getUntrackedParameter<edm::
FileInPath>(
"file",edm::
FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat")))
20 edm::LogInfo(
"SiStripPedestalsDQMService") <<
"[SiStripPedestalsDQMService::SiStripPedestalsDQMService]";
25 edm::LogInfo(
"SiStripPedestalsDQMService") <<
"[SiStripPedestalsDQMService::~SiStripPedestalsDQMService]";
30 std::cout <<
"SiStripPedestalsDQMService::readPedestals" << 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(
"PedsPerStrip__det__"));
52 MEs.erase(newEnd, MEs.end());
56 const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo> DetInfos =
reader.getAllData();
57 for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo>::const_iterator it = DetInfos.begin(); it != DetInfos.end(); ++it) {
69 std::string MEname(
"PedsPerStrip__det__"+boost::lexical_cast<string>(it->first));
70 for( std::vector<MonitorElement*>::const_iterator MEit = MEs.begin();
71 MEit != MEs.end(); ++MEit ) {
72 if( (*MEit)->getName() == MEname ) {
87 uint32_t nBinsX = histo->GetXaxis()->GetNbins();
89 if( nBinsX != stripsPerApv*(it->second.nApvs) ) {
90 std::cout <<
"ERROR: number of bin = " << nBinsX <<
" != number of strips = " << stripsPerApv*(it->second.nApvs) << std::endl;
96 for( uint32_t iBin = 1; iBin <= nBinsX; ++iBin ) {
98 obj_->
setData( histo->GetBinContent(iBin), theSiStripVector );
102 std::cout <<
"ERROR: histo = " << histo << std::endl;
106 std::cout <<
"ERROR: ME = " << mE << std::endl;
109 if( theSiStripVector.empty() ) {
110 for(
unsigned short j=0;
j<128*it->second.nApvs; ++
j){
115 if ( !
obj_->
put(it->first, theSiStripVector) )
116 edm::LogError(
"SiStripPedestalsFakeESSource::produce ")<<
" detid already exists"<<std::endl;
T getUntrackedParameter(std::string const &, T const &) const
std::vector< uint16_t > InputVector
~SiStripPedestalsDQMService()
bool put(const uint32_t &detID, InputVector &input)
TH1F * getTH1F(void) const
void setData(float ped, InputVector &vped)
edm::ParameterSet iConfig_
std::string fullPath() const
void openRequestedFile()
Uses DQMStore to access the DQM file.
SiStripPedestalsDQMService(const edm::ParameterSet &, const edm::ActivityRegistry &)