| 46 |
#include <TEllipse.h> |
#include <TEllipse.h> |
| 47 |
#include <TArrow.h> |
#include <TArrow.h> |
| 48 |
#include <TStyle.h> |
#include <TStyle.h> |
| 49 |
|
#include <TStreamerElement.h> |
| 50 |
|
#include <TRealData.h> |
| 51 |
// |
// |
| 52 |
#include <PamelaRun.h> |
#include <PamelaRun.h> |
| 53 |
#include <physics/calorimeter/CalorimeterEvent.h> |
#include <physics/calorimeter/CalorimeterEvent.h> |
| 69 |
#include <FEVdetector.h> |
#include <FEVdetector.h> |
| 70 |
#include <FEventViewer.h> |
#include <FEventViewer.h> |
| 71 |
#include <feventvstruct.h> |
#include <feventvstruct.h> |
| 72 |
|
#include <color.h> |
| 73 |
// |
// |
| 74 |
extern Bool_t existfile(TString); |
extern Bool_t existfile(TString); |
| 75 |
// |
// |
| 91 |
var.AC = 0; |
var.AC = 0; |
| 92 |
var.RUN = 1; |
var.RUN = 1; |
| 93 |
var.TRK = 0; |
var.TRK = 0; |
| 94 |
var.ORB = 0; |
var.ORB = 1; |
| 95 |
var.TRG = 0; |
var.TRG = 0; |
| 96 |
var.CALO = 0; |
var.CALO = 0; |
| 97 |
var.S4 = 0; |
var.S4 = 0; |
| 178 |
} |
} |
| 179 |
|
|
| 180 |
void FEVdetector::GetEntry(Int_t i){ |
void FEVdetector::GetEntry(Int_t i){ |
| 181 |
thisentry = i; |
thisentry = i; |
| 182 |
otr->GetEntry(i); |
if ( level.file == 2 ){ |
| 183 |
// PrintData(otr,-1LL,44); |
L2->GetEntry(i); |
| 184 |
|
ShowInfo("RunInfo"); |
| 185 |
|
ShowInfo("SoftInfo"); |
| 186 |
|
ShowInfo("TrigLevel2"); |
| 187 |
|
ShowInfo("OrbitalInfo"); |
| 188 |
|
ShowInfo("ToFLevel2"); |
| 189 |
|
ShowInfo("TrkLevel2"); |
| 190 |
|
ShowInfo("AcLevel2"); |
| 191 |
|
ShowInfo("CaloLevel2"); |
| 192 |
|
ShowInfo("CaloLevel1"); |
| 193 |
|
ShowInfo("S4Level2"); |
| 194 |
|
ShowInfo("NDLevel2"); |
| 195 |
|
} else { |
| 196 |
|
otr->GetEntry(i); |
| 197 |
|
}; |
| 198 |
} |
} |
| 199 |
|
|
| 200 |
void FEVdetector::SetEntry(Int_t i){ |
void FEVdetector::SetEntry(Int_t i){ |
| 315 |
}; |
}; |
| 316 |
} |
} |
| 317 |
|
|
| 318 |
void FEVdetector::PrintLeaves(TTree *otr, Int_t i, TBranchElement *tb, Int_t lenmax){ |
void FEVdetector::ShowInfo(TString detector){ |
| 319 |
// -- Prints values of leaves. |
// |
| 320 |
|
TBranch *b1 = 0; |
| 321 |
// tb->ValidateAddress(); |
// TBranch *b3 = 0; |
| 322 |
printf("son qua \n"); |
TObjArray *branch_array = 0; |
| 323 |
|
// TObjArray *leaf_array = 0; |
| 324 |
|
// |
| 325 |
|
if ( !strcmp(detector.Data(),"RunInfo") || !strcmp(detector.Data(),"SoftInfo") ){ |
| 326 |
|
if ( runtree ) b1 = runtree->FindBranch(detector.Data()); |
| 327 |
|
} else { |
| 328 |
|
b1 = otr->FindBranch(detector.Data()); |
| 329 |
|
}; |
| 330 |
|
// |
| 331 |
|
if ( !b1 ) return; |
| 332 |
|
// |
| 333 |
|
Int_t dlen = 10; |
| 334 |
|
// |
| 335 |
|
char o[200000]; |
| 336 |
|
char col[13]; |
| 337 |
|
char col2[13]; |
| 338 |
|
// |
| 339 |
|
setcolor(col,RESET, GREEN, WHITE); |
| 340 |
|
sprintf(o,"%s======> EVENT:%i\n",col, thisentry); |
| 341 |
|
// |
| 342 |
|
setcolor(col,RESET, RED, WHITE); |
| 343 |
|
sprintf(o,"%s%sBranch %s\n",o,col,b1->GetName()); |
| 344 |
|
setcolor(col,RESET, BLACK, WHITE); |
| 345 |
|
sprintf(o,"%s%s",o,col); |
| 346 |
|
// |
| 347 |
|
branch_array = b1->GetListOfBranches(); |
| 348 |
|
// |
| 349 |
|
Int_t j = 0; |
| 350 |
|
// |
| 351 |
|
for(Int_t l=0;l<(branch_array->GetLast()+1);l++){ |
| 352 |
|
// |
| 353 |
|
TBranchElement *tb = (TBranchElement*)branch_array->At(l); |
| 354 |
|
Int_t type = tb->GetType(); |
| 355 |
|
Int_t atype = tb->GetStreamerType() - 20; |
| 356 |
|
Int_t len = (tb->GetInfo()->GetLengths())[tb->GetID()]; |
| 357 |
|
Int_t length = min(len,dlen); |
| 358 |
|
// |
| 359 |
|
// printf("Branches : type is %i type is %i tb getname %s slen %i slength %i\n",atype,type,tb->GetName(),len,length); |
| 360 |
|
switch (type){ |
| 361 |
|
case 0: |
| 362 |
|
// |
| 363 |
|
// IS A VARIABLE |
| 364 |
|
// |
| 365 |
|
// |
| 366 |
|
// NAME |
| 367 |
|
// |
| 368 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 369 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 370 |
|
sprintf(o,"%s%s %-15s%s =",o,col,((TBranch*)branch_array->At(l))->GetName(),col2); |
| 371 |
|
// |
| 372 |
|
j = 0; |
| 373 |
|
// |
| 374 |
|
// VALUES |
| 375 |
|
// |
| 376 |
|
// |
| 377 |
|
// Integer |
| 378 |
|
// |
| 379 |
|
if ( atype == 3 || atype == -17 ){ |
| 380 |
|
while ( j < length ){ |
| 381 |
|
if ( j < length -1 ){ |
| 382 |
|
sprintf(o,"%s %i ,",o,(Int_t)tb->GetValue(j,0)); |
| 383 |
|
} else { |
| 384 |
|
sprintf(o,"%s %i",o,(Int_t)tb->GetValue(j,0)); |
| 385 |
|
}; |
| 386 |
|
j++; |
| 387 |
|
}; |
| 388 |
|
}; |
| 389 |
|
// |
| 390 |
|
// Unsigned integer |
| 391 |
|
// |
| 392 |
|
if ( atype == -7 || atype == 13 ){ |
| 393 |
|
while ( j < length ){ |
| 394 |
|
if ( j < length -1 ){ |
| 395 |
|
sprintf(o,"%s %i ,",o,(UInt_t)tb->GetValue(j,0)); |
| 396 |
|
} else { |
| 397 |
|
sprintf(o,"%s %i",o,(UInt_t)tb->GetValue(j,0)); |
| 398 |
|
}; |
| 399 |
|
j++; |
| 400 |
|
}; |
| 401 |
|
}; |
| 402 |
|
// |
| 403 |
|
// Float |
| 404 |
|
// |
| 405 |
|
if ( atype == -15 || atype == 5 ){ |
| 406 |
|
while ( j < length ){ |
| 407 |
|
if ( j < length -1 ){ |
| 408 |
|
sprintf(o,"%s %f ,",o,tb->GetValue(j,0)); |
| 409 |
|
} else { |
| 410 |
|
sprintf(o,"%s %f",o,tb->GetValue(j,0)); |
| 411 |
|
}; |
| 412 |
|
j++; |
| 413 |
|
}; |
| 414 |
|
}; |
| 415 |
|
// |
| 416 |
|
// Strings |
| 417 |
|
// |
| 418 |
|
if ( atype == 45 ){ |
| 419 |
|
// TString *stringa = (TString*)(tb->GetValuePointer()); |
| 420 |
|
// int pointer = (tb->GetInfo()->GetOffsets())[tb->GetID()]; |
| 421 |
|
// TString *stringa = (TString*)(tb->GetInfo()->GetOffsets())[tb->GetID()]; |
| 422 |
|
// TString *stringa = (TString*)tb->GetAddress(); |
| 423 |
|
// printf(" address 0x%X \n",tb->GetAddress()); |
| 424 |
|
// printf(" pointer 0x%X \n",tb->GetValuePointer()); |
| 425 |
|
// printf(" object 0x%X \n",tb->GetObject()); |
| 426 |
|
// printf("stringa %s lung %i\n",stringa->Data(),stringa->Length()); |
| 427 |
|
// TLeaf *striglia = tb->FindLeaf(tb->GetName()); |
| 428 |
|
// if ( striglia ){ |
| 429 |
|
// char *pointer = (char *)striglia->GetValuePointer(); |
| 430 |
|
// TString *pr= (TString*)pointer; |
| 431 |
|
// printf("ciao %s \n",pr->Data()); |
| 432 |
|
// }; |
| 433 |
|
sprintf(o,"%s TString ",o); |
| 434 |
|
}; |
| 435 |
|
// |
| 436 |
|
// TArray |
| 437 |
|
// |
| 438 |
|
if ( atype == 42 ){ |
| 439 |
|
// |
| 440 |
|
// TObjArray *cl = (TObjArray*)tb->GetObject(); |
| 441 |
|
// // |
| 442 |
|
// TClass *myc = cl->IsA(); |
| 443 |
|
// // |
| 444 |
|
// printf("qui \n"); |
| 445 |
|
// // |
| 446 |
|
// // determine offset to fetch data |
| 447 |
|
// // |
| 448 |
|
// int thisoffset = 0; |
| 449 |
|
// TRealData *rd = myc->GetRealData(tb->GetName()); |
| 450 |
|
// if ( rd ){ |
| 451 |
|
// thisoffset = rd->GetThisOffset(); |
| 452 |
|
// }; |
| 453 |
|
// Int_t niente = 0; |
| 454 |
|
// TStreamerElement *tste = tb->GetInfo()->GetStreamerElement(rd->GetName(),niente); |
| 455 |
|
// printf(" typename %s \n",tste->GetTypeName()); |
| 456 |
|
// // |
| 457 |
|
// // TArrayI |
| 458 |
|
// // |
| 459 |
|
// if ( !strcmp(tste->GetTypeName(),"TArrayI") ){ |
| 460 |
|
// // |
| 461 |
|
// printf("qua \n"); |
| 462 |
|
// char *pointer = (char*)cl->At(0); |
| 463 |
|
// // char *pu = thisoffset + pointer; |
| 464 |
|
// int pu = (int)tste->GetTObjectOffset(); |
| 465 |
|
// TArrayI arr = (TArrayI)*pu; |
| 466 |
|
// // TArrayI arr = (TArrayI)(thisoffset); |
| 467 |
|
// //TArrayI *arr = (TArrayI*)pu; |
| 468 |
|
// //TArraI arr = (TArrayI) |
| 469 |
|
// Int_t jj=0; |
| 470 |
|
// j=0; |
| 471 |
|
// printf("quii \n"); |
| 472 |
|
// Int_t arlen = min(arr.GetSize(),dlen); |
| 473 |
|
// // |
| 474 |
|
// printf("que \n"); |
| 475 |
|
// setcolor(col,RESET, BLUE, WHITE); |
| 476 |
|
// setcolor(col2,RESET, BLACK, WHITE); |
| 477 |
|
// sprintf(o,"%s%s %s[%i]%s = ",o,col,tb->GetName(),arr.GetSize(),col2); |
| 478 |
|
// // |
| 479 |
|
// // while ( j < tb->GetNdata() ){ |
| 480 |
|
// // |
| 481 |
|
// printf("quo \n"); |
| 482 |
|
// // pointer = (char*)cl->UncheckedAt(j); |
| 483 |
|
// // pu = pointer + thisoffset; |
| 484 |
|
// // arr = (TArrayI*)(thisoffset); |
| 485 |
|
// // |
| 486 |
|
// while ( jj < arlen ){ |
| 487 |
|
// if ( jj < arlen-1 ){ |
| 488 |
|
// sprintf(o,"%s %i ,",o,arr.At(jj)); |
| 489 |
|
// } else { |
| 490 |
|
// sprintf(o,"%s %i",o,arr.At(jj)); |
| 491 |
|
// }; |
| 492 |
|
// jj++; |
| 493 |
|
// }; |
| 494 |
|
// // if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 495 |
|
// // j++; |
| 496 |
|
// // }; |
| 497 |
|
// }; |
| 498 |
|
// // |
| 499 |
|
// // TArrayF |
| 500 |
|
// // |
| 501 |
|
// if ( !strcmp(tste->GetTypeName(),"TArrayF") ){ |
| 502 |
|
// // |
| 503 |
|
// char *pointer = (char*)cl->UncheckedAt(0); |
| 504 |
|
// char *pu = pointer + thisoffset; |
| 505 |
|
// TArrayF *arr = (TArrayF*)(pu); |
| 506 |
|
// Int_t jj=0; |
| 507 |
|
// Int_t arlen = min(arr->GetSize(),dlen); |
| 508 |
|
// // |
| 509 |
|
// setcolor(col,RESET, BLUE, WHITE); |
| 510 |
|
// setcolor(col2,RESET, BLACK, WHITE); |
| 511 |
|
// sprintf(o,"%s%s %s[%i]%s = ",o,col,tb->GetName(),arr->GetSize(),col2); |
| 512 |
|
// // |
| 513 |
|
// while ( j < tb->GetNdata() ){ |
| 514 |
|
// // |
| 515 |
|
// pointer = (char*)cl->UncheckedAt(j); |
| 516 |
|
// pu = pointer + thisoffset; |
| 517 |
|
// arr = (TArrayF*)(pu); |
| 518 |
|
// // |
| 519 |
|
// while ( jj < arlen ){ |
| 520 |
|
// if ( jj < arlen-1 ){ |
| 521 |
|
// sprintf(o,"%s %f ,",o,arr->At(jj)); |
| 522 |
|
// } else { |
| 523 |
|
// sprintf(o,"%s %f",o,arr->At(jj)); |
| 524 |
|
// }; |
| 525 |
|
// jj++; |
| 526 |
|
// }; |
| 527 |
|
// if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 528 |
|
// j++; |
| 529 |
|
// }; |
| 530 |
|
// }; |
| 531 |
|
// sprintf(o,"%s\n",o); |
| 532 |
|
// |
| 533 |
|
sprintf(o,"%s TArray ",o); |
| 534 |
|
// |
| 535 |
|
}; |
| 536 |
|
// |
| 537 |
|
sprintf(o,"%s\n",o); |
| 538 |
|
break; |
| 539 |
|
case 3: |
| 540 |
|
// |
| 541 |
|
// IS A TCLONESARRAY |
| 542 |
|
// |
| 543 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 544 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 545 |
|
sprintf(o,"%s%s %-15s%s = %d\n",o,col,tb->GetName(), col2, tb->GetNdata()); |
| 546 |
|
|
| 547 |
// if (otr->GetMakeClass()) { |
// |
| 548 |
if (!tb->GetAddress()) { |
if ( tb->GetNdata() ){ |
| 549 |
printf("esco \n"); |
// |
| 550 |
return; |
TClonesArray *cl = (TClonesArray*)tb->GetObject(); |
| 551 |
} |
// |
| 552 |
if (tb->GetType() == 3 || tb->GetType() == 4) { |
TClass *myc = cl->GetClass(); |
| 553 |
// TClonesArray or STL container top-level branch. |
// |
| 554 |
printf("3 o 4 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
TList *lme = myc->GetListOfDataMembers(); |
| 555 |
return; |
TIter next(lme); |
| 556 |
} else if (tb->GetType() == 31 || tb->GetType() == 41) { |
TBranchElement *tb2 = 0; |
| 557 |
printf(" 31 o 41 \n"); |
// |
| 558 |
// TClonesArray or STL container sub-branch. |
while ( (tb2 = (TBranchElement*)next()) ){ |
| 559 |
Int_t n = TMath::Min(10, tb->GetNdata()); |
// |
| 560 |
Int_t atype = tb->GetStreamerType() + 20; |
const char *name = tb2->GetName(); |
| 561 |
if (tb->GetStreamerType() == 1) { |
TBranch *foglia = tb->FindBranch(name); |
| 562 |
// TVirtualStreamerInfo::kOffsetL + TVirtualStreamerInfo::kChar is |
if ( foglia ){ |
| 563 |
// printed as a string and could print weird characters. |
// |
| 564 |
// So we print an unsigned char instead (not perfect, but better). |
TBranchElement *stb = (TBranchElement*)tb->FindBranch(name); |
| 565 |
atype = 20 + 11 ; |
Int_t stype = stb->GetType(); |
| 566 |
} |
Int_t satype = stb->GetStreamerType() - 20; |
| 567 |
if (atype > 54) { |
Int_t slen = (stb->GetInfo()->GetLengths())[stb->GetID()]; |
| 568 |
// FIXME: More logic required here (like in ReadLeaves) |
Int_t slength = min(slen,dlen); |
| 569 |
printf(">54 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
// printf("SubBranches : atype is %i type is %i tb getname %s slen %i slength %i\n",satype,stype,stb->GetName(),slen,slength); |
| 570 |
return; |
switch (stype){ |
| 571 |
} |
case 31: |
| 572 |
if (tb->GetStreamerType() > 20) { |
// |
| 573 |
atype -= 20; |
// IS A VARIABLE |
| 574 |
TObjArray *prova= otr->GetListOfLeaves(); |
// |
| 575 |
// TObjArray* leaf2 = (TObjArray*) prova->UncheckedAt(i); |
// |
| 576 |
//TLeaf* leaf = (TLeaf*)(otr->GetLeaf(tb->GetName())); |
// NAME |
| 577 |
// TLeafElement* leaf = (TLeafElement*)((TLeaf*)(otr->GetListOfLeaves()->UncheckedAt(i))->GetBranch()->UncheckedAt(0)); |
// |
| 578 |
TLeafElement* leaf = (TLeafElement*)(prova->UncheckedAt(0)); |
j = 0; |
| 579 |
n = n * leaf->GetLenStatic(); |
// |
| 580 |
} |
// VALUES |
| 581 |
if (tb->GetInfo()) { |
// |
| 582 |
// n = 16; |
if ( satype == 41 || satype == 44){ |
| 583 |
tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); |
// |
| 584 |
//tb->GetObject()->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), atype, n, lenmax); |
// skip TRef |
| 585 |
} |
// |
| 586 |
return; |
break; |
| 587 |
} else if (tb->GetType() <= 2) { |
}; |
| 588 |
printf(" <=2 \n"); |
// |
| 589 |
// Branch in split mode. |
// Integer |
| 590 |
// FIXME: This should probably be < 60 instead. |
// |
| 591 |
if ((tb->GetStreamerType() > 40) && (tb->GetStreamerType() < 55)) { |
if ( satype == -17 ){ |
| 592 |
Int_t atype = tb->GetStreamerType() - 20; |
// |
| 593 |
TBranchElement* counterElement = (TBranchElement*) tb->GetBranchCount(); |
setcolor(col,RESET, BLUE, WHITE); |
| 594 |
Int_t n = (Int_t) counterElement->GetValue(0, 0); |
setcolor(col2,RESET, BLACK, WHITE); |
| 595 |
if (tb->GetInfo()) { |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 596 |
tb->GetInfo()->PrintValue(tb->GetName(), tb->GetAddress(), atype, n, lenmax); |
while ( j < cl->GetEntriesFast() ){ |
| 597 |
} |
if ( j < cl->GetEntriesFast() -1 ){ |
| 598 |
} else { |
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,slength)); |
| 599 |
// if (tb->GetInfo()) { |
} else { |
| 600 |
// tb->GetInfo()->PrintValue(tb->GetName(), tb->GetObject(), tb->GetID(), -1, lenmax); |
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,slength)); |
| 601 |
// } |
}; |
| 602 |
// } |
j++; |
| 603 |
return; |
}; |
| 604 |
} |
}; |
| 605 |
} else if (tb->GetType() == 3) { |
// |
| 606 |
printf("3 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
// Float |
| 607 |
} else if (tb->GetType() == 31) { |
// |
| 608 |
printf("31 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
if ( satype == -15 ){ |
| 609 |
// TClonesArray* clones = (TClonesArray*) tb->GetObject(); |
// |
| 610 |
// if (tb->GetInfo()) { |
setcolor(col,RESET, BLUE, WHITE); |
| 611 |
// tb->GetInfo()->PrintValueClones(tb->GetName(), clones, tb->GetID(), tb->GetOffset(), lenmax); |
setcolor(col2,RESET, BLACK, WHITE); |
| 612 |
// } |
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 613 |
} else if (tb->GetType() == 41) { |
while ( j < cl->GetEntriesFast() ){ |
| 614 |
printf("41 %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
if ( j < cl->GetEntriesFast() -1 ){ |
| 615 |
// TVirtualCollectionProxy::TPushPop helper(((TBranchElement*) this)->GetCollectionProxy(), fObject); |
sprintf(o,"%s %f ,",o,stb->GetValue(j,slength)); |
| 616 |
// if (GetInfo()) { |
} else { |
| 617 |
// GetInfo()->PrintValueSTL(GetName(), ((TBranchElement*) this)->GetCollectionProxy(), fID, fOffset, lenmax); |
sprintf(o,"%s %f",o,stb->GetValue(j,slength)); |
| 618 |
// } |
}; |
| 619 |
} else { |
j++; |
| 620 |
printf("else %-15s = %d\n", tb->GetName(), tb->GetNdata()); |
}; |
| 621 |
// if (GetInfo()) { |
}; |
| 622 |
// GetInfo()->PrintValue(GetName(), fObject, fID, -1, lenmax); |
// |
| 623 |
// } |
// Array of float |
| 624 |
} |
// |
| 625 |
|
if ( satype == 5 ){ |
| 626 |
|
// |
| 627 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 628 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 629 |
|
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 630 |
|
Bool_t bold = true; |
| 631 |
|
while ( j < tb->GetNdata() ){ |
| 632 |
|
if ( bold ){ |
| 633 |
|
setcolor(col,RESET, BLACK, WHITE); |
| 634 |
|
sprintf(o,"%s%s",o,col); |
| 635 |
|
} else { |
| 636 |
|
setcolor(col,BOLD, BLACK, WHITE); |
| 637 |
|
sprintf(o,"%s%s",o,col); |
| 638 |
|
}; |
| 639 |
|
Int_t jj = 0; |
| 640 |
|
while ( jj < slength ){ |
| 641 |
|
if ( jj < slength-1 ){ |
| 642 |
|
sprintf(o,"%s %f ,",o,stb->GetValue(j,jj,true)); |
| 643 |
|
} else { |
| 644 |
|
sprintf(o,"%s %f",o,stb->GetValue(j,jj,true)); |
| 645 |
|
}; |
| 646 |
|
jj++; |
| 647 |
|
}; |
| 648 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 649 |
|
if ( !bold ){ |
| 650 |
|
bold = true; |
| 651 |
|
} else { |
| 652 |
|
bold = false; |
| 653 |
|
}; |
| 654 |
|
j++; |
| 655 |
|
}; |
| 656 |
|
if ( bold ){ |
| 657 |
|
setcolor(col,RESET, BLACK, WHITE); |
| 658 |
|
sprintf(o,"%s%s",o,col); |
| 659 |
|
}; |
| 660 |
|
}; |
| 661 |
|
// |
| 662 |
|
// Array of integers |
| 663 |
|
// |
| 664 |
|
if ( satype == 3 ){ |
| 665 |
|
// |
| 666 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 667 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 668 |
|
sprintf(o,"%s%s %-15s%s = ",o,col,foglia->GetName(),col2); |
| 669 |
|
while ( j < tb->GetNdata() ){ |
| 670 |
|
Int_t jj = 0; |
| 671 |
|
while ( jj < slength ){ |
| 672 |
|
if ( jj < slength-1 ){ |
| 673 |
|
sprintf(o,"%s %i ,",o,(Int_t)stb->GetValue(j,jj,true)); |
| 674 |
|
} else { |
| 675 |
|
sprintf(o,"%s %i",o,(Int_t)stb->GetValue(j,jj,true)); |
| 676 |
|
}; |
| 677 |
|
jj++; |
| 678 |
|
}; |
| 679 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 680 |
|
j++; |
| 681 |
|
}; |
| 682 |
|
}; |
| 683 |
|
|
| 684 |
// }; |
// |
| 685 |
printf("esco qui\n"); |
// TArray |
| 686 |
|
// |
| 687 |
|
if ( satype == 42 ){ |
| 688 |
|
// |
| 689 |
|
// determine offset to fetch data |
| 690 |
|
// |
| 691 |
|
int thisoffset = 0; |
| 692 |
|
TRealData *rd = myc->GetRealData(foglia->GetName()); |
| 693 |
|
if ( rd ){ |
| 694 |
|
thisoffset = rd->GetThisOffset(); |
| 695 |
|
}; |
| 696 |
|
Int_t niente = 0; |
| 697 |
|
TStreamerElement *tste = stb->GetInfo()->GetStreamerElement(rd->GetName(),niente); |
| 698 |
|
// |
| 699 |
|
// TArrayI |
| 700 |
|
// |
| 701 |
|
if ( !strcmp(tste->GetTypeName(),"TArrayI") ){ |
| 702 |
|
// |
| 703 |
|
char *pointer = (char*)cl->UncheckedAt(0); |
| 704 |
|
char *pu = pointer + thisoffset; |
| 705 |
|
TArrayI *arr = (TArrayI*)(pu); |
| 706 |
|
Int_t jj=0; |
| 707 |
|
Int_t arlen = min(arr->GetSize(),dlen); |
| 708 |
|
// |
| 709 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 710 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 711 |
|
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
| 712 |
|
// |
| 713 |
|
while ( j < tb->GetNdata() ){ |
| 714 |
|
// |
| 715 |
|
pointer = (char*)cl->UncheckedAt(j); |
| 716 |
|
pu = pointer + thisoffset; |
| 717 |
|
arr = (TArrayI*)(pu); |
| 718 |
|
// |
| 719 |
|
while ( jj < arlen ){ |
| 720 |
|
if ( jj < arlen-1 ){ |
| 721 |
|
sprintf(o,"%s %i ,",o,arr->At(jj)); |
| 722 |
|
} else { |
| 723 |
|
sprintf(o,"%s %i",o,arr->At(jj)); |
| 724 |
|
}; |
| 725 |
|
jj++; |
| 726 |
|
}; |
| 727 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 728 |
|
j++; |
| 729 |
|
}; |
| 730 |
|
}; |
| 731 |
|
// |
| 732 |
|
// TArrayF |
| 733 |
|
// |
| 734 |
|
if ( !strcmp(tste->GetTypeName(),"TArrayF") ){ |
| 735 |
|
// |
| 736 |
|
char *pointer = (char*)cl->UncheckedAt(0); |
| 737 |
|
char *pu = pointer + thisoffset; |
| 738 |
|
TArrayF *arr = (TArrayF*)(pu); |
| 739 |
|
Int_t jj=0; |
| 740 |
|
Int_t arlen = min(arr->GetSize(),dlen); |
| 741 |
|
// |
| 742 |
|
setcolor(col,RESET, BLUE, WHITE); |
| 743 |
|
setcolor(col2,RESET, BLACK, WHITE); |
| 744 |
|
sprintf(o,"%s%s %s[%i]%s = ",o,col,foglia->GetName(),arr->GetSize(),col2); |
| 745 |
|
// |
| 746 |
|
while ( j < tb->GetNdata() ){ |
| 747 |
|
// |
| 748 |
|
pointer = (char*)cl->UncheckedAt(j); |
| 749 |
|
pu = pointer + thisoffset; |
| 750 |
|
arr = (TArrayF*)(pu); |
| 751 |
|
// |
| 752 |
|
while ( jj < arlen ){ |
| 753 |
|
if ( jj < arlen-1 ){ |
| 754 |
|
sprintf(o,"%s %f ,",o,arr->At(jj)); |
| 755 |
|
} else { |
| 756 |
|
sprintf(o,"%s %f",o,arr->At(jj)); |
| 757 |
|
}; |
| 758 |
|
jj++; |
| 759 |
|
}; |
| 760 |
|
if ( j < tb->GetNdata() -1 ) sprintf(o,"%s ,",o); |
| 761 |
|
j++; |
| 762 |
|
}; |
| 763 |
|
}; |
| 764 |
|
}; |
| 765 |
|
sprintf(o,"%s\n",o); |
| 766 |
|
break; |
| 767 |
|
}; |
| 768 |
|
}; |
| 769 |
|
}; |
| 770 |
|
}; |
| 771 |
|
break; |
| 772 |
|
}; |
| 773 |
|
}; |
| 774 |
|
// pamgui->DIALOG(0,o); |
| 775 |
|
printf("%s\n",o); |
| 776 |
}; |
}; |
| 777 |
|
|
|
void FEVdetector::PrintData(TTree *tree, Long64_t entry=-1LL,Int_t lenmax=44){ |
|
|
// -- Print values of all active leaves for entry. |
|
|
// |
|
|
// if entry==-1, print current entry (default) |
|
|
// if a leaf is an array, a maximum of lenmax elements is printed. |
|
|
// |
|
|
if (entry != -1) { |
|
|
tree->GetEntry(entry); |
|
|
} |
|
|
// printf("======> EVENT:%lld\n", thisentry); |
|
|
printf("======> EVENT:%i\n", thisentry); |
|
|
TObjArray* leaves = tree->GetListOfLeaves(); // |
|
|
Int_t nleaves = leaves->GetEntriesFast(); |
|
|
Int_t ltype; |
|
|
for (Int_t i = 0; i < nleaves; i++) { |
|
|
TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(i); |
|
|
TBranch* branch = leaf->GetBranch(); |
|
|
// if (branch->TestBit(kDoNotProcess)) { |
|
|
// continue; |
|
|
// } |
|
|
Int_t len = leaf->GetLen(); |
|
|
if (len <= 0) { |
|
|
continue; |
|
|
} |
|
|
len = TMath::Min(len, lenmax); |
|
|
if (leaf->IsA() == TLeafElement::Class()) { |
|
|
// Double_t value = leaf->GetValue(lenmax); |
|
|
//printf(" ioqui %f \n",value); |
|
|
// ((TBranchElement*)leaf->GetBranch())->PrintValue(i); |
|
|
this->PrintLeaves(otr,i,((TBranchElement*)leaf->GetBranch()), lenmax); |
|
|
//leaf->PrintValue(lenmax); |
|
|
continue; |
|
|
} |
|
|
if (branch->GetListOfBranches()->GetEntriesFast() > 0) { |
|
|
continue; |
|
|
} |
|
|
ltype = 10; |
|
|
if (leaf->IsA() == TLeafF::Class()) { |
|
|
ltype = 5; |
|
|
} |
|
|
if (leaf->IsA() == TLeafD::Class()) { |
|
|
ltype = 5; |
|
|
} |
|
|
if (leaf->IsA() == TLeafC::Class()) { |
|
|
len = 1; |
|
|
ltype = 5; |
|
|
}; |
|
|
printf(" %-15s = ", leaf->GetName()); |
|
|
for (Int_t l = 0; l < len; l++) { |
|
|
Double_t value = leaf->GetValue(l); |
|
|
printf(" ioqui %f \n",value); |
|
|
// leaf->PrintValue(l); |
|
|
if (l == (len - 1)) { |
|
|
printf("\n"); |
|
|
continue; |
|
|
} |
|
|
printf(", "); |
|
|
if ((l % ltype) == 0) { |
|
|
printf("\n "); |
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
| 778 |
|
|
| 779 |
void FEVdetector::GetGeneralInfo(){ |
void FEVdetector::GetGeneralInfo(){ |
| 780 |
// |
// |
| 785 |
headcold = headc; |
headcold = headc; |
| 786 |
headc = ph->Counter; |
headc = ph->Counter; |
| 787 |
var.headc = (int)ph->Counter; |
var.headc = (int)ph->Counter; |
| 788 |
OBT = ph->OrbitalTime; |
OBT = (UInt_t)ph->OrbitalTime; |
| 789 |
DOBT = OBT - OOBT; |
DOBT = OBT - OOBT; |
| 790 |
OOBT = OBT; |
OOBT = OBT; |
| 791 |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
if ( thisentry == minevent || DOBT < 0 || (headc-headcold-1)!=0 ) DOBT = 0; |
| 974 |
// |
// |
| 975 |
} |
} |
| 976 |
|
|
| 977 |
Int_t FEVdetector::Load(TTree &mainotr, TFile &mainfile){ |
TChain* FEVdetector::Load(TFile &mainfile){ |
| 978 |
//Int_t FEVdetector::Load(TChain &mainotr, TFile &mainfile){ |
// |
| 979 |
file = &mainfile; |
file = &mainfile; |
| 980 |
otr = &mainotr; |
// |
| 981 |
L2 = new PamLevel2(); |
L2 = new PamLevel2(); |
| 982 |
// |
// |
| 983 |
if ( level.file == 2 ){ |
if ( level.file == 2 ){ |
| 984 |
// otr = L2->LoadPamTrees(file); |
// |
| 985 |
printf(" %s \n",ddec.Data()); |
printf(" %s \n",ddec.Data()); |
| 986 |
// otr->Refresh(); |
otr = L2->GetPamTree(gSystem->DirName(file->GetName()),file->GetName(),ddec.Data()); |
| 987 |
// otr->Clear(); |
runtree = L2->GetRunTree(gSystem->DirName(file->GetName()),file->GetName()); |
|
// otr = new TTree(); |
|
|
otr = L2->GetPamTree(file,ddec.Data()); |
|
| 988 |
// |
// |
| 989 |
if ( !otr ) return(0); |
if ( !otr ) return(0); |
|
// ******************** |
|
|
// load magnetic field |
|
|
// ******************** |
|
|
// const char *pam_calib = pathtocalibration(); |
|
|
// |
|
|
// stringstream magfie; |
|
|
// magfie.str(""); |
|
|
// magfie << "/localdisk/mocchiut/test/calib/trk-param/field_param-0/"; |
|
|
// magfie << pam_calib; |
|
|
//magfie << "/trk-param/field_param-0/"; |
|
| 990 |
// |
// |
|
//L2->GetTrkLevel2()->LoadField(magfie.str().c_str()); |
|
| 991 |
} else { |
} else { |
| 992 |
// |
// |
| 993 |
// load calorimeter ADC2MIP conversion file |
// load calorimeter ADC2MIP conversion file |
| 1031 |
trigger = new pamela::trigger::TriggerEvent(); |
trigger = new pamela::trigger::TriggerEvent(); |
| 1032 |
eh = new pamela::EventHeader(); |
eh = new pamela::EventHeader(); |
| 1033 |
ph = new pamela::PscuHeader(); |
ph = new pamela::PscuHeader(); |
| 1034 |
// oinfoL2 = new OrbitalInfo(); |
// runinfo = new ItoRunInfo(file); |
|
runinfo = new ItoRunInfo(file); |
|
| 1035 |
// |
// |
| 1036 |
de = new pamela::calorimeter::CalorimeterEvent(); |
de = new pamela::calorimeter::CalorimeterEvent(); |
| 1037 |
trk = new pamela::tracker::TrackerEvent(); |
trk = new pamela::tracker::TrackerEvent(); |
| 1040 |
s4 = new pamela::S4::S4Event(); |
s4 = new pamela::S4::S4Event(); |
| 1041 |
tof = new pamela::tof::TofEvent(); |
tof = new pamela::tof::TofEvent(); |
| 1042 |
// |
// |
| 1043 |
|
// Load level0 file if the case |
| 1044 |
|
// |
| 1045 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
| 1046 |
|
otr = new TChain("Physics"); |
| 1047 |
|
otr->Add(file->GetName(),-1); |
| 1048 |
otr->SetBranchAddress("Trigger", &trigger); |
otr->SetBranchAddress("Trigger", &trigger); |
| 1049 |
otr->SetBranchAddress("Header", &eh); |
otr->SetBranchAddress("Header", &eh); |
| 1050 |
}; |
}; |
|
if ( level.file == 2 && var.RUN){ |
|
|
// otr->AddFriend("OrbitalInfo", file); |
|
|
// otr->SetBranchAddress("OrbitalInfo", &oinfoL2); |
|
|
runinfo->Read(0ULL); |
|
|
}; |
|
| 1051 |
// |
// |
| 1052 |
if ( var.TRK ) { |
if ( var.TRK ) { |
| 1053 |
if ( level.file == 0 || level.file == -1 ){ |
if ( level.file == 0 || level.file == -1 ){ |
| 1120 |
}; |
}; |
| 1121 |
}; |
}; |
| 1122 |
// |
// |
| 1123 |
// printf("qua\n"); |
if ( !otr ){ |
| 1124 |
return(1); |
return(0); |
| 1125 |
|
}; |
| 1126 |
|
// |
| 1127 |
|
return otr; |
| 1128 |
// |
// |
| 1129 |
} |
} |
| 1130 |
|
|
| 1200 |
text->DrawLatex(0.33,txthi,testo.str().c_str()); |
text->DrawLatex(0.33,txthi,testo.str().c_str()); |
| 1201 |
txthi -= 0.03; |
txthi -= 0.03; |
| 1202 |
testo2.str(""); |
testo2.str(""); |
| 1203 |
testo2 << "On Board Time: " << (int)OBT; |
testo2 << "On Board Time: " << (unsigned int)OBT; |
| 1204 |
if ( DOBT > 0 ) { |
if ( DOBT > 0 ) { |
| 1205 |
testo2 << " (delta: " << (int)DOBT; |
testo2 << " (delta: " << (unsigned int)DOBT; |
| 1206 |
testo2 << ")"; |
testo2 << ")"; |
| 1207 |
}; |
}; |
| 1208 |
testo2 << " [ms]"; |
testo2 << " [ms]"; |
| 2621 |
// |
// |
| 2622 |
Bool_t repeat = true; |
Bool_t repeat = true; |
| 2623 |
Int_t numtr = 1; |
Int_t numtr = 1; |
| 2624 |
|
// Int_t numtr = 0; |
| 2625 |
Int_t repuntil = 0; |
Int_t repuntil = 0; |
| 2626 |
// |
// |
| 2627 |
// |
// |
| 2629 |
// |
// |
| 2630 |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
| 2631 |
// printf("repuntil = %i \n",repuntil); |
// printf("repuntil = %i \n",repuntil); |
| 2632 |
|
//if ( level.file == 2 ) repuntil = L2->GetTrkLevel2()->GetNTracks(); |
| 2633 |
//repuntil = L2->GetNTracks(); |
//repuntil = L2->GetNTracks(); |
| 2634 |
// |
// |
| 2635 |
while ( repeat ){ |
while ( repeat ){ |
| 2639 |
// |
// |
| 2640 |
// |
// |
| 2641 |
ToFTrkVar *ptt = 0; |
ToFTrkVar *ptt = 0; |
| 2642 |
|
// PamTrack *ptrack = 0; |
| 2643 |
|
Float_t adc[4][12]; |
| 2644 |
|
Float_t tdc[4][12]; |
| 2645 |
|
memset(adc,0,4*12*sizeof(Float_t)); |
| 2646 |
|
memset(tdc,0,4*12*sizeof(Float_t)); |
| 2647 |
// |
// |
| 2648 |
// |
// |
| 2649 |
|
// if ( repuntil == 0 || var.tofraw ){ |
| 2650 |
if ( repuntil == 1 || var.tofraw ){ |
if ( repuntil == 1 || var.tofraw ){ |
| 2651 |
numtr = 0; |
numtr = 0; |
| 2652 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(0); |
| 2657 |
if ( numtr >= repuntil-1 ) repeat = false; |
if ( numtr >= repuntil-1 ) repeat = false; |
| 2658 |
// |
// |
| 2659 |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
ptt = L2->GetToFLevel2()->GetToFTrkVar(numtr); |
| 2660 |
|
//ptrack = L2->GetTrack(numtr); |
| 2661 |
|
//ptt = ptrack->GetToFTrack(); |
| 2662 |
}; |
}; |
| 2663 |
// |
// |
| 2664 |
xp11[0] = 0.; |
xp11[0] = 0.; |
| 2672 |
// |
// |
| 2673 |
ii = 2; |
ii = 2; |
| 2674 |
// |
// |
| 2675 |
Float_t adc[4][12]; |
Int_t myseq = ptt->trkseqno + 1; |
| 2676 |
Float_t tdc[4][12]; |
L2->GetToFLevel2()->GetMatrix(myseq,adc,tdc); |
| 2677 |
L2->GetToFLevel2()->GetMatrix(numtr,adc,tdc); |
// |
| 2678 |
|
// printf(" qua \n"); |
| 2679 |
// |
// |
| 2680 |
for ( Int_t i = 0; i<8; i++ ) { |
for ( Int_t i = 0; i<8; i++ ) { |
| 2681 |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
if ( adc[ch11a[i]][hb11a[i]] < 1000. ){ |
| 5152 |
// first of all plot crosses relatives to tracks |
// first of all plot crosses relatives to tracks |
| 5153 |
// |
// |
| 5154 |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
| 5155 |
|
// for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
| 5156 |
|
// TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
| 5157 |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
for (Int_t nt = 0; nt < L2->GetTrkLevel2()->GetNTracks(); nt++){ |
| 5158 |
TrkTrack *track = L2->GetTrkLevel2()->GetTrack(nt); |
PamTrack *ptrack= L2->GetTrack(nt); |
| 5159 |
|
TrkTrack *track = ptrack->GetTrkTrack(); |
| 5160 |
|
// |
| 5161 |
for (Int_t plane = 0; plane<6; plane++){ |
for (Int_t plane = 0; plane<6; plane++){ |
| 5162 |
// |
// |
| 5163 |
x = track->xm[plane]; |
x = track->xm[plane]; |
| 5899 |
// |
// |
| 5900 |
// Define variables |
// Define variables |
| 5901 |
// |
// |
| 5902 |
Int_t etime = var.etime; |
UInt_t etime = var.etime; |
| 5903 |
Float_t estrip[2][22][96], ener, basel,sdexy[2][22][96],sdexyc[2][22][96]; |
Float_t estrip[2][22][96], ener, basel,sdexy[2][22][96],sdexyc[2][22][96]; |
| 5904 |
Int_t badstrip = 0; |
Int_t badstrip = 0; |
| 5905 |
qtot = 0.; |
qtot = 0.; |
| 5971 |
if ( calib.ttime[s][b[s]+1] && calib.time[s][b[s]] ){ |
if ( calib.ttime[s][b[s]+1] && calib.time[s][b[s]] ){ |
| 5972 |
while ( etime > calib.time[s][b[s]] && calib.time[s][b[s]] != 0 ){ |
while ( etime > calib.time[s][b[s]] && calib.time[s][b[s]] != 0 ){ |
| 5973 |
printf(" CALORIMETER: \n" ); |
printf(" CALORIMETER: \n" ); |
| 5974 |
printf(" - Section %i, event at time %i while old calibration time limit at %i. Use new calibration at time %i -\n",s,etime,calib.time[s][b[s]],calib.ttime[s][b[s]+1]); |
printf(" - Section %i, event at time %u while old calibration time limit at %u. Use new calibration at time %u -\n",s,(UInt_t)etime,(UInt_t)calib.time[s][b[s]],(UInt_t)calib.ttime[s][b[s]+1]); |
| 5975 |
printf(" END CALORIMETER. \n\n" ); |
printf(" END CALORIMETER. \n\n" ); |
| 5976 |
b[s]++; |
b[s]++; |
| 5977 |
CaloPede(s); |
CaloPede(s); |
| 6276 |
for (Int_t d = 0; d<48; d++){ |
for (Int_t d = 0; d<48; d++){ |
| 6277 |
if ( calib.ttime[s][d] != 0 ) calibex++; |
if ( calib.ttime[s][d] != 0 ) calibex++; |
| 6278 |
if ( calib.time[s][0] != 0 ){ |
if ( calib.time[s][0] != 0 ){ |
| 6279 |
if ( d == 0 ) printf(" Section %i from time 0 to time %i use calibration at time %i \n",s,calib.time[s][d],calib.ttime[s][d]); |
if ( d == 0 ) printf(" Section %i from time 0 to time %u use calibration at time %u \n",s,calib.time[s][d],calib.ttime[s][d]); |
| 6280 |
if ( calib.time[s][d+1] != 0 ) { |
if ( calib.time[s][d+1] != 0 ) { |
| 6281 |
printf(" Section %i from time %i to time %i use calibration at time %i \n",s,calib.time[s][d],calib.time[s][d+1],calib.ttime[s][d+1]); |
printf(" Section %i from time %u to time %u use calibration at time %u \n",s,calib.time[s][d],calib.time[s][d+1],calib.ttime[s][d+1]); |
| 6282 |
} else { |
} else { |
| 6283 |
if ( !stop ){ |
if ( !stop ){ |
| 6284 |
printf(" Section %i from time %i use calibration at time %i \n",s,calib.time[s][d],calib.ttime[s][d+1]); |
printf(" Section %i from time %u use calibration at time %u \n",s,calib.time[s][d],calib.ttime[s][d+1]); |
| 6285 |
stop = 1; |
stop = 1; |
| 6286 |
}; |
}; |
| 6287 |
}; |
}; |
| 6288 |
} else { |
} else { |
| 6289 |
if ( calib.ttime[s][d] != 0 ) printf(" Section %i from time 0 use calibration at time %i \n",s,calib.ttime[s][d]); |
if ( calib.ttime[s][d] != 0 ) printf(" Section %i from time 0 use calibration at time %u \n",s,calib.ttime[s][d]); |
| 6290 |
}; |
}; |
| 6291 |
}; |
}; |
| 6292 |
printf("\n"); |
printf("\n"); |
| 6351 |
calib.ttime[s][inter] = 0; |
calib.ttime[s][inter] = 0; |
| 6352 |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
| 6353 |
//calib.ttime[s][inter] = cph->GetOrbitalTime(); |
//calib.ttime[s][inter] = cph->GetOrbitalTime(); |
| 6354 |
calib.ttime[s][inter] = cph->OrbitalTime; |
calib.ttime[s][inter] = (UInt_t)cph->OrbitalTime; |
| 6355 |
inter++; |
inter++; |
| 6356 |
} else { |
} else { |
| 6357 |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] != 0 ) { |
if ( ce->cstwerr[s] != 0 && ce->cperror[s] != 0 ) { |
| 6405 |
tr->GetEntry(ci); |
tr->GetEntry(ci); |
| 6406 |
cph = ceh->GetPscuHeader(); |
cph = ceh->GetPscuHeader(); |
| 6407 |
//if ( atime == cph->GetOrbitalTime()){ |
//if ( atime == cph->GetOrbitalTime()){ |
| 6408 |
if ( atime == cph->OrbitalTime){ |
if ( atime == (UInt_t)cph->OrbitalTime){ |
| 6409 |
// calib.iev = ce->iev; |
// calib.iev = ce->iev; |
| 6410 |
if (ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
if (ce->cstwerr[s] != 0 && ce->cperror[s] == 0 ) { |
| 6411 |
for ( Int_t d=0 ; d<11 ;d++ ){ |
for ( Int_t d=0 ; d<11 ;d++ ){ |