| 157 |
TTree *otr8 = 0; |
TTree *otr8 = 0; |
| 158 |
// |
// |
| 159 |
pamela->var.fl0 = false; |
pamela->var.fl0 = false; |
| 160 |
|
Int_t i = 0; |
| 161 |
|
Int_t isOK = 0; |
| 162 |
// |
// |
| 163 |
restart: |
restart: |
| 164 |
// |
// |
| 206 |
gStyle->SetNdivisions(1,"X"); |
gStyle->SetNdivisions(1,"X"); |
| 207 |
gStyle->SetNdivisions(1,"Y"); |
gStyle->SetNdivisions(1,"Y"); |
| 208 |
// |
// |
| 209 |
Int_t i = 0; |
if ( i < 0 ){ |
| 210 |
Int_t isOK = 0; |
i = -i; |
| 211 |
|
} else { |
| 212 |
|
i = 0; |
| 213 |
|
}; |
| 214 |
|
isOK = 0; |
| 215 |
// |
// |
| 216 |
// from here to refresh |
// from here to refresh |
| 217 |
// |
// |
| 301 |
carica.str(""); |
carica.str(""); |
| 302 |
carica << paminc.str().c_str() << "/feventvstruct.h"; |
carica << paminc.str().c_str() << "/feventvstruct.h"; |
| 303 |
gROOT->LoadMacro(carica.str().c_str()); |
gROOT->LoadMacro(carica.str().c_str()); |
| 304 |
|
// carica.str(""); |
| 305 |
|
// carica << paminc.str().c_str() << "/CaloNuclei.h"; |
| 306 |
|
// gROOT->LoadMacro(carica.str().c_str()); |
| 307 |
// |
// |
| 308 |
// load the selection macro |
// load the selection macro |
| 309 |
// |
// |
| 369 |
// |
// |
| 370 |
// ok, open file and determine if it is a YODA or DARTHVADER file |
// ok, open file and determine if it is a YODA or DARTHVADER file |
| 371 |
// |
// |
| 372 |
|
|
| 373 |
headerFile=new TFile(filename.Data()); |
headerFile=new TFile(filename.Data()); |
| 374 |
if ( FORCELEV == 0 ){ |
if ( FORCELEV == 0 ){ |
| 375 |
pamela->level.file = 0; |
pamela->level.file = 0; |
| 376 |
L0 = (TTree*)headerFile->Get("Physics"); |
L0 = (TTree*)headerFile->Get("Physics"); |
| 377 |
if ( !L0 ){ |
if ( !L0 ){ |
| 451 |
goto refresh; |
goto refresh; |
| 452 |
}; |
}; |
| 453 |
}; |
}; |
| 454 |
|
headerFile->Close("R"); |
| 455 |
// |
// |
| 456 |
if ( pamela->level.file != 2 ){ |
if ( pamela->level.file != 2 ){ |
| 457 |
printf(" This is a YODA (level0) file \n"); |
printf(" This is a YODA (level0) file \n"); |
| 466 |
// Load the file |
// Load the file |
| 467 |
// |
// |
| 468 |
if ( otr0 || L0 ){ |
if ( otr0 || L0 ){ |
| 469 |
otr = pamela->Load(*headerFile); |
otr = pamela->Load(filename.Data()); |
| 470 |
if ( !otr ){ |
if ( !otr ){ |
| 471 |
pamela->level.file = -1; |
pamela->level.file = -1; |
| 472 |
printf("ERROR: problems opening file...\n"); |
printf("ERROR: problems opening file...\n"); |
| 486 |
// |
// |
| 487 |
// get the number of entries |
// get the number of entries |
| 488 |
// |
// |
|
// otr = pamela->GetChain(); |
|
| 489 |
if ( !otr ) printf(" AGH! \n"); |
if ( !otr ) printf(" AGH! \n"); |
| 490 |
// |
// |
| 491 |
Long64_t nevents = otr->GetEntries(); |
Long64_t nevents = otr->GetEntries(); |
| 494 |
// check we have at least one event |
// check we have at least one event |
| 495 |
// |
// |
| 496 |
if (nevents<=0) { |
if (nevents<=0) { |
| 497 |
headerFile->Close(); |
// headerFile->Close(); |
| 498 |
printf("The file is empty, exiting...\n"); |
printf("The file is empty, exiting...\n"); |
| 499 |
pamgui->DIALOG(0," The file contains no physics data! "); |
pamgui->DIALOG(0," The file contains no physics data! "); |
| 500 |
pamela->var.waitforever = true; |
pamela->var.waitforever = true; |
| 627 |
// |
// |
| 628 |
pamela->var.goon = false; |
pamela->var.goon = false; |
| 629 |
if ( pamela->var.refresh || pamela->var.restart ){ |
if ( pamela->var.refresh || pamela->var.restart ){ |
| 630 |
// if ( pamela->GetL2() ) pamela->GetL2()->Clear(); |
if ( pamela->GetL2() ) pamela->GetL2()->Reset(); |
| 631 |
if ( pamela->GetL2() ) pamela->GetL2()->Delete(); |
if ( pamela->level.file != 2 ) pamela->GetChain()->Delete(); |
| 632 |
//if ( pamela->GetL2() ) delete pamela->GetL2(); |
otr = NULL; |
| 633 |
if ( headerFile ) headerFile->Close("R"); |
// if ( headerFile ) headerFile->Close("R"); |
| 634 |
if ( pamela->var.refresh ) goto refresh; |
if ( pamela->var.refresh ) goto refresh; |
| 635 |
if ( pamela->var.restart ){ |
if ( pamela->var.restart ){ |
| 636 |
filename = pamela->var.thefilename.Data(); |
filename = pamela->var.thefilename.Data(); |