Changeset 18156


Ignore:
Timestamp:
02/19/15 10:38:52 (10 years ago)
Author:
tbretz
Message:
Added Reset to DrsCalibrateTime and removed the reading and writing of fits files. It is now in MDrsCalibrationTime. If needed, it must be made conistent, e.g. diffferent table name.
File:
1 edited

Legend:

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

    r18143 r18156  
    964964
    965965        fStat.resize(samples*channels);
     966    }
     967
     968    void Reset()
     969    {
     970        for (auto it=fStat.begin(); it!=fStat.end(); it++)
     971        {
     972            it->first = 0;
     973            it->second = 0;
     974        }
    966975    }
    967976
     
    11441153                const double valw = it->second;
    11451154
    1146                 it->first = sumv>0 ? n*(1-s*sumw/sumv) : 0;
     1155                it->first  = sumv>0 ? n*(1-s*sumw/sumv) : 0;
    11471156
    11481157                sumv += valv;
     
    11631172                sumw += valw;
    11641173
    1165                 it->first = sumv>0 ? n*(s*sumw/sumv-1) : 0;
     1174                it->first  = sumv>0 ? n*(s*sumw/sumv-1) : 0;
    11661175            }
    11671176
     
    11981207    }
    11991208
     1209    /*
     1210    // See MDrsCalibrationTime
    12001211    std::string ReadFitsImp(const std::string &str)
    12011212    {
     
    12751286            file.SetInt("NIGHT", night, "Night as int");
    12761287
    1277         /*
    1278         file.SetStr("DATE-OBS", fDateObs, "First event of whole DRS calibration");
    1279         file.SetStr("DATE-END", fDateEnd, "Last event of whole DRS calibration");
    1280         file.SetStr("RUN-BEG", fDateRunBeg[0], "First event of run 0");
    1281         file.SetStr("RUN-END", fDateRunEnd[0], "Last event of run 0");
    1282         */
    1283 
    12841288        std::vector<double> data(fNumSamples*fNumChannels*2);
    12851289
     
    12981302
    12991303        return std::string();
    1300     }
     1304    }*/
    13011305};
    13021306
Note: See TracChangeset for help on using the changeset viewer.