267 fHeaderImage->Zoom( 161, 649, 635, 174 );
272 fHeaderImage->Zoom( 600, 324, 164, 473 );
282 if ( !
gEvent ) { fBesHeader->AddText(
"No Event Info" ); }
286 Double_t coordx = fCoordx;
287 Double_t coordy = fCoordy;
290 Long64_t runno =
gEvent->GetRun();
291 Long64_t eventno =
gEvent->GetEvent();
292 Int_t year =
gEvent->GetYear();
293 Int_t month =
gEvent->GetMonth();
294 Int_t day =
gEvent->GetDay();
295 Int_t hour =
gEvent->GetHour();
297 Int_t sec =
gEvent->GetSec();
311 sprintf( title1,
"Run %ld ", runno );
312 TText* ttitle1 = fBesHeader->AddText( coordx, coordy, title1 );
313 ttitle1->SetTextSize( fTextSizeTitle );
314 ttitle1->SetTextColor( 1 );
315 ttitle1->SetTextAlign( 12 );
329 sprintf( title2,
"Event %ld ", eventno );
330 TText* ttitle2 = fBesHeader->AddText( coordx, coordy, title2 );
331 ttitle2->SetTextSize( fTextSizeTitle );
332 ttitle2->SetTextColor( 1 );
333 ttitle2->SetTextAlign( 12 );
346 char titleEvTime[30];
349 if (
gEvent->GetHeader().GetEventRec() )
351 if ( fabs(
gEvent->GetHeader().GetEvTime() ) > 0.0001 )
353 double esTimeConst = 230;
354 sprintf( titleEvTime,
"Estime:%5.1fns",
355 gEvent->GetHeader().GetEvTime() - esTimeConst );
357 else sprintf( titleEvTime,
"Estime:0 ns" );
359 else sprintf( titleEvTime,
"Estime: -" );
361 TText* ttitleEvTime = fBesHeader->AddText( coordx, coordy, titleEvTime );
362 ttitleEvTime->SetTextSize( fTextSizeTime );
363 ttitleEvTime->SetTextFont( 52 );
364 ttitleEvTime->SetTextColor( 1 );
365 ttitleEvTime->SetTextAlign( 12 );
378 char titleEvTimeStat[30];
381 if (
gEvent->GetHeader().GetEventRec() )
382 {
sprintf( titleEvTimeStat,
" stat:%3d",
gEvent->GetHeader().GetEvTimeStatus() ); }
383 else sprintf( titleEvTimeStat,
" stat: -" );
385 TText* ttitleEvTimeStat = fBesHeader->AddText( coordx, coordy, titleEvTimeStat );
386 ttitleEvTimeStat->SetTextSize( fTextSizeTime );
387 ttitleEvTimeStat->SetTextFont( 52 );
388 ttitleEvTimeStat->SetTextColor( 1 );
389 ttitleEvTimeStat->SetTextAlign( 12 );
402 char titleEvTimeQ[30];
405 if (
gEvent->GetHeader().GetEventRec() )
406 {
sprintf( titleEvTimeQ,
" quality:%3.1f",
gEvent->GetHeader().GetEvTimeQuality() ); }
407 else sprintf( titleEvTimeQ,
" quality: -" );
409 TText* ttitleEvTimeQ = fBesHeader->AddText( coordx, coordy, titleEvTimeQ );
410 ttitleEvTimeQ->SetTextSize( fTextSizeTime );
411 ttitleEvTimeQ->SetTextFont( 52 );
412 ttitleEvTimeQ->SetTextColor( 1 );
413 ttitleEvTimeQ->SetTextAlign( 12 );
427 sprintf( date,
"date: %4d-%02d-%02d ", year, month, day );
428 TText* tdate = fBesHeader->AddText( coordx, coordy, date );
429 tdate->SetTextSize( fTextSizeTime );
430 tdate->SetTextFont( 52 );
431 tdate->SetTextColor( 1 );
432 tdate->SetTextAlign( 12 );
447 TText* ttime = fBesHeader->AddText( coordx, coordy,
time );
448 ttime->SetTextSize( fTextSizeTime );
449 ttime->SetTextFont( 52 );
450 ttime->SetTextColor( 1 );
451 ttime->SetTextAlign( 12 );
455 vector<TString> statusCon;
460 statusCon.push_back( TString(
data ) );
462 vector<Int_t> trigChannelVector =
gEvent->GetHeader().GetTrigChannelVector();
463 vector<Int_t> trigConditionVector =
gEvent->GetHeader().GetTrigConditionVector();
464 Int_t timeType =
gEvent->GetHeader().GetTimeType();
467 statusCon.push_back( TString(
data ) );
478 for ( Int_t i = 0; i < (Int_t)statusCon.size(); i++ )
480 TText* ttitle = fBesHeader->AddText( coordx, coordy, statusCon[i].Data() );
483 ttitle->SetTextSize( fTextSizeData );
484 ttitle->SetTextFont( 62 );
485 ttitle->SetTextColor( 1 );
486 ttitle->SetTextAlign( 12 );
488 vector<TString> infoCon;
490 vector<Int_t>::iterator pTrigVector;
596 Float_t textSize = fTextSizeData;
613 pTrigVector = trigChannelVector.begin();
614 for ( Int_t i = 0; i < (Int_t)infoCon.size(); i++ )
616 coordx = fCoordx + ( i % npr ) * ( 1.0 / npr );
617 coordy = fCoordy - ( i / npr ) * rowH;
619 if ( *pTrigVector == i )
621 TString temp = infoCon[i] +
" ON";
622 TText* tdata = fBesHeader->AddText( coordx, coordy, temp.Data() );
623 tdata->SetTextSize( textSize );
624 tdata->SetTextFont( 62 );
625 tdata->SetTextColor( 2 );
626 tdata->SetTextAlign( 12 );
631 TString temp = infoCon[i] +
" OFF";
632 TText* tdata = fBesHeader->AddText( coordx, coordy, temp.Data() );
633 tdata->SetTextSize( textSize );
634 tdata->SetTextFont( 62 );
635 tdata->SetTextColor( 1 );
636 tdata->SetTextAlign( 12 );
641 fBesHeader->Draw(
"same" );
643 fPadHeader->SetEditable( kFALSE );
644 fPadHeader->Modified();
645 fPadHeader->Update();
684 Double_t xlowH = 0.09, xupH = 0.1, ylowH = 0.09, yupH = 0.1;
685 Int_t width = fCanvas->GetWw();
686 Int_t height = fCanvas->GetWh();
687 Double_t hVSw = Double_t( height ) / width;
688 Double_t x2D = 1.0 - hVSw;
690 Double_t y2D = 0.5 / hVSw;
691 Double_t x3D = ( 1.0 / 3 ) / hVSw;
693 switch ( fDisplayMode )
696 fPadHeader->SetPad( 0.0, y2D, 1.0, 1.0 );
697 fPadXY->SetPad( 0.0, 0.0, 0.5, y2D );
698 fPadZR->SetPad( 0.5, 0.0, 1.0, y2D );
699 fPad3D->SetPad( xlowH, ylowH, xupH, yupH );
702 fPadHeader->SetPad( 0.0, 0.0, x2D, 1.0 );
703 fPadXY->SetPad( x2D, 0.0, 1.0, 1.0 );
704 fPadZR->SetPad( xlowH, ylowH, xupH, yupH );
705 fPad3D->SetPad( xlowH, ylowH, xupH, yupH );
708 fPadHeader->SetPad( 0.0, 0.0, x2D, 1.0 );
709 fPadXY->SetPad( xlowH, ylowH, xupH, yupH );
710 fPadZR->SetPad( x2D, 0.0, 1.0, 1.0 );
711 fPad3D->SetPad( xlowH, ylowH, xupH, yupH );
714 fPadHeader->SetPad( 0.0, 0.0, x2D, 1.0 );
715 fPadXY->SetPad( xlowH, ylowH, xupH, yupH );
716 fPadZR->SetPad( xlowH, ylowH, xupH, yupH );
717 fPad3D->SetPad( x2D, 0.0, 1.0, 1.0 );
721 fPadHeader->SetPad( 0.0, 2 * x3D, 1.0, 1.0 );
722 fPadXY->SetPad( 0.0, x3D, 1.0 / 3, 2 * x3D );
723 fPadZR->SetPad( 0.0, 0.0, 1.0 / 3, x3D );
724 fPad3D->SetPad( 1.0 / 3, 0.0, 1.0, 2 * x3D );
730 if ( !fVisHeader ) fPadHeader->SetPad( xlowH * 10, ylowH * 10, xupH * 10, yupH * 10 );
735 switch ( fDisplayMode )
1290 int layer[135] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1291 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30,
1292 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 42, 0, 1, 2, 3,
1293 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1294 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1295 37, 38, 39, 40, 41, 42, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
1296 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1297 28, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42 };
1298 int replica[135] = {
1299 12, 13, 14, 17, 19, 23, 25, 25, 25, 26, 29, 30, 33, 34, 38, 38, 44,
1300 44, 48, 48, 49, 51, 52, 51, 52, 52, 62, 63, 63, 63, 68, 68, 69, 68,
1301 69, 79, 80, 79, 80, 91, 91, 91, 92, 103, 103, 104, 103, 4, 7, 9, 4,
1302 9, 4, 9, 9, 8, 8, 55, 56, 63, 64, 71, 71, 82, 82, 89, 90, 99,
1303 100, 99, 100, 120, 120, 120, 120, 130, 131, 130, 131, 151, 151, 151, 151, 166, 166,
1304 167, 166, 167, 187, 188, 188, 7, 9, 9, 12, 13, 15, 16, 17, 17, 17, 20,
1305 20, 22, 23, 25, 26, 29, 30, 32, 33, 34, 35, 34, 35, 42, 42, 42, 42,
1306 45, 46, 46, 46, 46, 53, 54, 53, 54, 61, 62, 61, 62, 69, 70, 70 };
1308 for (
int i = 0; i < 135; i++ )
1310 fMdcROOTGeo->GetPhysicalReplica( layer[i], replica[i] )->SetVisibility( 1 );
1311 if ( layer[i] > 35 )
1312 fMdcROOTGeo->GetPhysicalReplica( layer[i] + 7, replica[i] )->SetVisibility( 1 );
1313 std::cout << layer[i] <<
" " << replica[i] << std::endl;
1334 int theta[26] = { 3, 3, 2, 9, 9, 8, 5, 7, 6, 10, 10, 7, 8,
1335 9, 9, 9, 37, 2, 7, 7, 4, 4, 5, 5, 15, 15 };
1336 int phi[26] = { 45, 46, 46, 80, 81, 80, 83, 81, 81, 81, 80, 80, 81,
1337 82, 83, 84, 17, 84, 77, 78, 79, 80, 80, 79, 31, 32 };
1339 for (
int i = 0; i < 26; i++ )
1341 fEmcROOTGeo->GetPhysicalCrystal( 1, phi[i], theta[i] )->SetVisibility( 1 );
1343 <<
" " << phi[i] <<
" " << theta[i] << std::endl;