00001 #include <DQM/HcalMonitorClient/interface/HcalLEDClient.h>
00002 #include <DQM/HcalMonitorClient/interface/HcalClientUtils.h>
00003 #include "DQMServices/Core/interface/DQMStore.h"
00004 #include "DQMServices/Core/interface/MonitorElement.h"
00005
00006 HcalLEDClient::HcalLEDClient(){}
00007
00008 void HcalLEDClient::init(const ParameterSet& ps, DQMStore* dbe,string clientName){
00009
00010 HcalBaseClient::init(ps,dbe,clientName);
00011
00012 for(int i=0; i<4; i++){
00013 rms_shape_[i]=0;
00014 mean_shape_[i]=0;
00015 rms_time_[i]=0;
00016 mean_time_[i]=0;
00017 rms_energy_[i]=0;
00018 mean_energy_[i]=0;
00019
00020 rms_shapeDep_[i]=0;
00021 mean_shapeDep_[i]=0;
00022 rms_timeDep_[i]=0;
00023 mean_timeDep_[i]=0;
00024 rms_energyDep_[i]=0;
00025 mean_energyDep_[i]=0;
00026
00027 err_map_geo_[i]=0;
00028 err_map_elec_[i]=0;
00029 avg_shape_[i] = 0;
00030 avg_time_[i] = 0;
00031 avg_energy_[i] = 0;
00032 }
00033 HFlumi_etsum = 0;
00034 HFlumi_occabthr1 = 0;
00035 HFlumi_occbetthr1 = 0;
00036 HFlumi_occbelthr1 = 0;
00037 HFlumi_occabthr2 = 0;
00038 HFlumi_occbetthr2 = 0;
00039 HFlumi_occbelthr2 = 0;
00040
00041 rms_thresh_ = ps.getUntrackedParameter<double>("LEDRMS_ErrThresh", 0.8);
00042 if (debug_>0) cout << "LED RMS error threshold set to " << rms_thresh_ << endl;
00043
00044 mean_thresh_ = ps.getUntrackedParameter<double>("LEDMEAN_ErrThresh", 2.25);
00045 if (debug_>0) cout << "LED MEAN error threshold set to " << mean_thresh_ << endl;
00046
00047
00049 m_outputFileName = ps.getUntrackedParameter<string>("LEDoutputTextFile", "");
00050 if ( m_outputFileName.size() != 0 ) {
00051 if (debug_>0)
00052 cout << "Hcal LED text output will be saved to " << m_outputFileName.c_str() << endl;
00053 m_outTextFile.open(m_outputFileName.c_str());
00054 m_outTextFile<<"Det\tEta\tPhi\tD\tEnergy_Mean\tEnergy_RMS\tTime_Mean\tTime_RMS "<<std::endl;
00055 }
00056 }
00057
00058 HcalLEDClient::~HcalLEDClient(){
00059 this->cleanup();
00060 }
00061
00062 void HcalLEDClient::beginJob(const EventSetup& eventSetup){
00063
00064 if ( debug_>0 ) cout << "HcalLEDClient: beginJob" << endl;
00065
00066
00067
00068 edm::ESHandle<HcalDbService> pSetup;
00069 eventSetup.get<HcalDbRecord>().get( pSetup );
00070 readoutMap_=pSetup->getHcalMapping();
00071
00072 ievt_ = 0;
00073 jevt_ = 0;
00074 this->resetAllME();
00075 return;
00076 }
00077
00078 void HcalLEDClient::beginRun(void){
00079
00080 if ( debug_>0 ) cout << "HcalLEDClient: beginRun" << endl;
00081
00082 jevt_ = 0;
00083 this->resetAllME();
00084 return;
00085 }
00086
00087 void HcalLEDClient::endJob(void) {
00088
00089 if ( debug_>0 ) cout << "HcalLEDClient: endJob, ievt = " << ievt_ << endl;
00090
00091 this->cleanup();
00092 return;
00093 }
00094
00095 void HcalLEDClient::endRun(void) {
00096
00097 if ( debug_>0 ) cout << "HcalLEDClient: endRun, jevt = " << jevt_ << endl;
00098
00099 this->cleanup();
00100 return;
00101 }
00102
00103 void HcalLEDClient::setup(void) {
00104 return;
00105 }
00106
00107 void HcalLEDClient::cleanup(void) {
00108 if( cloneME_ ){
00109 for(int i=0; i<4; i++){
00110 if(rms_shape_[i]) delete rms_shape_[i];
00111 if(mean_shape_[i]) delete mean_shape_[i];
00112 if(rms_time_[i]) delete rms_time_[i];
00113 if(mean_time_[i]) delete mean_time_[i];
00114 if(rms_energy_[i]) delete rms_energy_[i];
00115 if(mean_energy_[i]) delete mean_energy_[i];
00116
00117 if(rms_shapeDep_[i]) delete rms_shapeDep_[i];
00118 if(mean_shapeDep_[i]) delete mean_shapeDep_[i];
00119 if(rms_timeDep_[i]) delete rms_timeDep_[i];
00120 if(mean_timeDep_[i]) delete mean_timeDep_[i];
00121 if(rms_energyDep_[i]) delete rms_energyDep_[i];
00122 if(mean_energyDep_[i]) delete mean_energyDep_[i];
00123
00124 if(err_map_geo_[i]) delete err_map_geo_[i];
00125 if(err_map_elec_[i]) delete err_map_elec_[i];
00126 if(avg_shape_[i]) delete avg_shape_[i];
00127 if(avg_time_[i]) delete avg_time_[i];
00128 if(avg_energy_[i]) delete avg_energy_[i];
00129 }
00130 if(HFlumi_etsum) delete HFlumi_etsum;
00131 if(HFlumi_occabthr1) delete HFlumi_occabthr1;
00132 if(HFlumi_occbetthr1) delete HFlumi_occbetthr1;
00133 if(HFlumi_occbelthr1) delete HFlumi_occbelthr1;
00134 if(HFlumi_occabthr2) delete HFlumi_occabthr2;
00135 if(HFlumi_occbetthr2) delete HFlumi_occbetthr2;
00136 if(HFlumi_occbelthr2) delete HFlumi_occbelthr2;
00137 }
00138
00139 for(int i=0; i<4; i++){
00140 rms_shape_[i]=0;
00141 mean_shape_[i]=0;
00142 rms_time_[i]=0;
00143 mean_time_[i]=0;
00144 rms_energy_[i]=0;
00145 mean_energy_[i]=0;
00146
00147 rms_shapeDep_[i]=0;
00148 mean_shapeDep_[i]=0;
00149 rms_timeDep_[i]=0;
00150 mean_timeDep_[i]=0;
00151 rms_energyDep_[i]=0;
00152 mean_energyDep_[i]=0;
00153
00154 err_map_geo_[i]=0;
00155 err_map_elec_[i]=0;
00156 avg_shape_[i] = 0;
00157 avg_time_[i] = 0;
00158 avg_energy_[i] = 0;
00159 }
00160 HFlumi_etsum = 0;
00161 HFlumi_occabthr1 = 0;
00162 HFlumi_occbetthr1 = 0;
00163 HFlumi_occbelthr1 = 0;
00164 HFlumi_occabthr2 = 0;
00165 HFlumi_occbetthr2 = 0;
00166 HFlumi_occbelthr2 = 0;
00167
00168
00169 dqmReportMapErr_.clear(); dqmReportMapWarn_.clear(); dqmReportMapOther_.clear();
00170 dqmQtests_.clear();
00171 return;
00172 }
00173
00174 void HcalLEDClient::report(){
00175 if(!dbe_) return;
00176 if ( debug_ >0 ) cout << "HcalLEDClient: report" << endl;
00177
00178 char name[256];
00179 sprintf(name, "%sHcal/LEDMonitor/LED Task Event Number",process_.c_str());
00180 MonitorElement* me = dbe_->get(name);
00181 if ( me ) {
00182 string s = me->valueString();
00183 ievt_ = -1;
00184 sscanf((s.substr(2,s.length()-2)).c_str(), "%d", &ievt_);
00185 if ( debug_ >0 ) cout << "Found '" << name << "'" << endl;
00186 }
00187 getHistograms();
00188 return;
00189 }
00190
00191 void HcalLEDClient::getHistograms(){
00192 if(!dbe_) return;
00193 char name[256];
00194
00195
00196 MonitorElement* meDepTimeMean[4];
00197 MonitorElement* meDepTimeRMS[4];
00198 MonitorElement* meDepShapeMean[4];
00199 MonitorElement* meDepShapeRMS[4];
00200 MonitorElement* meDepEnergyMean[4];
00201 MonitorElement* meDepEnergyRMS[4];
00202
00203 for(int i=0; i<4; i++){
00204 sprintf(name,"%sHcal/LEDMonitor/LED Mean Time Depth %d",process_.c_str(),i+1);
00205 meDepTimeMean[i] = dbe_->get(name);
00206 sprintf(name,"%sHcal/LEDMonitor/LED RMS Time Depth %d",process_.c_str(),i+1);
00207 meDepTimeRMS[i] = dbe_->get(name);
00208 sprintf(name,"%sHcal/LEDMonitor/LED Mean Shape Depth %d",process_.c_str(),i+1);
00209 meDepShapeMean[i] = dbe_->get(name);
00210 sprintf(name,"%sHcal/LEDMonitor/LED RMS Shape Depth %d",process_.c_str(),i+1);
00211 meDepShapeRMS[i] = dbe_->get(name);
00212 sprintf(name,"%sHcal/LEDMonitor/LED Mean Energy Depth %d",process_.c_str(),i+1);
00213 meDepEnergyMean[i] = dbe_->get(name);
00214 sprintf(name,"%sHcal/LEDMonitor/LED RMS Energy Depth %d",process_.c_str(),i+1);
00215 meDepEnergyRMS[i] = dbe_->get(name);
00216
00217 if(meDepTimeMean[i]) dbe_->softReset(meDepTimeMean[i]);
00218 if(meDepTimeRMS[i]) dbe_->softReset(meDepTimeRMS[i]);
00219 if(meDepEnergyMean[i]) dbe_->softReset(meDepEnergyMean[i]);
00220 if(meDepEnergyRMS[i]) dbe_->softReset(meDepEnergyRMS[i]);
00221 if(meDepShapeMean[i]) dbe_->softReset(meDepShapeMean[i]);
00222 if(meDepShapeRMS[i]) dbe_->softReset(meDepShapeRMS[i]);
00223 }
00224
00225
00226 MonitorElement* meFEDunpacked = NULL;
00227 map<unsigned int,MonitorElement*> meRMSenergyElec;
00228 map<unsigned int,MonitorElement*> meMEANenergyElec;
00229 map<unsigned int,MonitorElement*> meRMStimeElec;
00230 map<unsigned int,MonitorElement*> meMEANtimeElec;
00231 map<unsigned int,MonitorElement*> meRMSshapeElec;
00232 map<unsigned int,MonitorElement*> meMEANshapeElec;
00233
00234 sprintf(name,"%sHcal/FEDs Unpacked",process_.c_str());
00235 meFEDunpacked = dbe_->get(name);
00236 if(meFEDunpacked){
00237 for(int b=1; b<=meFEDunpacked->getNbinsX(); b++){
00238 if(meFEDunpacked->getBinContent(b)!=0){
00239
00240 int fedNum = b-1+700;
00241 sprintf(name,"%sHcal/LEDMonitor/DCC %d Mean Shape Map",process_.c_str(),fedNum);
00242 MonitorElement* me1 = dbe_->get(name);
00243 if(me1!=NULL){
00244 dbe_->softReset(me1);
00245 meMEANshapeElec[fedNum] = me1;
00246 }
00247 sprintf(name,"%sHcal/LEDMonitor/DCC %d RMS Shape Map",process_.c_str(),fedNum);
00248 MonitorElement* me2 = dbe_->get(name);
00249 if(me2!=NULL){
00250 dbe_->softReset(me2);
00251 meRMSshapeElec[fedNum] = me2;
00252 }
00253
00254 sprintf(name,"%sHcal/LEDMonitor/DCC %d Mean Energy Map",process_.c_str(),fedNum);
00255 MonitorElement* me3 = dbe_->get(name);
00256 if(me3!=NULL){
00257 dbe_->softReset(me3);
00258 meMEANenergyElec[fedNum] = me3;
00259 }
00260 sprintf(name,"%sHcal/LEDMonitor/DCC %d RMS Energy Map",process_.c_str(),fedNum);
00261 MonitorElement* me4 = dbe_->get(name);
00262 if(me4!=NULL){
00263 dbe_->softReset(me4);
00264 meRMSenergyElec[fedNum] = me4;
00265 }
00266
00267 sprintf(name,"%sHcal/LEDMonitor/DCC %d Mean Time Map",process_.c_str(),fedNum);
00268 MonitorElement* me5 = dbe_->get(name);
00269 if(me5!=NULL){
00270 dbe_->softReset(me5);
00271 meMEANtimeElec[fedNum] = me5;
00272 }
00273 sprintf(name,"%sHcal/LEDMonitor/DCC %d RMS Time Map",process_.c_str(),fedNum);
00274 MonitorElement* me6 = dbe_->get(name);
00275 if(me6!=NULL){
00276 dbe_->softReset(me6);
00277 meRMStimeElec[fedNum] = me6;
00278 }
00279 }
00280 }
00281 }
00283 for(int i=0; i<4; i++){
00284 if(!subDetsOn_[i]) continue;
00285 string type = "HB";
00286 if(i==1) type = "HE";
00287 else if(i==2) type = "HF";
00288 else if(i==3) type = "HO";
00289
00290 sprintf(name,"LEDMonitor/%s/%s Average Pulse Shape",type.c_str(),type.c_str());
00291 avg_shape_[i] = getHisto(name, process_,dbe_,debug_,cloneME_);
00292 sprintf(name,"LEDMonitor/%s/%s Average Pulse Time",type.c_str(),type.c_str());
00293 avg_time_[i] = getHisto(name, process_,dbe_,debug_,cloneME_);
00294 sprintf(name,"LEDMonitor/%s/%s Average Pulse Energy",type.c_str(),type.c_str());
00295 avg_energy_[i] = getHisto(name, process_,dbe_,debug_,cloneME_);
00296
00297 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Shape RMS Values",process_.c_str(),type.c_str(),type.c_str());
00298 MonitorElement* meShapeRMS = dbe_->get(name);
00299 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Shape Mean Values",process_.c_str(),type.c_str(),type.c_str());
00300 MonitorElement* meShapeMean = dbe_->get(name);
00301 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Time RMS Values",process_.c_str(),type.c_str(),type.c_str());
00302 MonitorElement* meTimeRMS = dbe_->get(name);
00303 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Time Mean Values",process_.c_str(),type.c_str(),type.c_str());
00304 MonitorElement* meTimeMean = dbe_->get(name);
00305
00306 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Energy RMS Values",process_.c_str(),type.c_str(),type.c_str());
00307 MonitorElement* meEnergyRMS = dbe_->get(name);
00308 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Energy Mean Values",process_.c_str(),type.c_str(),type.c_str());
00309 MonitorElement* meEnergyMean = dbe_->get(name);
00310
00311 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Geo Error Map",process_.c_str(),type.c_str(),type.c_str());
00312 MonitorElement* meGeoErr = dbe_->get(name);
00313 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Elec Error Map",process_.c_str(),type.c_str(),type.c_str());
00314 MonitorElement* meElecErr = dbe_->get(name);
00315
00316 if(i==2){
00317 sprintf(name,"LEDMonitor/%s/%s lumi ET-sum per wedge",type.c_str(),type.c_str());
00318 HFlumi_etsum = getHisto(name, process_,dbe_,debug_,cloneME_);
00319
00320 sprintf(name,"LEDMonitor/%s/%s lumi Occupancy above threshold ring1",type.c_str(),type.c_str());
00321 HFlumi_occabthr1 = getHisto(name, process_,dbe_,debug_,cloneME_);
00322 sprintf(name,"LEDMonitor/%s/%s lumi Occupancy between thresholds ring1",type.c_str(),type.c_str());
00323 HFlumi_occbetthr1 = getHisto(name, process_,dbe_,debug_,cloneME_);
00324 sprintf(name,"LEDMonitor/%s/%s lumi Occupancy below threshold ring1",type.c_str(),type.c_str());
00325 HFlumi_occbelthr1 = getHisto(name, process_,dbe_,debug_,cloneME_);
00326
00327 sprintf(name,"LEDMonitor/%s/%s lumi Occupancy above threshold ring2",type.c_str(),type.c_str());
00328 HFlumi_occabthr2 = getHisto(name, process_,dbe_,debug_,cloneME_);
00329 sprintf(name,"LEDMonitor/%s/%s lumi Occupancy between thresholds ring2",type.c_str(),type.c_str());
00330 HFlumi_occbetthr2 = getHisto(name, process_,dbe_,debug_,cloneME_);
00331 sprintf(name,"LEDMonitor/%s/%s lumi Occupancy below threshold ring2",type.c_str(),type.c_str());
00332 HFlumi_occbelthr2 = getHisto(name, process_,dbe_,debug_,cloneME_);
00333 }
00334
00335 if(!meShapeRMS || !meShapeMean) continue;
00336 if(!meTimeRMS || !meTimeMean) continue;
00337 if(!meEnergyRMS || !meEnergyMean) continue;
00338 dbe_->softReset(meShapeRMS); dbe_->softReset(meShapeMean);
00339 dbe_->softReset(meTimeRMS); dbe_->softReset(meTimeMean);
00340 dbe_->softReset(meEnergyRMS); dbe_->softReset(meEnergyMean);
00341 dbe_->softReset(meGeoErr); dbe_->softReset(meElecErr);
00342
00343 for(int ieta=-42; ieta<=42; ieta++){
00344 if(ieta==0) continue;
00345 for(int iphi=1; iphi<=73; iphi++){
00346 for(int depth=1; depth<=4; depth++){
00347 if(!isValidGeom(i, ieta, iphi,depth)) continue;
00348 HcalSubdetector subdet = HcalBarrel;
00349 if(i==1) subdet = HcalEndcap;
00350 else if(i==2) subdet = HcalForward;
00351 else if(i==3) subdet = HcalOuter;
00352 HcalDetId id(subdet,ieta,iphi,depth);
00353 HcalElectronicsId eid = readoutMap_->lookup(id);
00354
00355 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Shape ieta=%d iphi=%d depth=%d",
00356 process_.c_str(), type.c_str(),type.c_str(),ieta,iphi,depth);
00357 MonitorElement* me = dbe_->get(name);
00358 if(me){
00359 meShapeRMS->Fill(me->getRMS());
00360 meShapeMean->Fill(me->getMean());
00361 meDepShapeRMS[depth-1]->Fill(ieta,iphi,me->getRMS());
00362 meDepShapeMean[depth-1]->Fill(ieta,iphi,me->getMean());
00363
00364 if(meRMSshapeElec.find(eid.dccid()+700)!=meRMSshapeElec.end()){
00365 meRMSshapeElec[eid.dccid()+700]->Fill(eid.htrChanId(), eid.spigot(), me->getRMS());
00366 meMEANshapeElec[eid.dccid()+700]->Fill(eid.htrChanId(), eid.spigot(), me->getMean());
00367 }
00368
00369
00370
00371 if(me->getRMS()<rms_thresh_ || me->getMean()>mean_thresh_){
00372 meGeoErr->Fill(ieta,iphi);
00373 meElecErr->Fill(eid.readoutVMECrateId(),eid.htrSlot());
00374 }
00375 }
00376
00377
00378 float timeMeanVal = -1; float enMeanVal = -1;
00379 float timeRMSVal = -1; float enRMSVal = -1;
00380 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Time ieta=%d iphi=%d depth=%d",process_.c_str(),
00381 type.c_str(),type.c_str(),ieta,iphi,depth);
00382 me = dbe_->get(name);
00383 if(me){
00384 timeMeanVal = me->getMean();
00385 timeRMSVal = me->getRMS();
00386 meTimeRMS->Fill(timeRMSVal);
00387 meTimeMean->Fill(timeMeanVal);
00388 meDepTimeRMS[depth-1]->Fill(ieta,iphi,timeRMSVal);
00389 meDepTimeMean[depth-1]->Fill(ieta,iphi,timeMeanVal);
00390 if(meRMStimeElec.find(eid.dccid()+700)!=meRMStimeElec.end()){
00391 meRMStimeElec[eid.dccid()+700]->Fill(eid.htrChanId(), eid.spigot(), timeRMSVal);
00392 meMEANtimeElec[eid.dccid()+700]->Fill(eid.htrChanId(), eid.spigot(), timeMeanVal);
00393 }
00394
00395
00396
00397 }
00398
00399 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Energy ieta=%d iphi=%d depth=%d",process_.c_str(),
00400 type.c_str(),type.c_str(),ieta,iphi,depth);
00401 me = dbe_->get(name);
00402 if(me){
00403 enMeanVal = me->getMean();
00404 enRMSVal = me->getRMS();
00405 meEnergyRMS->Fill(enRMSVal);
00406 meEnergyMean->Fill(enMeanVal);
00407 meDepEnergyRMS[depth-1]->Fill(ieta,iphi,enRMSVal);
00408 meDepEnergyMean[depth-1]->Fill(ieta,iphi,enMeanVal);
00409 if(meRMSenergyElec.find(eid.dccid()+700)!=meRMSenergyElec.end()){
00410 meRMSenergyElec[eid.dccid()+700]->Fill(eid.htrChanId(), eid.spigot(), enRMSVal);
00411 meMEANenergyElec[eid.dccid()+700]->Fill(eid.htrChanId(), eid.spigot(), enMeanVal);
00412 }
00413
00414
00415
00416
00417 if(depth==1 || depth==2)
00418 m_outTextFile<<"HF\t"<<ieta<<"\t"<<iphi<<"\t"<<depth<<"\t"<<enMeanVal<<"\t"<<"\t"<<enRMSVal<<"\t"<<"\t"<<timeMeanVal<<"\t"<<"\t"<<timeRMSVal<<std::endl;
00419
00420 }
00421 }
00422 }
00423 }
00424
00425 rms_shape_[i]=getHisto(meShapeRMS,debug_,cloneME_);
00426 mean_shape_[i]=getHisto(meShapeMean,debug_,cloneME_);
00427 rms_time_[i]=getHisto(meTimeRMS,debug_,cloneME_);
00428 mean_time_[i]=getHisto(meTimeMean,debug_,cloneME_);
00429 rms_energy_[i]=getHisto(meEnergyRMS,debug_,cloneME_);
00430 mean_energy_[i]=getHisto(meEnergyMean,debug_,cloneME_);
00431
00432
00433 err_map_geo_[i]=getHisto2(meGeoErr,debug_,cloneME_);
00434 err_map_elec_[i]=getHisto2(meElecErr,debug_,cloneME_);
00435 }
00436
00437 for(int i=0; i<4; i++){
00438 rms_shapeDep_[i]=getHisto2(meDepShapeRMS[i],debug_,cloneME_);
00439 mean_shapeDep_[i]=getHisto2(meDepShapeMean[i],debug_,cloneME_);
00440 rms_timeDep_[i]=getHisto2(meDepTimeRMS[i],debug_,cloneME_);
00441 mean_timeDep_[i]=getHisto2(meDepTimeMean[i],debug_,cloneME_);
00442 rms_energyDep_[i]=getHisto2(meDepEnergyRMS[i],debug_,cloneME_);
00443 mean_energyDep_[i]=getHisto2(meDepEnergyMean[i],debug_,cloneME_);
00444 }
00445
00446 for(map<unsigned int, MonitorElement*>::iterator meIter = meRMStimeElec.begin();
00447 meIter !=meRMStimeElec.end();
00448 meIter ++){
00449
00450 rms_timeElec_[meIter->first] = getHisto2(meIter->second,debug_,cloneME_);
00451 mean_timeElec_[meIter->first] = getHisto2(meMEANtimeElec[meIter->first],debug_,cloneME_);
00452
00453 rms_energyElec_[meIter->first] = getHisto2(meRMSenergyElec[meIter->first],debug_,cloneME_);
00454 mean_energyElec_[meIter->first] = getHisto2(meMEANenergyElec[meIter->first],debug_,cloneME_);
00455
00456 rms_shapeElec_[meIter->first] = getHisto2(meRMSshapeElec[meIter->first],debug_,cloneME_);
00457 mean_shapeElec_[meIter->first] = getHisto2(meMEANshapeElec[meIter->first],debug_,cloneME_);
00458 }
00459
00460 return;
00461 }
00462
00463 void HcalLEDClient::analyze(void){
00464
00465 jevt_++;
00466 int updates = 0;
00467 if ( (updates % 10) == 0 ) {
00468 if ( debug_ >0 ) cout << "HcalLEDClient: " << updates << " updates" << endl;
00469 }
00470 getHistograms();
00471 return;
00472 }
00473
00474 void HcalLEDClient::createTests(){
00475 if(!dbe_) return;
00476
00477 char meTitle[250], name[250];
00478 vector<string> params;
00479
00480 if(debug_) printf("Creating LED tests...\n");
00481
00482 for(int i=0; i<4; i++){
00483 if(!subDetsOn_[i]) continue;
00484 string type = "HB";
00485 if(i==1) type = "HE";
00486 if(i==2) type = "HF";
00487 if(i==3) type = "HO";
00488
00489 sprintf(meTitle,"%sHcal/LEDMonitor/%s/%s LED Shape RMS Values",process_.c_str(),type.c_str(),type.c_str());
00490 sprintf(name,"%s LED Shape RMS Values: X-Range",type.c_str());
00491 if( dqmQtests_.find(name) == dqmQtests_.end() ){
00492 MonitorElement* me = dbe_->get(meTitle);
00493 if(me){
00494 dqmQtests_[name]=meTitle;
00495 params.clear();
00496 params.push_back(meTitle); params.push_back(name);
00497 params.push_back("0.75"); params.push_back("0.5");
00498 char low[20];
00499 sprintf(low,"%.2f\n",rms_thresh_);
00500 params.push_back(low); params.push_back("2");
00501 createXRangeTest(dbe_, params);
00502 }
00503 }
00504
00505 sprintf(meTitle,"%sHcal/LEDMonitor/%s/%s LED Shape Mean Values",process_.c_str(),type.c_str(),type.c_str());
00506 sprintf(name,"%s LED Shape RMS Values: X-Range",type.c_str());
00507 if( dqmQtests_.find(name) == dqmQtests_.end() ){
00508 MonitorElement* me = dbe_->get(meTitle);
00509 if(me){
00510 dqmQtests_[name]=meTitle;
00511 params.clear();
00512 params.push_back(meTitle); params.push_back(name);
00513 params.push_back("0.75"); params.push_back("0.5");
00514 char high[20];
00515 sprintf(high,"%.2f\n",mean_thresh_);
00516 params.push_back("0"); params.push_back(high);
00517 createXRangeTest(dbe_, params);
00518 }
00519 }
00520 }
00521
00522 return;
00523 }
00524
00525 void HcalLEDClient::resetAllME(){
00526 if(!dbe_) return;
00527 Char_t name[150];
00528
00529 for(int i=1; i<5; i++){
00530 sprintf(name,"%sHcal/LEDMonitor/LED Mean Time Depth %d",process_.c_str(),i);
00531 resetME(name,dbe_);
00532 sprintf(name,"%sHcal/LEDMonitor/LED RMS Time Depth %d",process_.c_str(),i);
00533 resetME(name,dbe_);
00534 sprintf(name,"%sHcal/LEDMonitor/LED Mean Shape Depth %d",process_.c_str(),i);
00535 resetME(name,dbe_);
00536 sprintf(name,"%sHcal/LEDMonitor/LED RMS Shape Depth %d",process_.c_str(),i);
00537 resetME(name,dbe_);
00538 sprintf(name,"%sHcal/LEDMonitor/LED Mean Energy Depth %d",process_.c_str(),i);
00539 resetME(name,dbe_);
00540 sprintf(name,"%sHcal/LEDMonitor/LED RMS Energy Depth %d",process_.c_str(),i);
00541 resetME(name,dbe_);
00542 }
00543
00544
00545 for(int i=0; i<4; i++){
00546 if(!subDetsOn_[i]) continue;
00547 string type = "HB";
00548 if(i==1) type = "HE";
00549 else if(i==2) type = "HF";
00550 else if(i==3) type = "HO";
00551
00552 sprintf(name,"%sHcal/LEDMonitor/%s/%s Ped Subtracted Pulse Shape",process_.c_str(),type.c_str(),type.c_str());
00553 resetME(name,dbe_);
00554 sprintf(name,"%sHcal/LEDMonitor/%s/%s Average Pulse Shape",process_.c_str(),type.c_str(),type.c_str());
00555 resetME(name,dbe_);
00556 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Shape RMS Values",process_.c_str(),type.c_str(),type.c_str());
00557 resetME(name,dbe_);
00558 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Shape Mean Values",process_.c_str(),type.c_str(),type.c_str());
00559 resetME(name,dbe_);
00560 sprintf(name,"%sHcal/LEDMonitor/%s/%s Average Pulse Time",process_.c_str(),type.c_str(),type.c_str());
00561 resetME(name,dbe_);
00562 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Time RMS Values",process_.c_str(),type.c_str(),type.c_str());
00563 resetME(name,dbe_);
00564 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Time Mean Values",process_.c_str(),type.c_str(),type.c_str());
00565 resetME(name,dbe_);
00566 sprintf(name,"%sHcal/LEDMonitor/%s/%s Average Pulse Energy",process_.c_str(),type.c_str(),type.c_str());
00567 resetME(name,dbe_);
00568 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Energy RMS Values",process_.c_str(),type.c_str(),type.c_str());
00569 resetME(name,dbe_);
00570 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Energy Mean Values",process_.c_str(),type.c_str(),type.c_str());
00571 resetME(name,dbe_);
00572 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Geo Error Map",process_.c_str(),type.c_str(),type.c_str());
00573 resetME(name,dbe_);
00574 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Elec Error Map",process_.c_str(),type.c_str(),type.c_str());
00575 resetME(name,dbe_);
00576
00577 for(int ieta=-42; ieta<42; ieta++){
00578 if(ieta==0) continue;
00579 for(int iphi=0; iphi<73; iphi++){
00580 for(int depth=1; depth<4; depth++){
00581 if(!isValidGeom(i, ieta, iphi,depth)) continue;
00582 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Shape ieta=%d iphi=%d depth=%d",
00583 process_.c_str(), type.c_str(),type.c_str(),ieta,iphi,depth);
00584 resetME(name,dbe_);
00585 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Time ieta=%d iphi=%d depth=%d",
00586 process_.c_str(),type.c_str(),type.c_str(),ieta,iphi,depth);
00587 resetME(name,dbe_);
00588 sprintf(name,"%sHcal/LEDMonitor/%s/%s LED Energy ieta=%d iphi=%d depth=%d",
00589 process_.c_str(),type.c_str(),type.c_str(),ieta,iphi,depth);
00590 resetME(name,dbe_);
00591 }
00592 }
00593 }
00594 }
00595 return;
00596 }
00597
00598 void HcalLEDClient::htmlOutput(int runNo, string htmlDir, string htmlName){
00599
00600 if (debug_>0) cout << "Preparing HcalLEDClient html output ..." << endl;
00601 string client = "LEDMonitor";
00602 htmlErrors(runNo,htmlDir,client,process_,dbe_,dqmReportMapErr_,dqmReportMapWarn_,dqmReportMapOther_);
00603
00604 ofstream htmlFile;
00605 htmlFile.open((htmlDir + htmlName).c_str());
00606
00607
00608 htmlFile << "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> " << endl;
00609 htmlFile << "<html> " << endl;
00610 htmlFile << "<head> " << endl;
00611 htmlFile << " <meta content=\"text/html; charset=ISO-8859-1\" " << endl;
00612 htmlFile << " https-equiv=\"content-type\"> " << endl;
00613 htmlFile << " <title>Monitor: Hcal LED Task output</title> " << endl;
00614 htmlFile << "</head> " << endl;
00615 htmlFile << "<style type=\"text/css\"> td { font-weight: bold } </style>" << endl;
00616 htmlFile << "<body> " << endl;
00617 htmlFile << "<br> " << endl;
00618 htmlFile << "<h2>Run: " << endl;
00619 htmlFile << " <span " << endl;
00620 htmlFile << " style=\"color: rgb(0, 0, 153);\">" << runNo << "</span></h2>" << endl;
00621 htmlFile << "<h2>Monitoring task: <span " << endl;
00622 htmlFile << " style=\"color: rgb(0, 0, 153);\">Hcal LEDs</span></h2> " << endl;
00623
00624 htmlFile << "<h2>Events processed: " << endl;
00625 htmlFile << " <span " << endl;
00626 htmlFile << " style=\"color: rgb(0, 0, 153);\">" << ievt_ << "</span></h2>" << endl;
00627
00628 htmlFile << "<hr>" << endl;
00629 htmlFile << "<table width=100% border=1><tr>" << endl;
00630 if(hasErrors())htmlFile << "<td bgcolor=red><a href=\"LEDMonitorErrors.html\">Errors in this task</a></td>" << endl;
00631 else htmlFile << "<td bgcolor=lime>No Errors</td>" << endl;
00632 if(hasWarnings()) htmlFile << "<td bgcolor=yellow><a href=\"LEDMonitorWarnings.html\">Warnings in this task</a></td>" << endl;
00633 else htmlFile << "<td bgcolor=lime>No Warnings</td>" << endl;
00634 if(hasOther()) htmlFile << "<td bgcolor=aqua><a href=\"LEDMonitorMessages.html\">Messages in this task</a></td>" << endl;
00635 else htmlFile << "<td bgcolor=lime>No Messages</td>" << endl;
00636 htmlFile << "</tr></table>" << endl;
00637 htmlFile << "<hr>" << endl;
00638
00639 htmlFile << "<h2><strong>Hcal LED Histograms</strong></h2>" << endl;
00640 htmlFile << "<h3>" << endl;
00641 htmlFile << "<a href=\"#GEO_Plots\">Geometry Plots </a></br>" << endl;
00642 htmlFile << "<a href=\"#ELEC_Plots\">Electronics Plots </a></br>" << endl;
00643 if(subDetsOn_[0]) htmlFile << "<a href=\"#HB_Plots\">HB Plots </a></br>" << endl;
00644 if(subDetsOn_[1]) htmlFile << "<a href=\"#HE_Plots\">HE Plots </a></br>" << endl;
00645 if(subDetsOn_[2]) htmlFile << "<a href=\"#HF_Plots\">HF Plots </a></br>" << endl;
00646 if(subDetsOn_[3]) htmlFile << "<a href=\"#HO_Plots\">HO Plots </a></br>" << endl;
00647 htmlFile << "</h3>" << endl;
00648 htmlFile << "<hr>" << endl;
00649
00650 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00651 htmlFile << "cellpadding=\"10\"> " << endl;
00652
00653 htmlFile << "<td> <h3>Global Histograms</h3></td></tr>" << endl;
00654
00655 htmlFile << "<tr align=\"left\">" << endl;
00656 htmlFile << "<td> <a name=\"GEO_Plots\"><h3>Geometry Histograms</h3></td></tr>" << endl;
00657 histoHTML2(runNo,mean_timeDep_[0],"iEta","iPhi", 92, htmlFile,htmlDir);
00658 histoHTML2(runNo,rms_timeDep_[0],"iEta","iPhi", 100, htmlFile,htmlDir);
00659 htmlFile << "</tr>" << endl;
00660 htmlFile << "<tr align=\"left\">" << endl;
00661 histoHTML2(runNo,mean_timeDep_[1],"iEta","iPhi", 92, htmlFile,htmlDir);
00662 histoHTML2(runNo,rms_timeDep_[1],"iEta","iPhi", 100, htmlFile,htmlDir);
00663 htmlFile << "</tr>" << endl;
00664 htmlFile << "<tr align=\"left\">" << endl;
00665 histoHTML2(runNo,mean_timeDep_[2],"iEta","iPhi", 92, htmlFile,htmlDir);
00666 histoHTML2(runNo,rms_timeDep_[2],"iEta","iPhi", 100, htmlFile,htmlDir);
00667 htmlFile << "</tr>" << endl;
00668 htmlFile << "<tr align=\"left\">" << endl;
00669 histoHTML2(runNo,mean_timeDep_[3],"iEta","iPhi", 92, htmlFile,htmlDir);
00670 histoHTML2(runNo,rms_timeDep_[3],"iEta","iPhi", 100, htmlFile,htmlDir);
00671 htmlFile << "</tr>" << endl;
00672
00673 htmlFile << "<tr align=\"left\">" << endl;
00674 histoHTML2(runNo,mean_energyDep_[0],"iEta","iPhi", 92, htmlFile,htmlDir);
00675 histoHTML2(runNo,rms_energyDep_[0],"iEta","iPhi", 100, htmlFile,htmlDir);
00676 htmlFile << "</tr>" << endl;
00677 htmlFile << "<tr align=\"left\">" << endl;
00678 histoHTML2(runNo,mean_energyDep_[1],"iEta","iPhi", 92, htmlFile,htmlDir);
00679 histoHTML2(runNo,rms_energyDep_[1],"iEta","iPhi", 100, htmlFile,htmlDir);
00680 htmlFile << "</tr>" << endl;
00681 htmlFile << "<tr align=\"left\">" << endl;
00682 histoHTML2(runNo,mean_energyDep_[2],"iEta","iPhi", 92, htmlFile,htmlDir);
00683 histoHTML2(runNo,rms_energyDep_[2],"iEta","iPhi", 100, htmlFile,htmlDir);
00684 htmlFile << "</tr>" << endl;
00685 htmlFile << "<tr align=\"left\">" << endl;
00686 histoHTML2(runNo,mean_energyDep_[3],"iEta","iPhi", 92, htmlFile,htmlDir);
00687 histoHTML2(runNo,rms_energyDep_[3],"iEta","iPhi", 100, htmlFile,htmlDir);
00688 htmlFile << "</tr>" << endl;
00689
00690 htmlFile << "<tr align=\"left\">" << endl;
00691 histoHTML2(runNo,mean_shapeDep_[0],"iEta","iPhi", 92, htmlFile,htmlDir);
00692 histoHTML2(runNo,rms_shapeDep_[0],"iEta","iPhi", 100, htmlFile,htmlDir);
00693 htmlFile << "</tr>" << endl;
00694 htmlFile << "<tr align=\"left\">" << endl;
00695 histoHTML2(runNo,mean_shapeDep_[1],"iEta","iPhi", 92, htmlFile,htmlDir);
00696 histoHTML2(runNo,rms_shapeDep_[1],"iEta","iPhi", 100, htmlFile,htmlDir);
00697 htmlFile << "</tr>" << endl;
00698 htmlFile << "<tr align=\"left\">" << endl;
00699 histoHTML2(runNo,mean_shapeDep_[2],"iEta","iPhi", 92, htmlFile,htmlDir);
00700 histoHTML2(runNo,rms_shapeDep_[2],"iEta","iPhi", 100, htmlFile,htmlDir);
00701 htmlFile << "</tr>" << endl;
00702 htmlFile << "<tr align=\"left\">" << endl;
00703 histoHTML2(runNo,mean_shapeDep_[3],"iEta","iPhi", 92, htmlFile,htmlDir);
00704 histoHTML2(runNo,rms_shapeDep_[3],"iEta","iPhi", 100, htmlFile,htmlDir);
00705 htmlFile << "</tr>" << endl;
00706
00707 htmlFile << "<td> <a name=\"ELEC_Plots\"><h3>Electronics Histograms</h3></td></tr>" << endl;
00708 for(map<unsigned int, TH2F*>::iterator hIter = rms_energyElec_.begin();
00709 hIter!=rms_energyElec_.end();
00710 hIter++){
00711 htmlFile << "<tr align=\"left\">" << endl;
00712 histoHTML2(runNo,rms_timeElec_[hIter->first],"HTR Channel","Spigot", 92, htmlFile,htmlDir);
00713 histoHTML2(runNo,mean_timeElec_[hIter->first],"HTR Channel","Spigot", 100, htmlFile,htmlDir);
00714 htmlFile << "</tr>" << endl;
00715
00716 htmlFile << "<tr align=\"left\">" << endl;
00717 histoHTML2(runNo,rms_energyElec_[hIter->first],"HTR Channel","Spigot", 92, htmlFile,htmlDir);
00718 histoHTML2(runNo,mean_energyElec_[hIter->first],"HTR Channel","Spigot", 100, htmlFile,htmlDir);
00719 htmlFile << "</tr>" << endl;
00720
00721 htmlFile << "<tr align=\"left\">" << endl;
00722 histoHTML2(runNo,rms_shapeElec_[hIter->first],"HTR Channel","Spigot", 92, htmlFile,htmlDir);
00723 histoHTML2(runNo,mean_shapeElec_[hIter->first],"HTR Channel","Spigot", 100, htmlFile,htmlDir);
00724 htmlFile << "</tr>" << endl;
00725
00726 }
00727 htmlFile << "</tr>" << endl;
00728
00729 for(int i=0; i<4; i++){
00730 if(!subDetsOn_[i]) continue;
00731 string type = "HB";
00732 if(i==1) type = "HE";
00733 else if(i==2) type = "HF";
00734 else if(i==3) type = "HO";
00735
00736 htmlFile << "<tr align=\"left\">" << endl;
00737 htmlFile << "<td> <a name=\""<<type<<"_Plots\"><h3>" << type << " Histograms</h3></td></tr>" << endl;
00738
00739 htmlFile << "<tr align=\"left\">" << endl;
00740 histoHTML2(runNo,err_map_geo_[i],"iEta","iPhi", 92, htmlFile,htmlDir);
00741 histoHTML2(runNo,err_map_elec_[i],"VME Crate ID","HTR Slot", 100, htmlFile,htmlDir);
00742 htmlFile << "</tr>" << endl;
00743
00744 htmlFile << "<tr align=\"left\">" << endl;
00745 histoHTML(runNo,avg_shape_[i],"Average Pulse Shape","Events", 92, htmlFile,htmlDir);
00746 histoHTML(runNo,avg_time_[i],"Average Pulse Time","Events", 100, htmlFile,htmlDir);
00747 htmlFile << "</tr>" << endl;
00748
00749 htmlFile << "<tr align=\"left\">" << endl;
00750 histoHTML(runNo,avg_energy_[i],"Average ADC Sum","Events", 92, htmlFile,htmlDir);
00751 htmlFile << "</tr>" << endl;
00752
00753 htmlFile << "<tr align=\"left\">" << endl;
00754 histoHTML(runNo,rms_shape_[i],"Shape RMS Value","Events", 92, htmlFile,htmlDir);
00755 histoHTML(runNo,mean_shape_[i],"Shape Mean Value","Events", 100, htmlFile,htmlDir);
00756 htmlFile << "</tr>" << endl;
00757
00758 htmlFile << "<tr align=\"left\">" << endl;
00759 histoHTML(runNo,rms_time_[i],"Time RMS Value","Events", 92, htmlFile,htmlDir);
00760 histoHTML(runNo,mean_time_[i],"Time Mean Value","Events", 100, htmlFile,htmlDir);
00761 htmlFile << "</tr>" << endl;
00762
00763 htmlFile << "<tr align=\"left\">" << endl;
00764 histoHTML(runNo,rms_energy_[i],"ADC Sum RMS Value","Events", 92, htmlFile,htmlDir);
00765 histoHTML(runNo,mean_energy_[i],"ADC Sum Mean Value","Events", 100, htmlFile,htmlDir);
00766 htmlFile << "</tr>" << endl;
00767
00768 if(i==2){
00769 htmlFile << "<tr align=\"left\">" << endl;
00770 histoHTML(runNo,HFlumi_etsum,"Wedge number","ET Sum times events", 92, htmlFile,htmlDir);
00771 htmlFile << "</tr>" << endl;
00772
00773 htmlFile << "<tr align=\"left\">" << endl;
00774 histoHTML(runNo,HFlumi_occabthr1,"Wedge number","Occupancy times events", 100, htmlFile,htmlDir);
00775 histoHTML(runNo,HFlumi_occabthr2,"Wedge number","Occupancy times events", 100, htmlFile,htmlDir);
00776 htmlFile << "</tr>" << endl;
00777
00778 htmlFile << "<tr align=\"left\">" << endl;
00779 histoHTML(runNo,HFlumi_occbetthr1,"Wedge number","Occupancy times events", 100, htmlFile,htmlDir);
00780 histoHTML(runNo,HFlumi_occbetthr2,"Wedge number","Occupancy times events", 100, htmlFile,htmlDir);
00781 htmlFile << "</tr>" << endl;
00782
00783 htmlFile << "<tr align=\"left\">" << endl;
00784 histoHTML(runNo,HFlumi_occbelthr1,"Wedge number","Occupancy times events", 100, htmlFile,htmlDir);
00785 histoHTML(runNo,HFlumi_occbelthr2,"Wedge number","Occupancy times events", 100, htmlFile,htmlDir);
00786 htmlFile << "</tr>" << endl;
00787 }
00788
00789 }
00790
00791 htmlFile << "</table>" << endl;
00792 htmlFile << "<br>" << endl;
00793
00794
00795 htmlFile << "</body> " << endl;
00796 htmlFile << "</html> " << endl;
00797
00798 htmlFile.close();
00799
00800 return;
00801 }
00802
00803
00804 void HcalLEDClient::loadHistograms(TFile* infile){
00805
00806 TNamed* tnd = (TNamed*)infile->Get("DQMData/Hcal/LEDMonitor/LED Task Event Number");
00807 if(tnd){
00808 string s =tnd->GetTitle();
00809 ievt_ = -1;
00810 sscanf((s.substr(2,s.length()-2)).c_str(), "%d", &ievt_);
00811 }
00812 char name[256];
00813 for(int i=0; i<4; i++){
00814 sprintf(name,"%sHcal/LEDMonitor/LED Mean Time Depth %d",process_.c_str(),i+1);
00815 mean_timeDep_[i]=(TH2F*)infile->Get(name);
00816 sprintf(name,"%sHcal/LEDMonitor/LED RMS Time Depth %d",process_.c_str(),i+1);
00817 rms_timeDep_[i]=(TH2F*)infile->Get(name);
00818 sprintf(name,"%sHcal/LEDMonitor/LED Mean Shape Depth %d",process_.c_str(),i+1);
00819 mean_shapeDep_[i]=(TH2F*)infile->Get(name);
00820 sprintf(name,"%sHcal/LEDMonitor/LED RMS Shape Depth %d",process_.c_str(),i+1);
00821 rms_shapeDep_[i]=(TH2F*)infile->Get(name);
00822 sprintf(name,"%sHcal/LEDMonitor/LED Mean Energy Depth %d",process_.c_str(),i+1);
00823 mean_energyDep_[i]=(TH2F*)infile->Get(name);
00824 sprintf(name,"%sHcal/LEDMonitor/LED RMS Energy Depth %d",process_.c_str(),i+1);
00825 rms_energyDep_[i]=(TH2F*)infile->Get(name);
00826 }
00827
00828
00829 for(int i=0; i<4; i++){
00830 if(!subDetsOn_[i]) continue;
00831 string type = "HB";
00832 if(i==1) type = "HE";
00833 else if(i==2) type = "HF";
00834 else if(i==3) type = "HO";
00835
00836
00837 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s Average Pulse Shape",type.c_str(),type.c_str());
00838 avg_shape_[i] = (TH1F*)infile->Get(name);
00839 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s Average Pulse Time",type.c_str(),type.c_str());
00840 avg_time_[i] = (TH1F*)infile->Get(name);
00841 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s Average Pulse Energy",type.c_str(),type.c_str());
00842 avg_energy_[i] = (TH1F*)infile->Get(name);
00843
00844 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Shape RMS Values",type.c_str(),type.c_str());
00845 rms_shape_[i]=(TH1F*)infile->Get(name);
00846 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Shape Mean Values",type.c_str(),type.c_str());
00847 mean_shape_[i]=(TH1F*)infile->Get(name);
00848
00849 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Time RMS Values",type.c_str(),type.c_str());
00850 rms_time_[i]=(TH1F*)infile->Get(name);
00851 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Time Mean Values",type.c_str(),type.c_str());
00852 mean_time_[i]=(TH1F*)infile->Get(name);
00853
00854 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Energy RMS Values",type.c_str(),type.c_str());
00855 rms_energy_[i]=(TH1F*)infile->Get(name);
00856 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Energy Mean Values",type.c_str(),type.c_str());
00857 mean_energy_[i]=(TH1F*)infile->Get(name);
00858
00859
00860 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Geo Error Map",type.c_str(),type.c_str());
00861 err_map_geo_[i]=(TH2F*)infile->Get(name);
00862 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Elec Error Map",type.c_str(),type.c_str());
00863 err_map_elec_[i]=(TH2F*)infile->Get(name);
00864
00865 if(i==2){
00866 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s lumi ET-sum per wedge",type.c_str(),type.c_str());
00867 HFlumi_etsum = (TH1F*)infile->Get(name);
00868
00869 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s lumi Occupancy above threshold ring1",type.c_str(),type.c_str());
00870 HFlumi_occabthr1 = (TH1F*)infile->Get(name);
00871 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s lumi Occupancy between thresholds ring1",type.c_str(),type.c_str());
00872 HFlumi_occbetthr1 = (TH1F*)infile->Get(name);
00873 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s lumi Occupancy below threshold ring1",type.c_str(),type.c_str());
00874 HFlumi_occbelthr1 = (TH1F*)infile->Get(name);
00875
00876
00877 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s lumi Occupancy above threshold ring2",type.c_str(),type.c_str());
00878 HFlumi_occabthr2 = (TH1F*)infile->Get(name);
00879 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s lumi Occupancy between thresholds ring2",type.c_str(),type.c_str());
00880 HFlumi_occbetthr2 = (TH1F*)infile->Get(name);
00881 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s lumi Occupancy below threshold ring2",type.c_str(),type.c_str());
00882 HFlumi_occbelthr2 = (TH1F*)infile->Get(name);
00883 }
00884
00885 for(int ieta=-42; ieta<=42; ieta++){
00886 if(ieta==0) continue;
00887 for(int iphi=1; iphi<=73; iphi++){
00888 for(int depth=1; depth<=4; depth++){
00889 if(!isValidGeom(i, ieta, iphi,depth)) continue;
00890 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Shape ieta=%d iphi=%d depth=%d",
00891 type.c_str(),type.c_str(),ieta,iphi,depth);
00892 TH1F* h = (TH1F*)infile->Get(name);
00893 if(h){
00894 rms_shape_[i]->Fill(h->GetRMS());
00895 mean_shape_[i]->Fill(h->GetMean());
00896 }
00897
00898 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Time ieta=%d iphi=%d depth=%d",
00899 type.c_str(),type.c_str(),ieta,iphi,depth);
00900 h = (TH1F*)infile->Get(name);
00901 if(h){
00902 rms_time_[i]->Fill(h->GetRMS());
00903 mean_time_[i]->Fill(h->GetMean());
00904 }
00905
00906 sprintf(name,"DQMData/Hcal/LEDMonitor/%s/%s LED Energy ieta=%d iphi=%d depth=%d",
00907 type.c_str(),type.c_str(),ieta,iphi,depth);
00908 h = (TH1F*)infile->Get(name);
00909 if(h){
00910 rms_energy_[i]->Fill(h->GetRMS());
00911 mean_energy_[i]->Fill(h->GetMean());
00912 }
00913 }
00914 }
00915 }
00916
00917
00918 }
00919
00920 return;
00921 }
00922