Changeset 15008 for trunk/Mars/mcore


Ignore:
Timestamp:
03/10/13 11:59:47 (12 years ago)
Author:
tbretz
Message:
Added data mebers to store begin and end date of runs and drs calib; added reading and writing of these data-members.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/DrsCalib.h

    r14949 r15008  
    946946    uint16_t fNumTm; // Number of time marker channels in trgoff
    947947
     948    std::string fDateObs;
     949    std::string fDateRunObs[3];
     950    std::string fDateRunEnd[3];
     951    std::string fDateEnd;
     952
    948953//    uint16_t fDAC[8];
    949954
     
    955960        fNumGain(2000),
    956961        fNumTrgOff(1),
    957         fStep(0)
    958     {
     962        fStep(0),
     963        fDateObs("1970-01-01T00:00:00"),
     964        fDateEnd("1970-01-01T00:00:00")
     965    {
     966        for (int i=0; i<3; i++)
     967        {
     968            fDateRunBeg[i] = "1970-01-01T00:00:00";
     969            fDateRunEnd[i] = "1970-01-01T00:00:00";
     970        }
    959971    }
    960972
     
    972984
    973985        fStep = 0;
     986
     987        fDateObs = "1970-01-01T00:00:00";
     988        fDateEnd = "1970-01-01T00:00:00";
     989
     990        for (int i=0; i<3; i++)
     991        {
     992            fDateRunBeg[i] = "1970-01-01T00:00:00";
     993            fDateRunEnd[i] = "1970-01-01T00:00:00";
     994        }
    974995    }
    975996
     
    10151036        fRoi       = file.GetUInt("NROI");
    10161037        fNumTm     = file.HasKey("NTM") ? file.GetUInt("NTM") : 0;
     1038
     1039        fDateObs   = file.GetStr("DATE-OBS");
     1040        fDateEnd   = file.GetStr("DATE-END");
     1041
     1042        fDateRunBeg[0]= file.GetStr("RUN0-BEG");
     1043        fDateRunBeg[1]= file.GetStr("RUN1-BEG");
     1044        fDateRunBeg[2]= file.GetStr("RUN2-BEG");
     1045        fDateRunEnd[0]= file.GetStr("RUN0-END");
     1046        fDateRunEnd[1]= file.GetStr("RUN1-END");
     1047        fDateRunEnd[2]= file.GetStr("RUN2-END");
    10171048/*
    10181049        fDAC[0]    = file.GetUInt("DAC_A");
     
    11481179        DataWriteFits2::WriteDefaultKeys(file);
    11491180#endif
     1181        file.SetStr("DATE-OBS", fDateObs, "First event of whole DRS calibration");
     1182        file.SetStr("DATE-END", fDateEnd, "Last event of whole DRS calibration");
     1183        file.SetStr("RUN0-BEG", fDateRunBeg[0], "First event of run 0");
     1184        file.SetStr("RUN1-BEG", fDateRunBeg[1], "First event of run 1");
     1185        file.SetStr("RUN2-BEG", fDateRunBeg[2], "First event of run 2");
     1186        file.SetStr("RUN0-END", fDateRunEnd[0], "Last event of run 0");
     1187        file.SetStr("RUN1-END", fDateRunEnd[1], "Last event of run 1");
     1188        file.SetStr("RUN2-END", fDateRunEnd[2], "Last event of run 2");
     1189
    11501190        file.SetInt("STEP", fStep, "");
    11511191
Note: See TracChangeset for help on using the changeset viewer.