54 edm::LogInfo(
"SiPixelEDAClient") <<
" Creating SiPixelEDAClient " <<
"\n" ;
73 string localPath =
string(
"DQM/SiPixelMonitorClient/test/loader.html");
78 cerr <<
"Input File: loader.html"<<
" could not be opened!" << endl;
82 while (fin.getline(buf,
BUF_SIZE,
'\n')) {
97 inputSourceToken_ = consumes<FEDRawDataCollection>(ps.
getUntrackedParameter<
string>(
"inputSource",
"source"));
106 edm::LogInfo(
"SiPixelEDAClient") <<
" Deleting SiPixelEDAClient " <<
"\n" ;
113 if (sipixelInformationExtractor_) {
114 delete sipixelInformationExtractor_;
115 sipixelInformationExtractor_ = 0;
117 if (sipixelActionExecutor_) {
118 delete sipixelActionExecutor_;
119 sipixelActionExecutor_ = 0;
121 if (sipixelDataQuality_) {
122 delete sipixelDataQuality_;
123 sipixelDataQuality_ = 0;
138 edm::LogInfo (
"SiPixelEDAClient") <<
"[SiPixelEDAClient]: Begining of Run";
147 summaryFrequency_ = -1;
148 tkMapFrequency_ = -1;
149 actionOnLumiSec_ =
false;
150 actionOnRunEnd_ =
true;
151 evtOffsetForInit_ = -1;
155 if(Tier0Flag_) nFEDs_ = 40;
158 bei_->setCurrentFolder(
"Pixel/");
162 sipixelActionExecutor_->createSummary(bei_);
164 if(!Tier0Flag_) sipixelActionExecutor_->bookDeviations(bei_);
166 if(doHitEfficiency_) sipixelActionExecutor_->bookEfficiency(bei_);
168 sipixelActionExecutor_->bookOccupancyPlots(bei_, hiRes_);
170 if(noiseRate_>0.) sipixelInformationExtractor_->bookNoisyPixels(bei_, noiseRate_, Tier0Flag_);
172 sipixelDataQuality_->bookGlobalQualityFlag(bei_, Tier0Flag_, nFEDs_);
192 edm::LogInfo (
"SiPixelEDAClient") <<
"[SiPixelEDAClient]: Begin of LS transition";
194 nEvents_lastLS_=0; nErrorsBarrel_lastLS_=0; nErrorsEndcap_lastLS_=0;
195 MonitorElement * me = bei_->get(
"Pixel/AdditionalPixelErrors/byLumiErrors");
216 e.
getByToken(inputSourceToken_, rawDataHandle);
218 edm::LogInfo(
"SiPixelEDAClient") << inputSource_ <<
" is empty";
223 for(
int i = 0;
i != 40;
i++){
240 edm::LogInfo (
"SiPixelEDAClient") <<
"[SiPixelEDAClient]: End of LS transition, performing the DQM client operation";
245 edm::LogInfo(
"SiPixelEDAClient") <<
"====================================================== " << endl <<
" ===> Iteration # " << nLumiSecs_ <<
" " << lumiSeg.
luminosityBlock() << endl <<
"====================================================== " << endl;
248 if(actionOnLumiSec_ && nLumiSecs_ % 1 == 0 ){
252 if(doHitEfficiency_) sipixelActionExecutor_->createEfficiency(bei_);
257 sipixelActionExecutor_->createOccupancy(bei_);
262 sipixelDataQuality_->computeGlobalQualityFlagByLumi(bei_,init,nFEDs_,Tier0Flag_,nEvents_lastLS_,nErrorsBarrel_lastLS_,nErrorsEndcap_lastLS_);
265 sipixelDataQuality_->fillGlobalQualityPlot(bei_,init,eSetup,nFEDs_,Tier0Flag_,nLumiSecs_);
268 if(noiseRate_>=0.) sipixelInformationExtractor_->findNoisyPixels(bei_, init, noiseRate_, noiseRateDenominator_, eSetup);
292 sipixelActionExecutor_->createSummary(bei_);
294 if(doHitEfficiency_) sipixelActionExecutor_->createEfficiency(bei_);
299 sipixelActionExecutor_->createOccupancy(bei_);
303 sipixelDataQuality_->computeGlobalQualityFlag(bei_,init,nFEDs_,Tier0Flag_);
307 sipixelDataQuality_->fillGlobalQualityPlot(bei_,init,eSetup,nFEDs_,Tier0Flag_,nLumiSecs_);
310 if(noiseRate_>=0.) sipixelInformationExtractor_->findNoisyPixels(bei_, init, noiseRate_, noiseRateDenominator_, eSetup);
332 edm::LogInfo(
"SiPixelEDAClient") <<
"[SiPixelEDAClient]: endjob called!";
T getUntrackedParameter(std::string const &, T const &) const
SiPixelEDAClient(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual ~SiPixelEDAClient()
size_t size() const
Lenght of the data buffer in bytes.
LuminosityBlockNumber_t luminosityBlock() const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
void analyze(edm::Event const &e, edm::EventSetup const &eSetup)
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
double getBinContent(int binx) const
get content of bin (1-D)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void Reset(void)
reset ME (ie. contents, errors, etc)