Changeset 18204 for trunk/Mars


Ignore:
Timestamp:
06/15/15 00:01:36 (10 years ago)
Author:
Daniela Dorner
Message:
updated code to treat new files after 20130818
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/fact/processing/fillratescan.C

    r17102 r18204  
    4848Float_t GetOffset(TString fname, Double_t beg, Double_t end)
    4949{
    50     fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_DEVIATION");
     50    if (end < 15937)
     51        fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_DEVIATION");
     52    else
     53        fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_CALIBRATED_CURRENTS");
    5154
    5255    fits file(fname.Data());
     
    6164        return -100;
    6265
    63     if (!file.SetPtrAddress("DeltaUser", &delta))
    64         return -100;
     66    if (end < 15937)
     67    {
     68        if (!file.SetPtrAddress("DeltaUser", &delta))
     69            return -100;
     70    }
     71    else
     72    {
     73        if (!file.SetPtrAddress("U_nom", &delta))
     74            return -100;
     75    }
    6576
    6677    //cout << "Search for: " << beg-15773 << " " << end-15773 << endl;
     
    8091Float_t GetCurrent(TString fname, Double_t beg, Double_t end)
    8192{
    82     fname.ReplaceAll("RATE_SCAN_DATA", "CALIBRATED_CURRENTS");
    83     fname = gSystem->BaseName(fname.Data());
    84 
    85     fname.Prepend("/scratch_nfs/calibrated_currents/");
     93    fname.ReplaceAll("RATE_SCAN_DATA", "FEEDBACK_CALIBRATED_CURRENTS");
     94
     95    //the next two lines are needed for ISDC and data before 11.3.2013
     96    //fname.ReplaceAll("RATE_SCAN_DATA", "CALIBRATED_CURRENTS");
     97    //fname = gSystem->BaseName(fname.Data());
     98    //fname.Prepend("/scratch_nfs/calibrated_currents/");
    8699
    87100    fits file(fname.Data());
     
    326339        !file.SetPtrAddress(string(old ? "Data3" : "RelOnTime"), &ontime))
    327340        return -1;
    328     */
     341        */
    329342    Double_t  *ptime   = file.SetPtrAddress("Time");
    330343    ULong64_t *pid     = file.SetPtrAddress(old ? "Data0" : "Id");
Note: See TracChangeset for help on using the changeset viewer.