00001 #include <DQM/HcalMonitorClient/interface/HcalDataFormatClient.h>
00002 #include <DQM/HcalMonitorClient/interface/HcalClientUtils.h>
00003 #include "DQMServices/Core/interface/DQMStore.h"
00004 #include "DQMServices/Core/interface/MonitorElement.h"
00005
00006 HcalDataFormatClient::HcalDataFormatClient(){}
00007
00008
00009 void HcalDataFormatClient::init(const ParameterSet& ps, DQMStore* dbe, string clientName){
00010
00011 HcalBaseClient::init(ps,dbe,clientName);
00012
00013 for(int i=0; i<3; i++){
00014 dferr_[i] = NULL;
00015 }
00016
00017 spigotErrs_ = NULL;
00018 DCC_Err_Warn_ = NULL;
00019 DCC_Evt_Fmt_ = NULL;
00020 CDF_Violation_ = NULL;
00021 DCC_Spigot_Err_ = NULL;
00022 badDigis_ = NULL;
00023 unmappedDigis_ = NULL;
00024 unmappedTPDs_ = NULL;
00025 fedErrMap_ = NULL;
00026 BCN_ = NULL;
00027 dccBCN_ = NULL;
00028 BCNCheck_ = NULL;
00029 EvtNCheck_ = NULL;
00030 FibOrbMsgBCN_ = NULL;
00031
00032 BCNMap_ = NULL;
00033 EvtMap_ = NULL;
00034 ErrMapbyCrate_ = NULL;
00035 FWVerbyCrate_ = NULL;
00036
00037 InvHTRData_ = NULL;
00038 EvFragSize_ = NULL;
00039 EvFragSize2_ = NULL;
00040 Num_Frags_by_FED_ = NULL;
00041
00042 ErrCrate0_ = NULL;
00043 ErrCrate1_ = NULL;
00044 ErrCrate2_ = NULL;
00045 ErrCrate3_ = NULL;
00046 ErrCrate4_ = NULL;
00047 ErrCrate5_ = NULL;
00048 ErrCrate6_ = NULL;
00049 ErrCrate7_ = NULL;
00050 ErrCrate8_ = NULL;
00051 ErrCrate9_ = NULL;
00052 ErrCrate10_ = NULL;
00053 ErrCrate11_ = NULL;
00054 ErrCrate12_ = NULL;
00055 ErrCrate13_ = NULL;
00056 ErrCrate14_ = NULL;
00057 ErrCrate15_ = NULL;
00058 ErrCrate16_ = NULL;
00059 ErrCrate17_ = NULL;
00060
00061 }
00062
00063 HcalDataFormatClient::~HcalDataFormatClient(){
00064 this->cleanup();
00065 }
00066
00067 void HcalDataFormatClient::beginJob(void){
00068 if ( debug_>0 ) cout << "HcalDataFormatClient: beginJob" << endl;
00069
00070 ievt_ = 0; jevt_ = 0;
00071 return;
00072 }
00073
00074 void HcalDataFormatClient::beginRun(void){
00075 if ( debug_>0 ) cout << "HcalDataFormatClient: beginRun" << endl;
00076
00077 jevt_ = 0;
00078 this->resetAllME();
00079 return;
00080 }
00081
00082 void HcalDataFormatClient::endJob(void) {
00083 if ( debug_>0 ) cout << "HcalDataFormatClient: endJob, ievt = " << ievt_ << endl;
00084
00085 this->cleanup();
00086
00087 return;
00088 }
00089
00090 void HcalDataFormatClient::endRun(void) {
00091
00092 if ( debug_>0 ) cout << "HcalDataFormatClient: endRun, jevt = " << jevt_ << endl;
00093
00094 this->cleanup();
00095
00096 return;
00097 }
00098
00099
00100
00101 void HcalDataFormatClient::cleanup(void) {
00102
00103 if ( cloneME_ ) {
00104 for(int i=0; i<3; i++){
00105 if ( dferr_[i] ) delete dferr_[i];
00106 }
00107
00108 if ( spigotErrs_) delete spigotErrs_;
00109 if ( DCC_Err_Warn_) delete DCC_Err_Warn_;
00110 if ( DCC_Evt_Fmt_) delete DCC_Evt_Fmt_;
00111 if ( DCC_Spigot_Err_) delete DCC_Spigot_Err_;
00112 if ( CDF_Violation_) delete CDF_Violation_;
00113
00114 if ( badDigis_) delete badDigis_;
00115 if ( unmappedDigis_) delete unmappedDigis_;
00116 if ( unmappedTPDs_) delete unmappedTPDs_;
00117 if ( fedErrMap_) delete fedErrMap_;
00118
00119 if( BCN_) delete BCN_;
00120 if( dccBCN_) delete dccBCN_;
00121 if( BCNCheck_) delete BCNCheck_;
00122 if( EvtNCheck_) delete EvtNCheck_;
00123 if( FibOrbMsgBCN_) delete FibOrbMsgBCN_;
00124
00125 if (BCNMap_) delete BCNMap_;
00126 if (EvtMap_) delete EvtMap_;
00127 if (ErrMapbyCrate_) delete ErrMapbyCrate_;
00128 if (FWVerbyCrate_) delete FWVerbyCrate_;
00129
00130 if (EvFragSize_) delete EvFragSize_;
00131 if (EvFragSize2_) delete EvFragSize2_;
00132 if (InvHTRData_) delete InvHTRData_;
00133 if (Num_Frags_by_FED_) delete Num_Frags_by_FED_;
00134
00135 if (ErrCrate0_) delete ErrCrate0_;
00136 if (ErrCrate1_) delete ErrCrate1_;
00137 if (ErrCrate2_) delete ErrCrate2_;
00138 if (ErrCrate3_) delete ErrCrate3_;
00139 if (ErrCrate4_) delete ErrCrate4_;
00140 if (ErrCrate5_) delete ErrCrate5_;
00141 if (ErrCrate6_) delete ErrCrate6_;
00142 if (ErrCrate7_) delete ErrCrate7_;
00143 if (ErrCrate8_) delete ErrCrate8_;
00144 if (ErrCrate9_) delete ErrCrate9_;
00145 if (ErrCrate10_) delete ErrCrate10_;
00146 if (ErrCrate11_) delete ErrCrate11_;
00147 if (ErrCrate12_) delete ErrCrate12_;
00148 if (ErrCrate13_) delete ErrCrate13_;
00149 if (ErrCrate14_) delete ErrCrate14_;
00150 if (ErrCrate15_) delete ErrCrate15_;
00151 if (ErrCrate16_) delete ErrCrate16_;
00152 if (ErrCrate17_) delete ErrCrate17_;
00153
00154 }
00155 for(int i=0; i<3; i++){
00156 dferr_[i] = NULL;
00157 }
00158
00159 spigotErrs_ = NULL;
00160 DCC_Err_Warn_ = NULL;
00161 DCC_Evt_Fmt_ = NULL;
00162 CDF_Violation_ = NULL;
00163 DCC_Spigot_Err_ = NULL;
00164 badDigis_ = NULL;
00165 unmappedDigis_ = NULL;
00166 unmappedTPDs_ = NULL;
00167 fedErrMap_ = NULL;
00168
00169 BCN_ = NULL;
00170 dccBCN_ = NULL;
00171
00172 BCNCheck_ = NULL;
00173 EvtNCheck_ = NULL;
00174 FibOrbMsgBCN_ = NULL;
00175
00176 BCNMap_ = NULL;
00177 EvtMap_ = NULL;
00178 ErrMapbyCrate_ = NULL;
00179 FWVerbyCrate_ = NULL;
00180
00181 EvFragSize_ = NULL;
00182 EvFragSize2_ = NULL;
00183 InvHTRData_ = NULL;
00184 Num_Frags_by_FED_ = NULL;
00185
00186 ErrCrate0_ = NULL;
00187 ErrCrate1_ = NULL;
00188 ErrCrate2_ = NULL;
00189 ErrCrate3_ = NULL;
00190 ErrCrate4_ = NULL;
00191 ErrCrate5_ = NULL;
00192 ErrCrate6_ = NULL;
00193 ErrCrate7_ = NULL;
00194 ErrCrate8_ = NULL;
00195 ErrCrate9_ = NULL;
00196 ErrCrate10_ = NULL;
00197 ErrCrate11_ = NULL;
00198 ErrCrate12_ = NULL;
00199 ErrCrate13_ = NULL;
00200 ErrCrate14_ = NULL;
00201 ErrCrate15_ = NULL;
00202 ErrCrate16_ = NULL;
00203 ErrCrate17_ = NULL;
00204
00205 return;
00206 }
00207
00208
00209
00210 void HcalDataFormatClient::analyze(void){
00211 jevt_++;
00212
00213 int updates = 0;
00214 if ( updates % 10 == 0 ) {
00215 if ( debug_>0 ) cout << "HcalDataFormatClient: " << updates << " updates" << endl;
00216 }
00217
00218 return;
00219 }
00220
00221 void HcalDataFormatClient::getHistograms(){
00222
00223 if(!dbe_) return;
00224
00225 char name[150];
00226 sprintf(name,"DataFormatMonitor/DCC Plots/DCC Error and Warning");
00227 DCC_Err_Warn_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00228
00229 sprintf(name,"DataFormatMonitor/DCC Plots/DCC Ev Fragment Size Distribution");
00230 FED_Frag_Sizes_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00231
00232 sprintf(name,"DataFormatMonitor/DCC Plots/ZZ DCC Expert Plots/DCC Event Format violation");
00233 DCC_Evt_Fmt_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00234
00235 sprintf(name,"DataFormatMonitor/DCC Plots/ZZ DCC Expert Plots/Common Data Format violations");
00236 CDF_Violation_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00237
00238 sprintf(name,"DataFormatMonitor/DCC Plots/DCC Nonzero Spigot Conditions");
00239 DCC_Spigot_Err_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00240
00241 sprintf(name,"DataFormatMonitor/DCC Plots/Spigot Format Errors");
00242 spigotErrs_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00243
00244 sprintf(name,"DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Bad Quality Digis -DV bit-Err bit-Cap Rotation");
00245 badDigis_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00246
00247 sprintf(name,"DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Digis");
00248 unmappedDigis_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00249
00250 sprintf(name,"DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Trigger Primitive Digis");
00251 unmappedTPDs_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00252
00253 sprintf(name,"DataFormatMonitor/DCC Plots/ZZ DCC Expert Plots/FED Error Map from Unpacker Report");
00254 fedErrMap_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00255
00256 sprintf(name,"DataFormatMonitor/HTR Plots/BCN from HTRs");
00257 BCN_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00258
00259 sprintf(name,"DataFormatMonitor/DCC Plots/BCN from DCCs");
00260 dccBCN_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00261
00262 sprintf(name,"DataFormatMonitor/HTR Plots/BCN Difference Between Ref HTR and DCC");
00263 BCNCheck_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00264
00265 sprintf(name,"DataFormatMonitor/HTR Plots/EvN Difference Between Ref HTR and DCC");
00266 EvtNCheck_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00267
00268 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/BCN of Fiber Orbit Message");
00269 FibOrbMsgBCN_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00270
00271 sprintf(name,"DataFormatMonitor/HTR Plots/EvN Inconsistent - HTR vs Ref HTR");
00272 EvtMap_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00273
00274 sprintf(name,"DataFormatMonitor/HTR Plots/BCN Inconsistent - HTR vs Ref HTR");
00275 BCNMap_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00276
00277 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Firmware Version");
00278 FWVerbyCrate_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00279
00280 sprintf(name,"DataFormatMonitor/HTR Plots/Invalid HTR Data");
00281 InvHTRData_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00282
00283 sprintf(name,"DataFormatMonitor/DCC Plots/Event Fragment Size for each FED");
00284 EvFragSize_ = getHistoTProfile(name, process_, dbe_, debug_,cloneME_);
00285
00286 sprintf(name,"DataFormatMonitor/DCC Plots/All Evt Frag Sizes");
00287 EvFragSize2_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00288
00289 sprintf(name,"DataFormatMonitor/DCC Plots/Num Event Frags by FED");
00290 Num_Frags_by_FED_ = getHisto(name, process_, dbe_, debug_,cloneME_);
00291
00292 sprintf(name,"DataFormatMonitor/HTR Plots/HTR Error Word by Crate");
00293 ErrMapbyCrate_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00294 labelyBits(ErrMapbyCrate_);
00295
00296 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 0");
00297 ErrCrate0_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00298 labelyBits(ErrCrate0_);
00299
00300 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 1");
00301 ErrCrate1_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00302 labelyBits(ErrCrate1_);
00303
00304 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 2");
00305 ErrCrate2_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00306 labelyBits(ErrCrate2_);
00307
00308 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 3");
00309 ErrCrate3_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00310 labelyBits(ErrCrate3_);
00311
00312 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 4");
00313 ErrCrate4_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00314 labelyBits(ErrCrate4_);
00315
00316 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 5");
00317 ErrCrate5_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00318 labelyBits(ErrCrate5_);
00319
00320 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 6");
00321 ErrCrate6_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00322 labelyBits(ErrCrate6_);
00323
00324 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 7");
00325 ErrCrate7_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00326 labelyBits(ErrCrate7_);
00327
00328 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 8");
00329 ErrCrate8_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00330 labelyBits(ErrCrate8_);
00331
00332 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 9");
00333 ErrCrate9_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00334 labelyBits(ErrCrate9_);
00335
00336 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 10");
00337 ErrCrate10_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00338 labelyBits(ErrCrate10_);
00339
00340 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 11");
00341 ErrCrate11_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00342 labelyBits(ErrCrate11_);
00343
00344 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 12");
00345 ErrCrate12_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00346 labelyBits(ErrCrate12_);
00347
00348 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 13");
00349 ErrCrate13_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00350 labelyBits(ErrCrate13_);
00351
00352 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 14");
00353 ErrCrate14_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00354 labelyBits(ErrCrate14_);
00355
00356 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 15");
00357 ErrCrate15_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00358 labelyBits(ErrCrate15_);
00359
00360 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 16");
00361 ErrCrate16_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00362 labelyBits(ErrCrate16_);
00363
00364 sprintf(name,"DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 17");
00365 ErrCrate17_ = getHisto2(name, process_, dbe_, debug_,cloneME_);
00366 labelyBits(ErrCrate17_);
00367
00368 for(int i=0; i<4; i++){
00369 if(!subDetsOn_[i]) continue;
00370 string type = "HBHE";
00371 if(i==1) type = "HBHE";
00372 else if(i==2) type = "HF";
00373 else if(i==3) type = "HO";
00374 sprintf(name,"DataFormatMonitor/HTR Plots/%s Data Format Error Word", type.c_str());
00375 int ind = i-1;
00376 if (ind <0) ind = 0;
00377 dferr_[ind] = getHisto(name, process_, dbe_, debug_,cloneME_);
00378 labelxBits(dferr_[ind]);
00379 }
00380 return;
00381 }
00382
00383
00384 void HcalDataFormatClient::labelxBits(TH1F* hist){
00385
00386 if(hist==NULL) return;
00387
00388
00389
00390 hist->SetXTitle("Error Bit");
00391 hist->GetXaxis()->SetBinLabel(1,"Overflow Warn");
00392 hist->GetXaxis()->SetBinLabel(2,"Buffer Busy");
00393 hist->GetXaxis()->SetBinLabel(3,"Empty Event");
00394 hist->GetXaxis()->SetBinLabel(4,"Reject L1A");
00395 hist->GetXaxis()->SetBinLabel(5,"Latency Err");
00396 hist->GetXaxis()->SetBinLabel(6,"Latency Warn");
00397 hist->GetXaxis()->SetBinLabel(7,"OpDat Err");
00398 hist->GetXaxis()->SetBinLabel(8,"Clock Err");
00399 hist->GetXaxis()->SetBinLabel(9,"Bunch Err");
00400 hist->GetXaxis()->SetBinLabel(13,"Test Mode");
00401 hist->GetXaxis()->SetBinLabel(14,"Histo Mode");
00402 hist->GetXaxis()->SetBinLabel(15,"Calib Trig");
00403 hist->GetXaxis()->SetBinLabel(16,"Bit15 Err");
00404
00405 return;
00406 }
00407
00408 void HcalDataFormatClient::labelyBits(TH2F* hist){
00409
00410 if(hist==NULL) return;
00411
00412 hist->SetYTitle("Error Bit");
00413 hist->GetYaxis()->SetBinLabel(1,"Overflow Warn");
00414 hist->GetYaxis()->SetBinLabel(2,"Buffer Busy");
00415 hist->GetYaxis()->SetBinLabel(3,"Empty Event");
00416 hist->GetYaxis()->SetBinLabel(4,"Reject L1A");
00417 hist->GetYaxis()->SetBinLabel(5,"Latency Err");
00418 hist->GetYaxis()->SetBinLabel(6,"Latency Warn");
00419 hist->GetYaxis()->SetBinLabel(7,"OpDat Err");
00420 hist->GetYaxis()->SetBinLabel(8,"Clock Err");
00421 hist->GetYaxis()->SetBinLabel(9,"Bunch Err");
00422 hist->GetYaxis()->SetBinLabel(13,"Test Mode");
00423 hist->GetYaxis()->SetBinLabel(14,"Histo Mode");
00424 hist->GetYaxis()->SetBinLabel(15,"Calib Trig");
00425 hist->GetYaxis()->SetBinLabel(16,"Bit15 Err");
00426
00427 return;
00428 }
00429
00430
00431 void HcalDataFormatClient::report(){
00432 if(!dbe_) return;
00433 if ( debug_>0 ) cout << "HcalDataFormatClient: report" << endl;
00434
00435 char name[256];
00436
00437 sprintf(name, "%sHcal/DataFormatMonitor/Data Format Task Event Number",process_.c_str());
00438 MonitorElement* me = dbe_->get(name);
00439 if ( me ) {
00440 string s = me->valueString();
00441 ievt_ = -1;
00442 sscanf((s.substr(2,s.length()-2)).c_str(), "%d", &ievt_);
00443 if ( debug_>0 ) cout << "Found '" << name << "'" << endl;
00444 }
00445 else printf("Didn't find %s\n",name);
00446 getHistograms();
00447
00448 return;
00449 }
00450
00451 void HcalDataFormatClient::resetAllME(){
00452
00453 if(!dbe_) return;
00454
00455 char name[150];
00456 sprintf(name,"%sHcal/DataFormatMonitor/DCC Plots/Spigot Format Errors",process_.c_str());
00457 resetME(name,dbe_);
00458
00459 sprintf(name,"%sHcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Bad Quality Digis -DV bit-Err bit-Cap Rotation",process_.c_str());
00460 resetME(name,dbe_);
00461
00462 sprintf(name,"%sHcal/DataFormatMonitor/DCC Plots/Num Event Frags by FED",process_.c_str());
00463 resetME(name,dbe_);
00464
00465 sprintf(name,"%sHcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Digis",process_.c_str());
00466 resetME(name,dbe_);
00467
00468 sprintf(name,"%sHcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Trigger Primitive Digis",process_.c_str());
00469 resetME(name,dbe_);
00470
00471 sprintf(name,"%sHcal/DataFormatMonitor/DCC Plots/ZZ DCC Expert Plots/FED Error Map from Unpacker Report",process_.c_str());
00472 resetME(name,dbe_);
00473
00474 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/BCN from HTRs",process_.c_str());
00475 resetME(name,dbe_);
00476
00477 sprintf(name,"%sHcal/DataFormatMonitor/DCC Plots/BCN from DCCs",process_.c_str());
00478 resetME(name,dbe_);
00479
00480 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/BCN Inconsistent - HTR vs Ref HTR",process_.c_str());
00481 resetME(name,dbe_);
00482
00483 sprintf(name,"%sHcal/DataFormatMonitor/EvN Inconsistent - HTR vs Ref HTR",process_.c_str());
00484 resetME(name,dbe_);
00485
00486 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/FibOrbMsgBCN",process_.c_str());
00487 resetME(name,dbe_);
00488
00489 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/EvN Difference Between Ref HTR and DCC",process_.c_str());
00490 resetME(name,dbe_);
00491
00492 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/BCN Difference Between Ref HTR and DCC",process_.c_str());
00493 resetME(name,dbe_);
00494
00495 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Firmware Version",process_.c_str());
00496 resetME(name,dbe_);
00497
00498 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/Invalid HTR Data",process_.c_str());
00499 resetME(name,dbe_);
00500
00501 sprintf(name,"%sHcal/DataFormatMonitor/DCC Plots/Event Fragment Size for each FED",process_.c_str());
00502 resetME(name,dbe_);
00503
00504 sprintf(name,"%sHcal/DataFormatMonitor/DCC Plots/All Evt Frag Sizes",process_.c_str());
00505 resetME(name,dbe_);
00506
00507 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/HTR Error Word by Crate",process_.c_str());
00508 resetME(name,dbe_);
00509
00510 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 0",process_.c_str());
00511 resetME(name,dbe_);
00512
00513 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 1",process_.c_str());
00514 resetME(name,dbe_);
00515
00516 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 2",process_.c_str());
00517 resetME(name,dbe_);
00518
00519 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 3",process_.c_str());
00520 resetME(name,dbe_);
00521
00522 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 4",process_.c_str());
00523 resetME(name,dbe_);
00524
00525 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 5",process_.c_str());
00526 resetME(name,dbe_);
00527
00528 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 6",process_.c_str());
00529 resetME(name,dbe_);
00530
00531 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 7",process_.c_str());
00532 resetME(name,dbe_);
00533
00534 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 8",process_.c_str());
00535 resetME(name,dbe_);
00536
00537 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 9",process_.c_str());
00538 resetME(name,dbe_);
00539
00540 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 10",process_.c_str());
00541 resetME(name,dbe_);
00542
00543 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 11",process_.c_str());
00544 resetME(name,dbe_);
00545
00546 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 12",process_.c_str());
00547 resetME(name,dbe_);
00548
00549 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 13",process_.c_str());
00550 resetME(name,dbe_);
00551
00552 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 14",process_.c_str());
00553 resetME(name,dbe_);
00554
00555 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 15",process_.c_str());
00556 resetME(name,dbe_);
00557
00558 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 16",process_.c_str());
00559 resetME(name,dbe_);
00560
00561 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 17",process_.c_str());
00562 resetME(name,dbe_);
00563
00564 for(int i=0; i<4; i++){
00565 if(!subDetsOn_[i]) continue;
00566 string type = "HBHE";
00567 if(i==1) type = "HBHE";
00568 else if(i==2) type = "HF";
00569 else if(i==3) type = "HO";
00570
00571 sprintf(name,"%sHcal/DataFormatMonitor/HTR Plots/%s Data Format Error Word",process_.c_str(), type.c_str());
00572 resetME(name,dbe_);
00573
00574 }
00575
00576 return;
00577 }
00578
00579 void HcalDataFormatClient::htmlOutput(int runNo, string htmlDir, string htmlName){
00580
00581 if (debug_>0) cout << "Preparing HcalDataFormatClient html output ..." << endl;
00582 string client = "DataFormatMonitor";
00583 htmlErrors(runNo,htmlDir,client,process_,dbe_,dqmReportMapErr_,dqmReportMapWarn_,dqmReportMapOther_);
00584
00585 ofstream htmlFile;
00586 htmlFile.open((htmlDir + htmlName).c_str());
00587
00588
00589 htmlFile << "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> " << endl;
00590 htmlFile << "<html> " << endl;
00591 htmlFile << "<head> " << endl;
00592 htmlFile << " <meta content=\"text/html; charset=ISO-8859-1\" " << endl;
00593 htmlFile << " https-equiv=\"content-type\"> " << endl;
00594 htmlFile << " <title>Monitor: Data Format Task output</title> " << endl;
00595 htmlFile << "</head> " << endl;
00596 htmlFile << "<style type=\"text/css\"> td { font-weight: bold } </style>" << endl;
00597 htmlFile << "<body> " << endl;
00598 htmlFile << "<br> " << endl;
00599 htmlFile << "<h2>Run: " << endl;
00600 htmlFile << " <span " << endl;
00601 htmlFile << " style=\"color: rgb(0, 0, 153);\">" << runNo << "</span></h2>" << endl;
00602 htmlFile << "<h2>Monitoring task: <span " << endl;
00603 htmlFile << " style=\"color: rgb(0, 0, 153);\">Data Format</span></h2> " << endl;
00604 htmlFile << "<h2>Events processed: " << endl;
00605 htmlFile << " <span " << endl;
00606 htmlFile << " style=\"color: rgb(0, 0, 153);\">" << ievt_ << "</span></h2>" << endl;
00607 htmlFile << "<hr>" << endl;
00608 htmlFile << "<table width=100% border=1><tr>" << endl;
00609 if(hasErrors())htmlFile << "<td bgcolor=red><a href=\"DataFormatMonitorErrors.html\">Errors in this task</a></td>" << endl;
00610 else htmlFile << "<td bgcolor=lime>No Errors</td>" << endl;
00611 if(hasWarnings()) htmlFile << "<td bgcolor=yellow><a href=\"DataFormatMonitorWarnings.html\">Warnings in this task</a></td>" << endl;
00612 else htmlFile << "<td bgcolor=lime>No Warnings</td>" << endl;
00613 if(hasOther()) htmlFile << "<td bgcolor=aqua><a href=\"DataFormatMonitorMessages.html\">Messages in this task</a></td>" << endl;
00614 else htmlFile << "<td bgcolor=lime>No Messages</td>" << endl;
00615 htmlFile << "</tr></table>" << endl;
00616 htmlFile << "<hr>" << endl;
00617
00618 htmlFile << "<h2><strong>Hcal DCC Error Word</strong></h2>" << endl;
00619 htmlFile << "<h3>" << endl;
00620 if(subDetsOn_[0]||subDetsOn_[1]) htmlFile << "<a href=\"#HBHE_Plots\">HBHE Plots </a></br>" << endl;
00621
00622 if(subDetsOn_[2]) htmlFile << "<a href=\"#HF_Plots\">HF Plots </a></br>" << endl;
00623 if(subDetsOn_[3]) htmlFile << "<a href=\"#HO_Plots\">HO Plots </a></br>" << endl;
00624 htmlFile << "</h3>" << endl;
00625 htmlFile << "<hr>" << endl;
00626
00627 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00628 htmlFile << "cellpadding=\"10\"> " << endl;
00629
00630 htmlFile << "<td> <h3>Global Histograms</h3></td></tr>" << endl;
00631 htmlFile << "<tr align=\"left\">" << endl;
00632 histoHTMLTProfile(runNo,EvFragSize_,"FED ","Ev Frag Size (bytes)", 92, htmlFile,htmlDir);
00633 histoHTML2 (runNo,EvFragSize2_,"FED ","Ev Frag Size (bytes)",100, htmlFile,htmlDir);
00634 htmlFile << "</tr>" << endl;
00635
00636 htmlFile << "<tr align=\"left\">" << endl;
00637 histoHTML2(runNo,ErrMapbyCrate_,"Crate #"," ", 92, htmlFile,htmlDir);
00638 histoHTML(runNo, FED_Frag_Sizes_,"Ev Frag Size (bytes)", "", 100, htmlFile,htmlDir);
00639 htmlFile << "</tr>" << endl;
00640
00641 htmlFile << "<tr align=\"left\">" << endl;
00642 histoHTML(runNo,BCN_,"Bunch Counter Number","Events", 23, htmlFile,htmlDir);
00643 histoHTML(runNo,dccBCN_,"Bunch Counter Number","Events", 23, htmlFile,htmlDir);
00644 htmlFile << "</tr>" << endl;
00645
00646 htmlFile << "<tr align=\"left\">" << endl;
00647 histoHTML2(runNo,CDF_Violation_,"HCAL FED ID"," ", 92, htmlFile,htmlDir);
00648 histoHTML2(runNo,DCC_Evt_Fmt_,"HCAL FED ID","", 100, htmlFile,htmlDir);
00649 htmlFile << "</tr>" << endl;
00650
00651 htmlFile << "<tr align=\"left\">" << endl;
00652 histoHTML2(runNo,DCC_Spigot_Err_,"HCAL FED ID"," ", 92, htmlFile,htmlDir);
00653 histoHTML2(runNo,DCC_Err_Warn_,"HCAL FED ID","", 100, htmlFile,htmlDir);
00654 htmlFile << "</tr>" << endl;
00655
00656 htmlFile << "<tr align=\"left\">" << endl;
00657 histoHTML (runNo,Num_Frags_by_FED_,"FED ID" ," ",100, htmlFile,htmlDir);
00658 htmlFile << "</tr>" << endl;
00659
00660 htmlFile << "<tr align=\"left\">" << endl;
00661 histoHTML2(runNo,BCNMap_,"Slot #","Crate #", 92, htmlFile,htmlDir);
00662 histoHTML2(runNo,EvtMap_,"Slot #","Crate #", 100, htmlFile,htmlDir);
00663 htmlFile << "</tr>" << endl;
00664
00665 htmlFile << "<tr align=\"left\">" << endl;
00666 histoHTML(runNo,BCNCheck_,"htr BCN - dcc BCN"," ", 92, htmlFile,htmlDir);
00667 histoHTML(runNo,EvtNCheck_,"htr Evt # - dcc Evt #","Events", 100, htmlFile,htmlDir);
00668 htmlFile << "</tr>" << endl;
00669
00670 htmlFile << "<tr align=\"center\">" << endl;
00671 histoHTML(runNo,FibOrbMsgBCN_,"Fiber Orbit Message BCN","Events", 30, htmlFile,htmlDir);
00672 histoHTML2(runNo,InvHTRData_,"Spigot #","DCC #", 23, htmlFile,htmlDir);
00673 htmlFile << "</tr>" << endl;
00674
00675 htmlFile << "<tr align=\"left\">" << endl;
00676 histoHTML(runNo,unmappedDigis_,"# Digis","Events", 92, htmlFile,htmlDir);
00677 histoHTML(runNo,unmappedTPDs_,"# TP Digis","Events", 100, htmlFile,htmlDir);
00678 htmlFile << "</tr>" << endl;
00679
00680 htmlFile << "<tr align=\"left\">" << endl;
00681 histoHTML(runNo,spigotErrs_,"# Errs","Events", 92, htmlFile,htmlDir);
00682 histoHTML(runNo,badDigis_,"# Bad Digis","Events", 100, htmlFile,htmlDir);
00683 htmlFile << "</tr>" << endl;
00684
00685 htmlFile << "<tr align=\"left\">" << endl;
00686 histoHTML(runNo,fedErrMap_,"DCC Id","# Errors", 92, htmlFile,htmlDir);
00687 histoHTML2(runNo,FWVerbyCrate_,"Crate #","Firmware Version", 100, htmlFile,htmlDir);
00688 htmlFile << "</tr>" << endl;
00689
00690 htmlFile << "<tr align=\"left\">" << endl;
00691 histoHTML2(runNo,ErrCrate0_,"Slot #"," ", 92, htmlFile,htmlDir);
00692 histoHTML2(runNo,ErrCrate1_,"Slot #"," ", 100, htmlFile,htmlDir);
00693 htmlFile << "</tr>" << endl;
00694
00695 htmlFile << "<tr align=\"left\">" << endl;
00696 histoHTML2(runNo,ErrCrate2_,"Slot #"," ", 92, htmlFile,htmlDir);
00697 histoHTML2(runNo,ErrCrate3_,"Slot #"," ", 100, htmlFile,htmlDir);
00698 htmlFile << "</tr>" << endl;
00699
00700 htmlFile << "<tr align=\"left\">" << endl;
00701 histoHTML2(runNo,ErrCrate4_,"Slot #"," ", 92, htmlFile,htmlDir);
00702 histoHTML2(runNo,ErrCrate5_,"Slot #"," ", 100, htmlFile,htmlDir);
00703 htmlFile << "</tr>" << endl;
00704
00705 htmlFile << "<tr align=\"left\">" << endl;
00706 histoHTML2(runNo,ErrCrate6_,"Slot #"," ", 92, htmlFile,htmlDir);
00707 histoHTML2(runNo,ErrCrate7_,"Slot #"," ", 100, htmlFile,htmlDir);
00708 htmlFile << "</tr>" << endl;
00709
00710 htmlFile << "<tr align=\"left\">" << endl;
00711 histoHTML2(runNo,ErrCrate8_,"Slot #"," ", 92, htmlFile,htmlDir);
00712 histoHTML2(runNo,ErrCrate9_,"Slot #"," ", 100, htmlFile,htmlDir);
00713 htmlFile << "</tr>" << endl;
00714
00715 htmlFile << "<tr align=\"left\">" << endl;
00716 histoHTML2(runNo,ErrCrate10_,"Slot #"," ", 92, htmlFile,htmlDir);
00717 histoHTML2(runNo,ErrCrate11_,"Slot #"," ", 100, htmlFile,htmlDir);
00718 htmlFile << "</tr>" << endl;
00719
00720 htmlFile << "<tr align=\"left\">" << endl;
00721 histoHTML2(runNo,ErrCrate12_,"Slot #"," ", 92, htmlFile,htmlDir);
00722 histoHTML2(runNo,ErrCrate13_,"Slot #"," ", 100, htmlFile,htmlDir);
00723 htmlFile << "</tr>" << endl;
00724
00725 htmlFile << "<tr align=\"left\">" << endl;
00726 histoHTML2(runNo,ErrCrate14_,"Slot #"," ", 92, htmlFile,htmlDir);
00727 histoHTML2(runNo,ErrCrate15_,"Slot #"," ", 100, htmlFile,htmlDir);
00728 htmlFile << "</tr>" << endl;
00729
00730 htmlFile << "<tr align=\"left\">" << endl;
00731 histoHTML2(runNo,ErrCrate16_,"Slot #"," ", 92, htmlFile,htmlDir);
00732 histoHTML2(runNo,ErrCrate17_,"Slot #"," ", 100, htmlFile,htmlDir);
00733 htmlFile << "</tr>" << endl;
00734
00735
00736 bool HBOn_ = subDetsOn_[0];
00737 for(int i=0; i<4; i++){
00738 if(!subDetsOn_[i]) continue;
00739
00740 string type = "HBHE";
00741 if(i==1) type = "HBHE";
00742 else if(i==2) type = "HF";
00743 else if(i==3) type = "HO";
00744 if (i==1 && HBOn_) continue;
00745 htmlFile << "<td> <a name=\""<<type<<"_Plots\"><h3>" << type << " Histograms</h3></td></tr>" << endl;
00746 htmlFile << "<tr align=\"left\">" << endl;
00747 int ind = i-1;
00748 if (ind<0) ind = 0;
00749 histoHTML(runNo,dferr_[ind],"Error Bit","Frequency", 92, htmlFile,htmlDir);
00750 htmlFile << "<tr align=\"left\">" << endl;
00751
00752
00753
00754
00755
00756
00757
00758 }
00759 htmlFile << "</table>" << endl;
00760 htmlFile << "<br>" << endl;
00761
00762
00763 htmlFile << "</body> " << endl;
00764 htmlFile << "</html> " << endl;
00765
00766 htmlFile.close();
00767 return;
00768 }
00769
00770
00771 void HcalDataFormatClient::createTests(){
00772
00773 if(debug_>0) cout << "HcalDataFormatClient: creating tests" << endl;
00774
00775 if(!dbe_) return;
00776
00777 char meTitle[250], name[250];
00778 vector<string> params;
00779
00780 for(int i=0; i<4; i++){
00781 if(!subDetsOn_[i]) continue;
00782 string type = "HBHE";
00783 if(i==1) type = "HBHE";
00784 else if(i==2) type = "HF";
00785 else if(i==3) type = "HO";
00786
00787 sprintf(meTitle,"%sHcal/DataFormatMonitor/HTR Plots/%s Data Format Error Word",process_.c_str(),type.c_str());
00788 sprintf(name,"DFMon %s HTR Err Word",type.c_str());
00789 if(dqmQtests_.find(name) == dqmQtests_.end()){
00790 MonitorElement* me = dbe_->get(meTitle);
00791 if(me){
00792 dqmQtests_[name]=meTitle;
00793 params.clear();
00794 params.push_back(meTitle); params.push_back(name);
00795 params.push_back("1.0"); params.push_back("0.95");
00796 params.push_back("0"); params.push_back("0");
00797 createYRangeTest(dbe_, params);
00798 }
00799 }
00800 }
00801
00802 sprintf(meTitle,"%sHcal/DataFormatMonitor/DCC Plots/ZZ DCC Expert Plots/DCC Event Format violation",process_.c_str());
00803 sprintf(name,"DFMon DCC Evt Format");
00804 if(dqmQtests_.find(name) == dqmQtests_.end()){
00805 MonitorElement* me = dbe_->get(meTitle);
00806 if(me){
00807 dqmQtests_[name]=meTitle;
00808 params.clear();
00809 params.push_back(meTitle); params.push_back(name);
00810 createH2ContentTest(dbe_, params);
00811 }
00812 }
00813
00814 sprintf(meTitle,"%sHcal/DataFormatMonitor/HTR Plots/HTR Error Word by Crate",process_.c_str());
00815 sprintf(name,"DFMon Err Wd by Crate");
00816 if(dqmQtests_.find(name) == dqmQtests_.end()){
00817 MonitorElement* me = dbe_->get(meTitle);
00818 if(me){
00819 dqmQtests_[name]=meTitle;
00820 params.clear();
00821 params.push_back(meTitle); params.push_back(name);
00822 createH2ContentTest(dbe_, params);
00823 }
00824 }
00825
00826 sprintf(meTitle,"%sHcal/DataFormatMonitor/DCC Plots/ZZ DCC Expert Plots/Common Data Format violations",process_.c_str());
00827 sprintf(name,"DFMon CDF Violations");
00828 if(dqmQtests_.find(name) == dqmQtests_.end()){
00829 MonitorElement* me = dbe_->get(meTitle);
00830 if(me){
00831 dqmQtests_[name]=meTitle;
00832 params.clear();
00833 params.push_back(meTitle); params.push_back(name);
00834 createH2ContentTest(dbe_, params);
00835 }
00836 }
00837
00838 sprintf(meTitle,"%sHcal/DataFormatMonitor/DCC Plots/DCC Error and Warning",process_.c_str());
00839 sprintf(name,"DFMon DCC Err/Warn");
00840 if(dqmQtests_.find(name) == dqmQtests_.end()){
00841 MonitorElement* me = dbe_->get(meTitle);
00842 if(me){
00843 dqmQtests_[name]=meTitle;
00844 params.clear();
00845 params.push_back(meTitle); params.push_back(name);
00846 createH2ContentTest(dbe_, params);
00847 }
00848 }
00849
00850 sprintf(meTitle,"%sHcal/DataFormatMonitor/DCC Plots/DCC Nonzero Spigot Conditions",process_.c_str());
00851 sprintf(name,"DFMon DCC Spigot Err");
00852 if(dqmQtests_.find(name) == dqmQtests_.end()){
00853 MonitorElement* me = dbe_->get(meTitle);
00854 if(me){
00855 dqmQtests_[name]=meTitle;
00856 params.clear();
00857 params.push_back(meTitle); params.push_back(name);
00858 createH2ContentTest(dbe_, params);
00859 }
00860 }
00861
00862 sprintf(meTitle,"%sHcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Bad Quality Digis -DV bit-Err bit-Cap Rotation",process_.c_str());
00863 sprintf(name,"DFMon # Bad Digis");
00864 if(dqmQtests_.find(name) == dqmQtests_.end()){
00865 MonitorElement* me = dbe_->get(meTitle);
00866 if(me){
00867 dqmQtests_[name]=meTitle;
00868 params.clear();
00869 params.push_back(meTitle); params.push_back(name);
00870 params.push_back("1.0"); params.push_back("0.99");
00871 params.push_back("0.0"); params.push_back("0.0");
00872 createXRangeTest(dbe_, params);
00873 }
00874 }
00875
00876 sprintf(meTitle,"%sHcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Digis" ,process_.c_str());
00877 sprintf(name,"DFMon # Unmapped Digis");
00878 if(dqmQtests_.find(name) == dqmQtests_.end()){
00879 MonitorElement* me = dbe_->get(meTitle);
00880 if(me){
00881 dqmQtests_[name]=meTitle;
00882 params.clear();
00883 params.push_back(meTitle); params.push_back(name);
00884 params.push_back("1.0"); params.push_back("0.99");
00885 params.push_back("0.0"); params.push_back("0.0");
00886 createXRangeTest(dbe_, params);
00887 }
00888 }
00889
00890 sprintf(meTitle,"%sHcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Trigger Primitive Digis",process_.c_str());
00891 sprintf(name,"DFMon # Unmapped TP Digis");
00892 if(dqmQtests_.find(name) == dqmQtests_.end()){
00893 MonitorElement* me = dbe_->get(meTitle);
00894 if(me){
00895 dqmQtests_[name]=meTitle;
00896 params.clear();
00897 params.push_back(meTitle); params.push_back(name);
00898 params.push_back("1.0"); params.push_back("0.99");
00899 params.push_back("0.0"); params.push_back("0.0");
00900 createXRangeTest(dbe_, params);
00901 }
00902 }
00903
00904 return;
00905 }
00906
00907 void HcalDataFormatClient::loadHistograms(TFile* infile){
00908
00909 TNamed* tnd = (TNamed*)infile->Get("DQMData/Hcal/DataFormatMonitor/ZZ DQM Diagnostics/Data Format Task Event Number");
00910 if(tnd){
00911 string s =tnd->GetTitle();
00912 ievt_ = -1;
00913 sscanf((s.substr(2,s.length()-2)).c_str(), "%d", &ievt_);
00914 }
00915
00916 char name[150];
00917 sprintf(name,"DQMData/Hcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Bad Quality Digis -DV bit-Err bit-Cap Rotation");
00918 badDigis_ = (TH1F*)infile->Get(name);
00919
00920 sprintf(name,"DQMData/Hcal/DataFormatMonitor/DCC Plots/Num Event Frags by FED");
00921 Num_Frags_by_FED_ = (TH1F*)infile->Get(name);
00922
00923 sprintf(name,"DQMData/Hcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Digis");
00924 unmappedDigis_ = (TH1F*)infile->Get(name);
00925
00926 sprintf(name,"DQMData/Hcal/DataFormatMonitor/ZZ HCal-Wide Expert Plots/Num Unmapped Trigger Primitive Digis");
00927 unmappedTPDs_ = (TH1F*)infile->Get(name);
00928
00929 sprintf(name,"DQMData/Hcal/DataFormatMonitor/DCC Plots/ZZ DCC Expert Plots/FED Error Map from Unpacker Report");
00930 fedErrMap_ = (TH1F*)infile->Get(name);
00931
00932 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/BCN from HTRs");
00933 BCN_ = (TH1F*)infile->Get(name);
00934
00935 sprintf(name,"DQMData/Hcal/DataFormatMonitor/DCC Plots/BCN from DCCs");
00936 dccBCN_ = (TH1F*)infile->Get(name);
00937
00938 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/BCN Difference Between Ref HTR and DCC");
00939 BCNCheck_ = (TH1F*)infile->Get(name);
00940
00941 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/EvN Difference Between Ref HTR and DCC");
00942 EvtNCheck_ = (TH1F*)infile->Get(name);
00943
00944 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/BCN of Fiber Orbit Message");
00945 FibOrbMsgBCN_ = (TH1F*)infile->Get(name);
00946
00947 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/EvN Inconsistent - HTR vs Ref HTR");
00948 EvtMap_ = (TH2F*)infile->Get(name);
00949
00950 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/BCN Inconsistent - HTR vs Ref HTR");
00951 BCNMap_ = (TH2F*)infile->Get(name);
00952
00953 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Firmware Version");
00954 FWVerbyCrate_ = (TH2F*)infile->Get(name);
00955
00956 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/Invalid HTR Data");
00957 InvHTRData_ = (TH2F*)infile->Get(name);
00958
00959 sprintf(name,"DQMData/Hcal/DataFormatMonitor/DCC Plots/Event Fragment Size for each FED");
00960 EvFragSize_ = (TProfile*)infile->Get(name);
00961
00962 sprintf(name,"DQMData/Hcal/DataFormatMonitor/DCC Plots/All Evt Frag Sizes");
00963 EvFragSize2_ = (TH2F*)infile->Get(name);
00964
00965 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/HTR Error Word by Crate");
00966 ErrMapbyCrate_ = (TH2F*)infile->Get(name);
00967
00968 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 0");
00969 ErrCrate0_ = (TH2F*)infile->Get(name);
00970
00971 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 1");
00972 ErrCrate1_ = (TH2F*)infile->Get(name);
00973
00974 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 2");
00975 ErrCrate2_ = (TH2F*)infile->Get(name);
00976
00977 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 3");
00978 ErrCrate3_ = (TH2F*)infile->Get(name);
00979
00980 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 4");
00981 ErrCrate4_ = (TH2F*)infile->Get(name);
00982
00983 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 5");
00984 ErrCrate5_ = (TH2F*)infile->Get(name);
00985
00986 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 6");
00987 ErrCrate6_ = (TH2F*)infile->Get(name);
00988
00989 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 7");
00990 ErrCrate7_ = (TH2F*)infile->Get(name);
00991
00992 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 8");
00993 ErrCrate8_ = (TH2F*)infile->Get(name);
00994
00995 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 9");
00996 ErrCrate9_ = (TH2F*)infile->Get(name);
00997
00998 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 10");
00999 ErrCrate10_ = (TH2F*)infile->Get(name);
01000
01001 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 11");
01002 ErrCrate11_ = (TH2F*)infile->Get(name);
01003
01004 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 12");
01005 ErrCrate12_ = (TH2F*)infile->Get(name);
01006
01007 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 13");
01008 ErrCrate13_ = (TH2F*)infile->Get(name);
01009
01010 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 14");
01011 ErrCrate14_ = (TH2F*)infile->Get(name);
01012
01013 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 15");
01014 ErrCrate15_ = (TH2F*)infile->Get(name);
01015
01016 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 16");
01017 ErrCrate16_ = (TH2F*)infile->Get(name);
01018
01019 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/ZZ HTR Expert Plots/HTR Error Word - Crate 17");
01020 ErrCrate17_ = (TH2F*)infile->Get(name);
01021
01022 for(int i=0; i<4; i++){
01023 if(!subDetsOn_[i]) continue;
01024 string type = "HBHE";
01025 if(i==1) type = "HBHE";
01026 else if(i==2) type = "HF";
01027 else if(i==3) type = "HO";
01028
01029 sprintf(name,"DQMData/Hcal/DataFormatMonitor/HTR Plots/%s Data Format Error Word", type.c_str());
01030 int ind = i-1;
01031 if (i<0) i=0;
01032 dferr_[ind] = (TH1F*)infile->Get(name);
01033 labelxBits(dferr_[ind]);
01034
01035
01036
01037
01038
01039
01040
01041 }
01042
01043 return;
01044 }