Changeset 3119


Ignore:
Timestamp:
02/12/04 16:01:03 (21 years ago)
Author:
jlopez
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/pointspreadfunction.C

    r3114 r3119  
    512512    gStyle->SetOptStat(00000000);
    513513
    514     c1 = new TCanvas("c1","Time evolution & distributions",0,0,1200,850);
     514//
     515// Find in the file name the date, run and project name to put it in the title
     516//
     517
     518    Size_t pos = fname.Last('/');
     519    TString iRun = TString(fname(pos+24,5));
     520    TString iYear = TString(fname(pos+4,4));
     521    TString iMonth = TString(fname(pos+9,2));
     522    TString iDay = TString(fname(pos+12,2));
     523
     524    TString iHour = TString(fname(pos+15,2));
     525    TString iMin = TString(fname(pos+18,2));
     526    TString iSec = TString(fname(pos+21,2));
     527
     528    Size_t poslast = fname.Last('.');
     529    Size_t posfirst = poslast-1;
     530    while (fname[posfirst] != '_')
     531        posfirst--;
     532
     533    TString iSource = TString(fname(posfirst+1,poslast-posfirst-1));
     534
     535   
     536    char str[100];
     537   
     538//    sprintf(str,"Date %s/%s/%s Run %s Source %s",iYear.Data(),iMonth.Data(),iDay.Data(),iRun.Data(),iSource.Data());
     539    sprintf(str,"Date %s/%s/%s   StartTime %s:%s:%s   Run %s   Source %s",iYear.Data(),iMonth.Data(),iDay.Data(),iHour.Data(),iMin.Data(),iSec.Data(),iRun.Data(),iSource.Data());
     540
     541    c1 = new TCanvas("c1",str,0,0,1200,850);
     542//    c1 = new TCanvas("c1","Time evolution & distributions",0,0,1200,850);
    515543    c1->Divide(3,2);
    516544
     
    541569    maxtime = time[math.LocMax(numLines,time)];
    542570
    543     TH2D *h1 = new TH2D("h1",fname,1,mintime-1,maxtime+1,1,minmean,maxmean);
     571    TH2D *h1 = new TH2D("h1","",1,mintime-1,maxtime+1,1,minmean,maxmean);
    544572    h1->GetXaxis()->SetTitle("Event number");
    545573    h1->GetYaxis()->SetTitle("mean position (deg)");
Note: See TracChangeset for help on using the changeset viewer.