File indexing completed on 2023-03-17 11:28:28
0001 #include <sstream>
0002 #include <TObjArray.h>
0003 #include <string>
0004
0005 using namespace std;
0006
0007 TH1F * DivideHistos
0008 ( TFile * f,
0009 TH1 * h_proto,
0010 const TString & num_name,
0011 const TString & denom_name )
0012 {
0013 TH1F * h_num = (TH1F *)f->Get(num_name) ;
0014 TH1F * h_denom = (TH1F *)f->Get(denom_name) ;
0015
0016
0017
0018
0019 TH1F * h_res = (TH1F*)h_proto->Clone();
0020 h_res->Divide(h_num,h_denom,1,1,"b") ;
0021
0022
0023
0024
0025 return h_res ;
0026 }
0027
0028
0029 void Join
0030 ( TObjArray * tokens, TString & common )
0031 {
0032 tokens->Compress() ;
0033 if (tokens->GetEntries()==0)
0034 { common = "" ; return ; }
0035 else
0036 { common = ((TObjString *)(tokens->At(0)))->GetString() ; }
0037 if (tokens->GetEntries()==1)
0038 { return ; }
0039 TObjString * token_obj ;
0040 Int_t token, max_token = tokens->GetEntries() ;
0041 for ( token=1 ; token<max_token ; ++token )
0042 {
0043 common += "_" ;
0044 token_obj = (TObjString *)(tokens->At(token)) ;
0045 common += token_obj->GetString() ;
0046 }
0047 }
0048
0049 void CompareHistoNames
0050 ( const TString & h1_name,
0051 const TString & h2_name,
0052 TString & common,
0053 TString & h1_specific,
0054 TString & h2_specific )
0055 {
0056 TObjArray * h1_tokens = h1_name.Tokenize("_") ;
0057 TObjArray * h2_tokens = h2_name.Tokenize("_") ;
0058 TObjArray * common_tokens = new TObjArray ;
0059 Int_t h1_nb_tokens = h1_tokens->GetEntries() ;
0060 Int_t h2_nb_tokens = h2_tokens->GetEntries() ;
0061 Int_t token, max_token = (h1_nb_tokens<h2_nb_tokens?h1_nb_tokens:h2_nb_tokens) ;
0062 for ( token=0 ; token<max_token ; ++token )
0063 {
0064 if (h1_tokens->At(token)->IsEqual(h2_tokens->At(token))==kFALSE) break ;
0065 common_tokens->Add(h1_tokens->At(token)) ;
0066 h1_tokens->RemoveAt(token) ;
0067 h2_tokens->RemoveAt(token) ;
0068 }
0069 Join(common_tokens,common) ;
0070 Join(h1_tokens,h1_specific) ;
0071 Join(h2_tokens,h2_specific) ;
0072 }
0073
0074 void RenderHisto( TObject * obj, TCanvas * canvas )
0075 {
0076 assert(obj->InheritsFrom("TH1")) ;
0077 TH1 * histo = dynamic_cast<TH1*>(obj) ;
0078 assert(histo) ;
0079
0080 TString histo_option = ((TH1 *)obj)->GetOption() ;
0081 if ((histo_option.Contains("ELE_LOGY")==kTRUE)&&(histo->GetMaximum()>0))
0082 { canvas->SetLogy(1) ; }
0083
0084 int histo_name_flag = 1 ;
0085 if ( obj->InheritsFrom("TH2") )
0086 {
0087 gStyle->SetPalette(1) ;
0088 gStyle->SetOptStat(110+histo_name_flag) ;
0089 }
0090 else if ( obj->InheritsFrom("TProfile") )
0091 { gStyle->SetOptStat(110+histo_name_flag) ; }
0092 else
0093 { gStyle->SetOptStat(111110+histo_name_flag) ; }
0094 }
0095
0096
0097 int electronCompare()
0098 {
0099 TString CMP_DIR = gSystem->Getenv( "CMP_DIR" ) ;
0100 TString CMP_URL = gSystem->Getenv( "CMP_URL" ) ;
0101 TString CMP_TITLE = gSystem->Getenv( "CMP_TITLE" ) ;
0102 TString CMP_RED_FILE = gSystem->Getenv( "CMP_RED_FILE" ) ;
0103 TString CMP_BLUE_FILE = gSystem->Getenv( "CMP_BLUE_FILE" ) ;
0104 TString CMP_RED_NAME = gSystem->Getenv( "CMP_RED_NAME" ) ;
0105 TString CMP_BLUE_NAME = gSystem->Getenv( "CMP_BLUE_NAME" ) ;
0106 TString CMP_RED_COMMENT = gSystem->Getenv( "CMP_RED_COMMENT" ) ;
0107 TString CMP_BLUE_COMMENT = gSystem->Getenv( "CMP_BLUE_COMMENT" ) ;
0108 TString CMP_CONFIG = gSystem->Getenv( "CMP_CONFIG" ) ;
0109 TString CMP_RED_RELEASE = gSystem->Getenv( "CMP_RED_RELEASE" ) ;
0110 TString CMP_BLUE_RELEASE = gSystem->Getenv( "CMP_BLUE_RELEASE" ) ;
0111
0112
0113
0114
0115
0116 std::cout << "red_release : C : " << CMP_RED_RELEASE << std::endl;
0117 std::cout << "blue_release : C : " << CMP_BLUE_RELEASE << std::endl;
0118 std::cout << "CMP_RED_NAME : " << CMP_RED_NAME << std::endl;
0119 std::cout << "CMP_BLUE_NAME : " << CMP_BLUE_NAME << std::endl;
0120
0121
0122
0123 TStyle *eleStyle = new TStyle("eleStyle","Style for electron validation");
0124 eleStyle->SetCanvasBorderMode(0);
0125 eleStyle->SetCanvasColor(kWhite);
0126 eleStyle->SetCanvasDefH(600);
0127 eleStyle->SetCanvasDefW(800);
0128 eleStyle->SetCanvasDefX(0);
0129 eleStyle->SetCanvasDefY(0);
0130 eleStyle->SetPadBorderMode(0);
0131 eleStyle->SetPadColor(kWhite);
0132 eleStyle->SetPadGridX(false);
0133 eleStyle->SetPadGridY(false);
0134 eleStyle->SetGridColor(0);
0135 eleStyle->SetGridStyle(3);
0136 eleStyle->SetGridWidth(1);
0137 eleStyle->SetOptStat(1);
0138 eleStyle->SetPadTickX(1);
0139 eleStyle->SetPadTickY(1);
0140 eleStyle->SetHistLineColor(1);
0141 eleStyle->SetHistLineStyle(0);
0142 eleStyle->SetHistLineWidth(2);
0143 eleStyle->SetEndErrorSize(2);
0144 eleStyle->SetErrorX(0.);
0145 eleStyle->SetOptStat(1);
0146 eleStyle->SetTitleColor(1, "XYZ");
0147 eleStyle->SetTitleFont(42, "XYZ");
0148 eleStyle->SetTitleXOffset(1.0);
0149 eleStyle->SetTitleYOffset(1.0);
0150 eleStyle->SetLabelOffset(0.005, "XYZ");
0151 eleStyle->SetTitleSize(0.05, "XYZ");
0152 eleStyle->SetTitleFont(22,"X");
0153 eleStyle->SetTitleFont(22,"Y");
0154 eleStyle->SetHistLineWidth(2);
0155 eleStyle->SetPadBottomMargin(0.13);
0156 eleStyle->SetPadLeftMargin(0.15);
0157 eleStyle->SetMarkerStyle(21);
0158 eleStyle->SetMarkerSize(0.8);
0159
0160 eleStyle->SetPadRightMargin(0.2) ;
0161
0162 eleStyle->cd();
0163
0164 gROOT->ForceStyle();
0165
0166 TString internal_path("DQMData/Run 1/EgammaV/Run summary/") ;
0167 TString old_internal_path("DQMData/EgammaV/") ;
0168
0169
0170 TString file_ref_dir ;
0171 TFile * file_ref = 0 ;
0172 if ( CMP_BLUE_FILE != "" )
0173 {
0174 file_ref = TFile::Open(CMP_BLUE_FILE) ;
0175 if (file_ref!=0)
0176 {
0177 std::cout<<"open ref : "<<CMP_BLUE_FILE<<std::endl ;
0178 if (file_ref->cd(internal_path)==kTRUE)
0179 {
0180 std::cerr<<"cd "<<internal_path<<std::endl ;
0181 file_ref_dir = internal_path ;
0182 file_ref->cd() ;
0183 }
0184 else if (file_ref->cd(old_internal_path)==kTRUE)
0185 {
0186 std::cerr<<"cd "<<old_internal_path<<std::endl ;
0187 file_ref_dir = old_internal_path ;
0188 file_ref->cd() ;
0189 }
0190 else
0191 {
0192 std::cerr<<"Failed move to: "<<internal_path<<" and "<<old_internal_path<<std::endl ;
0193 file_ref_dir = "" ;
0194 }
0195 }
0196 else
0197 { std::cerr<<"Failed to open: "<<CMP_BLUE_FILE<<std::endl ; }
0198 }
0199
0200 TString file_new_dir = internal_path ;
0201 TFile * file_new = 0 ;
0202 if ( CMP_RED_FILE != "" )
0203 {
0204 file_new = TFile::Open(CMP_RED_FILE) ;
0205 if (file_new!=0)
0206 {
0207 std::cout<<"open new : "<<CMP_RED_FILE<<std::endl ;
0208 if (file_new->cd(internal_path)==kTRUE)
0209 {
0210 std::cerr<<"cd "<<internal_path<<std::endl ;
0211 file_new_dir = internal_path ;
0212 file_new->cd() ;
0213 }
0214 else if (file_new->cd(old_internal_path)==kTRUE)
0215 {
0216 std::cerr<<"cd "<<old_internal_path<<std::endl ;
0217 file_new_dir = old_internal_path ;
0218 file_new->cd() ;
0219 }
0220 else
0221 {
0222 std::cerr<<"Failed move to: "<<internal_path<<" and "<<old_internal_path<<std::endl ;
0223 file_new_dir = "" ;
0224 }
0225 }
0226 else
0227 { std::cerr<<"Failed to open: "<<CMP_RED_FILE<<std::endl ; }
0228 }
0229
0230 TCanvas * canvas ;
0231 TH1 * histo_ref, * histo_new ;
0232 TPaveStats * st_ref, * st_new ;
0233
0234 std::ofstream web_page(CMP_DIR+"/index.html") ;
0235
0236 web_page
0237 <<"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n"
0238 <<"<html>\n"
0239 <<"<head>\n"
0240 <<"<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" />\n"
0241 <<"<title>"<<CMP_TITLE<<"</title>\n"
0242 <<"</head>\n"
0243 <<"<h1><a href=\"../\"><img border=0 width=\"22\" height=\"22\" src=\"../../../../img/up.gif\" alt=\"Up\"/></a> "<<CMP_TITLE<<"</h1>\n" ;
0244
0245 if (file_ref==0)
0246 {
0247 web_page
0248 <<"<p>In all plots below"
0249 <<", there was no reference histograms to compare with"
0250 <<", and the "<<CMP_RED_NAME<<" histograms are in red." ;
0251 }
0252 else
0253 {
0254
0255
0256
0257
0258 web_page
0259 <<"<p>In all plots below"
0260 <<", the <b><font color='red'>"<<CMP_RED_RELEASE<<"</font></b> histograms are in red"
0261 <<", and the <b><font color='blue'>"<<CMP_BLUE_RELEASE<<"</font></b> histograms are in blue." ;
0262
0263
0264
0265 }
0266
0267 std::ifstream red_comment_file(CMP_RED_COMMENT) ;
0268 std::string red_comment ;
0269 std::getline(red_comment_file,red_comment) ;
0270 red_comment_file.close() ;
0271
0272 std::ifstream blue_comment_file(CMP_BLUE_COMMENT) ;
0273 std::string blue_comment ;
0274 std::getline(blue_comment_file,blue_comment) ;
0275 blue_comment_file.close() ;
0276
0277 web_page<<" "<<red_comment<<" "<<blue_comment
0278 <<" Some more details"
0279 <<": <a href=\"electronCompare.C\">script</a> used to make the plots"
0280 <<", <a href=\""<<CMP_CONFIG<<"\">specification</a> of histograms"
0281 <<", <a href=\"gifs/\">images</a> of histograms"
0282 <<"." ;
0283 web_page<<"</p>\n" ;
0284
0285
0286 TString canvas_name, histo_name, histo_name_recomp, histo_full_path, gif_name, gif_path ;
0287 TString Pt1000_path_extension ; Pt1000_path_extension = "ElectronMcSignalValidator/" ;
0288 TString histo_full_path_Pt1000 ;
0289 TString short_histo_name ;
0290 TString first_short_histo_name, first_histo_name ;
0291 TString dl_short_histo_name, dl_histo_name ;
0292 TString num_ref, denom_ref, num_full, denom_full ;
0293 Int_t n_ele_charge ;
0294 int scaled, err ;
0295 int divide;
0296 std::string cat, line, histo_path, num, denom ;
0297 int eol ;
0298 int eoc ;
0299 double rescale_factor = 0. ;
0300
0301 std::ifstream histo_file1(CMP_CONFIG) ;
0302
0303 web_page
0304 <<"<br><table border=\"1\" cellpadding=\"5\" width=\"100%\">"
0305 <<"<tr valign=\"top\"><td width=\"20%\">\n" ;
0306 int cat_num = 0 ;
0307
0308 cat = "" ;
0309 do
0310 {
0311 std::getline(histo_file1,cat) ;
0312 } while (cat.find_first_not_of(" \t")==std::string::npos) ;
0313
0314 web_page<<"<b>"<<cat<<"</b><br><br>" ;
0315
0316 while (std::getline(histo_file1,line))
0317 {
0318 if (line.empty()) continue ;
0319 std::size_t first = line.find_first_not_of(" \t") ;
0320 if (first==std::string::npos) continue ;
0321 if (line[first]=='#') continue ;
0322
0323 std::istringstream linestream(line) ;
0324 divide = 0 ; num = denom = "" ;
0325 linestream >> histo_path >> scaled >> err >> eol >> eoc >> divide >> num >> denom ;
0326
0327 histo_name = histo_path ;
0328 Ssiz_t pos = histo_name.Last('/') ;
0329 if (pos!=kNPOS) histo_name.Remove(0,pos+1) ;
0330 short_histo_name = histo_name ;
0331 short_histo_name.Remove(0,2) ;
0332 if (short_histo_name.BeginsWith("ele_"))
0333 { short_histo_name.Remove(0,4) ; }
0334
0335 if (first_histo_name.IsNull())
0336 {
0337 first_short_histo_name = short_histo_name ;
0338 first_histo_name = histo_name ;
0339 dl_short_histo_name = short_histo_name ;
0340 dl_histo_name = histo_name ;
0341 }
0342 else
0343 {
0344 TString common ;
0345 TString first_specific ;
0346 TString second_specific ;
0347 CompareHistoNames(first_short_histo_name,short_histo_name,common,first_specific,second_specific) ;
0348 if (!dl_histo_name.IsNull())
0349 {
0350 if (first_specific.IsNull())
0351 { web_page<<"<a href=\"#"<<first_histo_name<<"\">"<<first_short_histo_name<<"</a>" ; }
0352 else
0353 { web_page<<common<<" | <a href=\"#"<<first_histo_name<<"\">"<<first_specific<<"</a>" ; }
0354 dl_short_histo_name = dl_histo_name = "" ;
0355 }
0356 web_page<<" | <a href=\"#"<<histo_name<<"\">"<<second_specific<<"</a>" ;
0357 }
0358
0359 if ((eol)||(eoc))
0360 {
0361 if (!dl_histo_name.IsNull())
0362 { web_page<<"<a href=\"#"<<dl_histo_name<<"\">"<<dl_short_histo_name<<"</a>" ; }
0363 web_page<<"<br>\n" ;
0364 first_histo_name = first_short_histo_name = "" ;
0365 }
0366
0367 if (eoc)
0368 {
0369 cat_num++ ;
0370 if ((cat_num%5)==0)
0371 { web_page<<"<br></td></tr>\n<tr valign=\"top\"><td width=\"20%\">" ; }
0372 else
0373 { web_page<<"<br></td><td width=\"20%\">\n" ; }
0374 cat = "" ;
0375 do
0376 {
0377 std::getline(histo_file1,cat) ;
0378 } while (cat.find_first_not_of(" \t")==std::string::npos) ;
0379 web_page<<"<b>"<<cat<<"</b><br><br>" ;
0380 }
0381 }
0382 web_page<<"<br></td></tr></table>\n" ;
0383 histo_file1.close() ;
0384
0385 web_page<<"<br><br><table cellpadding=\"5\"><tr valign=\"top\"><td><a href=\""<<CMP_URL<<"/\"><img width=\"18\" height=\"18\" border=\"0\" align=\"middle\" src=\"../../../../img/up.gif\" alt=\"Top\"/></a></td><td>\n" ;
0386 std::ifstream histo_file2(CMP_CONFIG) ;
0387
0388 n_ele_charge = 0 ;
0389 cat = "" ;
0390 do
0391 {
0392 std::getline(histo_file2,cat) ;
0393 } while (cat.empty()) ;
0394
0395 while (std::getline(histo_file2,line))
0396 {
0397 if (line.empty()) continue ;
0398 std::size_t first = line.find_first_not_of(" \t") ;
0399 if (first==std::string::npos) continue ;
0400 if (line[first]=='#') continue ;
0401
0402
0403
0404 std::basic_istringstream<char> linestream(line) ;
0405 divide = 0 ; num = denom = "" ;
0406 linestream >> histo_path >> scaled >> err >> eol >> eoc >> divide >> num >> denom ;
0407
0408 histo_name = histo_path.c_str() ;
0409 histo_name_recomp = histo_name ;
0410 histo_ref = 0 ;
0411 histo_new = 0 ;
0412 st_ref = 0 ;
0413 st_new = 0 ;
0414
0415 Ssiz_t pos = histo_name.Last('/') ;
0416 if (pos!=kNPOS) histo_name.Remove(0,pos+1) ;
0417 short_histo_name = histo_name ;
0418 short_histo_name.Remove(0,2) ;
0419
0420 gif_name = "gifs/" ; gif_name += histo_name ; gif_name += ".gif" ;
0421 gif_path = CMP_DIR ; gif_path += "/" ; gif_path += gif_name ;
0422 canvas_name = "c" ; canvas_name += histo_name ;
0423 canvas = new TCanvas(canvas_name) ;
0424 canvas->SetFillColor(10) ;
0425
0426 web_page<<"<a id=\""<<histo_name<<"\" name=\""<<short_histo_name<<"\"></a>" ;
0427
0428 if (strstr(short_histo_name, "_recomp") != NULL) {
0429 Ssiz_t pos2 = histo_name_recomp.Index("_recomp");
0430 histo_name_recomp.Remove(pos2,7) ;
0431 histo_full_path = file_new_dir ; histo_full_path += histo_name_recomp ;
0432 histo_ref = (TH1 *)file_new->Get(histo_full_path) ;
0433 std::cout << "histo ref : " << histo_full_path << std::endl;
0434 }
0435 else {
0436
0437
0438 if ( file_ref != 0 ) {
0439 TString histo_reduced_path = histo_path.c_str();
0440 if (file_ref_dir.IsNull()) {
0441 histo_full_path = histo_name ;
0442 }
0443 else {
0444 if (histo_reduced_path.BeginsWith("ElectronMcSignalValidatorMiniAOD"))
0445 {
0446 histo_reduced_path.Remove(25,7);
0447 histo_full_path = file_ref_dir ; histo_full_path += histo_reduced_path ;
0448 }
0449 else {
0450 histo_full_path = file_ref_dir ; histo_full_path += histo_path.c_str() ;
0451 }
0452 }
0453 std::cout << "histo ref : " << histo_full_path << std::endl;
0454
0455
0456
0457
0458
0459 histo_full_path_Pt1000 = file_ref_dir ; histo_full_path_Pt1000 += Pt1000_path_extension; histo_full_path_Pt1000 += histo_name ;
0460
0461
0462 histo_ref = (TH1 *)file_ref->Get(histo_full_path) ;
0463
0464 if (histo_ref!=0) {
0465
0466
0467 histo_ref->SetName(TString(histo_ref->GetName())+"_ref") ;
0468 }
0469 else {
0470 histo_ref = (TH1 *)file_ref->Get(histo_full_path_Pt1000) ;
0471 if (histo_ref!=0) {
0472
0473
0474 histo_ref->SetName(TString(histo_ref->GetName())+"_ref") ;
0475 }
0476 else {
0477 web_page<<"No <b>"<<histo_path<<"</b> for "<<CMP_BLUE_NAME<<".<br>" ;
0478 }
0479 }
0480 }
0481 }
0482
0483
0484 histo_full_path = file_new_dir ; histo_full_path += histo_path.c_str() ;
0485 std::cout << "histo new : " << histo_full_path << std::endl;
0486 histo_new = (TH1 *)file_new->Get(histo_full_path) ;
0487
0488
0489 if ((scaled==1)&&(histo_new!=0)&&(histo_ref!=0)&&(histo_ref->GetEntries()!=0))
0490 {
0491 Int_t new_entries = histo_new->GetEntries() ;
0492 if (new_entries==0) { new_entries = n_ele_charge ; }
0493 if (new_entries==0)
0494 { std::cerr<<"DO NOT KNOW HOW TO RESCALE "<<histo_name<<std::endl ; }
0495 else
0496 {
0497
0498
0499 if (rescale_factor==0.) { rescale_factor = new_entries/histo_ref->GetEntries() ; }
0500 histo_ref->Scale(rescale_factor) ;
0501 }
0502 }
0503 if ((histo_new!=0)&&(histo_ref!=0)&&(histo_ref->GetMaximum()>histo_new->GetMaximum()))
0504 { histo_new->SetMaximum(histo_ref->GetMaximum()*1.1) ; }
0505
0506 if (histo_new==0)
0507 {
0508 web_page<<"No <b>"<<histo_path<<"</b> for "<<CMP_RED_NAME<<".<br>" ;
0509 }
0510 else
0511 {
0512
0513 if (histo_name=="h_ele_charge")
0514 { n_ele_charge = histo_new->GetEntries() ; }
0515
0516
0517 TString newDrawOptions(err==1?"E1 P":"hist") ;
0518 gErrorIgnoreLevel = kWarning ;
0519 if (divide!=0)
0520 {
0521 num_full = file_new_dir ; num_full += num.c_str() ;
0522 denom_full = file_new_dir ; denom_full += denom.c_str() ;
0523 histo_new = DivideHistos(file_new,histo_new,num_full,denom_full) ;
0524 }
0525 histo_new->SetLineColor(kRed) ;
0526 histo_new->SetMarkerColor(2) ;
0527 histo_new->SetLineWidth(3) ;
0528 RenderHisto(histo_new,canvas) ;
0529 histo_new->Draw(newDrawOptions) ;
0530
0531
0532 canvas->SetCanvasSize(960, 600);
0533 canvas->Update() ;
0534 st_new = (TPaveStats*)histo_new->FindObject("stats");
0535 st_new->SetTextColor(kRed) ;
0536
0537
0538 if (histo_ref!=0)
0539 {
0540 if (divide!=0)
0541 {
0542 num_ref = num ;
0543 denom_ref = denom ;
0544 if (file_ref_dir.IsNull())
0545 {
0546 pos = num_ref.Last('/') ;
0547 if (pos!=kNPOS) num_ref.Remove(0,pos+1) ;
0548 pos = denom_ref.Last('/') ;
0549 if (pos!=kNPOS) denom_ref.Remove(0,pos+1) ;
0550 }
0551 histo_ref = DivideHistos(file_ref,histo_ref,file_ref_dir+num_ref,file_ref_dir+denom_ref) ;
0552 }
0553 RenderHisto(histo_ref,canvas) ;
0554 histo_ref->SetLineColor(kBlue) ;
0555 histo_ref->SetLineWidth(3) ;
0556 histo_ref->Draw("sames hist") ;
0557 canvas->Update() ;
0558 st_ref = (TPaveStats*)histo_ref->FindObject("stats");
0559 st_ref->SetTextColor(kBlue) ;
0560 Double_t y1 = st_ref->GetY1NDC() ;
0561 Double_t y2 = st_ref->GetY2NDC() ;
0562 st_ref->SetY1NDC(2*y1-y2) ;
0563 st_ref->SetY2NDC(y1) ;
0564
0565
0566
0567
0568
0569
0570 }
0571
0572
0573 newDrawOptions = "sames " ;
0574 newDrawOptions += (err==1?"E1 P":"hist") ;
0575 histo_new->Draw(newDrawOptions) ;
0576 if (st_ref!=0) st_ref->Draw() ;
0577 if (st_new!=0) st_new->Draw() ;
0578
0579
0580
0581
0582
0583
0584
0585
0586
0587
0588
0589 std::cout<<histo_name
0590 <<" has "<<histo_new->GetEffectiveEntries()<<" entries"
0591
0592 <<std::endl ;
0593 canvas->SaveAs(gif_path.Data()) ;
0594 web_page<<"<a href=\""<<gif_name<<"\"><img border=\"0\" class=\"image\" width=\"440\" src=\""<<gif_name<<"\"></a><br>" ;
0595 }
0596
0597
0598
0599
0600
0601
0602
0603
0604
0605 if (eol)
0606 { web_page<<"</td></tr>\n<tr valign=\"top\"><td><a href=\""<<CMP_URL<<"/\"><img width=\"18\" height=\"18\" border=\"0\" align=\"middle\" src=\"../../../../img/up.gif\" alt=\"Top\"/></a></td><td>" ; }
0607 else
0608 { web_page<<"</td><td>" ; }
0609 if (eoc)
0610 {
0611 cat = "" ;
0612 do
0613 {
0614 std::getline(histo_file2,cat) ;
0615 } while (cat.empty()) ;
0616 }
0617 }
0618
0619 histo_file2.close() ;
0620 web_page<<"</td></tr></table>\n" ;
0621
0622 web_page<<"\n</html>"<<std::endl ;
0623 std::cout << "on ferme la page" << std::endl;
0624 web_page.close() ;
0625 std::cout << "page fermee" << std::endl;
0626 return 0;
0627
0628 }