Changeset 18205


Ignore:
Timestamp:
06/15/15 00:02:22 (9 years ago)
Author:
Daniela Dorner
Message:
added information and example ratescan to the plot
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/fact/plots/plotratescan.C

    r15243 r18205  
    129129{
    130130    TString query;
    131     query += "SELECT fTimeBegin, fTimeEnd, fVoltageIsOn, fOvervoltage, fCurrentMedMean, fNight ";
     131    query += "SELECT fTimeBegin, fTimeEnd, fVoltageIsOn, fOvervoltage, fCurrentMedMean, fNight, fAzMin, fAzMax, fZdMin, fZdMax ";
    132132    query += "FROM Ratescan WHERE fRatescanID=";
    133133    query += search_id;
     
    149149    const char *time_end = (*row)[1];
    150150    const char *night    = (*row)[5];
     151    const char *az_beg = (*row)[6];
     152    const char *az_end = (*row)[7];
     153    const char *zd_beg = (*row)[8];
     154    const char *zd_end = (*row)[9];
    151155
    152156    int   voltage_on  = (*row)[2] ? atoi((*row)[2]) :   -1;
     
    167171    leg.SetBorderSize(1);
    168172    leg.SetFillColor(kWhite);
    169     leg.AddText("Ratescan");
    170     leg.AddText("");
    171     leg.AddText(Form("Begin    %s", time_beg));
    172     leg.AddText(Form("End       %s", time_end));
    173     leg.AddText("");
     173    leg.SetTextAlign(12);
     174    leg.AddText(Form("Ratescan %d ", search_id));
     175    //leg.AddText("");
     176    leg.AddText(Form("Begin       %s", time_beg));
     177    leg.AddText(Form("End          %s", time_end));
     178    leg.AddText(Form("Az            %s#circ to %s#circ", az_beg, az_end));
     179    leg.AddText(Form("Zd             %s#circ to %s#circ", zd_beg, zd_end));
     180    //leg.AddText("");
    174181    if (voltage_on==0)
    175182        leg.AddText("Voltage off");
     
    179186            leg.AddText(Form("Current     <I_{med}>  =  %.1f #muA", current));
    180187        if (overvoltage>-70)
    181             leg.AddText(Form("Voltage         #DeltaU  =  %+.2f V", overvoltage));
     188            leg.AddText(Form("Voltage   #DeltaU  =  %+.2f V", overvoltage));
    182189    }
    183190
     
    209216    g.DrawClone("PL");
    210217
     218    TGraph gr("good_ratescan_edit.txt", "%lg %lg");
     219    gr.SetLineColor(12);
     220    gr.DrawClone("L");
     221
    211222    c->Write();
    212223
     
    216227    name += time_beg;
    217228
    218     c->SaveAs(name+".pdf");
    219     c->SaveAs(name+".eps");
    220     c->SaveAs(name+".png");
     229    //c->SaveAs(name+".pdf");
     230    //c->SaveAs(name+".eps");
     231    //c->SaveAs("/loc_data/analysis/"+name+".png");
     232    c->SaveAs(Form("/loc_data/analysis/ratescans/%04d/%02d/%02d/%06d_%d.png", atoi(night)/10000, (atoi(night)/100)%100, atoi(night)%100, atoi(night), search_id));
    221233
    222234    delete c;
     
    305317
    306318    TString oname = Form("%06d-ratescan.root", night);
    307 
    308     cout << "   " << oname << '\n' << endl;
    309 
     319    //cout << "   " << oname << '\n' << endl;
    310320    TFile rootfile(oname.Data(), "recreate");
    311321
Note: See TracChangeset for help on using the changeset viewer.