Changeset 8149


Ignore:
Timestamp:
10/23/06 15:39:30 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8144 r8149  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2006/10/23
     21
     22   * mbadpixels/MBadPixelsCam.cc:
     23     - optimized log-output
     24
     25   * mcalib/MCalibCalcFromPast.cc:
     26     - added some comments
     27
     28   * mcalib/MCalibrationChargeCalc.cc, mhcalib/MHCalibrationCam.cc,
     29     mcalib/MCalibrationChargePix.cc:
     30     - changed format of a lot of output
     31
     32   * mfbase/MFDataPhrase.cc:
     33     - added output of a newline in the constructor
     34
     35   * mhcalib/MHCalibrationChargeCam.cc:
     36     - count saturation only once (count the number of events not
     37       the total number of saturating slices)
     38     - changed format of a lot of output
     39
     40   * mhcalib/MHCalibrationPulseTimeCam.cc:
     41     - simple optimization to algorithm, do not consider pixels
     42       above saturation limit at all
     43
     44   * mbadpixels/MBadPixelsCam.[h,cc], mbadpixels/MBadPixelsIntensityCam.h:
     45     - removed the run-option from the ascii input files
     46     - allow merging a smaller into a larger camera
     47
     48   * mjobs/badpixels_0_559.rc:
     49     - adapted
     50
     51   * mdata/MDataPhrase.cc:
     52     - when checking for the matrices we have to start from the beginning
     53       of our phrase
     54
     55
     56
    2057 2006/10/23
    2158
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc

    r8147 r8149  
    150150        InitSize(n);
    151151
    152     if (n!=GetSize())
     152    if (GetSize()<n)
    153153    {
    154154        *fLog << warn << "MBadPixelsCam::Merge: Size mismatch (" << n << "," << GetSize() << ")... ignored." << endl;
     
    559559//
    560560// Read from an ascii file of the format:
    561 //    pixel1 pixel2 pixel3 pixel4
     561//    pixel1
     562//    pixel2
     563//    pixel3
     564//    pixel4
    562565// while pixel1,2,3,4 are the pixel indices used in the software.
    563566//
    564 // To read the pixels corresponding to a given run you can give run!=0
    565 // and a file of the format:
    566 //   1234: 17 193 292
    567 //   1235: 17 193 292 293
    568 //
    569 void MBadPixelsCam::AsciiRead(istream &fin, UInt_t run=0)
    570 {
    571 
    572     Int_t len;
     567void MBadPixelsCam::AsciiRead(istream &fin)
     568{
    573569    TString str;
    574570
     
    576572    {
    577573        str.ReadLine(fin);
    578 
    579         if (str.IsNull())
    580           {
    581             *fLog << warn << GetDescriptor()
    582                   << ": Cannot apply AsciiRead from istream pointer. "
    583                   << "Either file does not exist or file is empty! " << endl;
    584             return;
    585           }
    586 
    587         Int_t r;
    588 
    589         const Int_t n = sscanf(str.Data(), " %d : %n", &r, &len);
    590         if (n!=1)
    591             return;
    592 
    593         if (run==0 || run && (UInt_t)r==run)
     574        if (!fin)
    594575            break;
    595     }
    596 
    597     str.Remove(0, len);
    598 
    599     while (1)
    600     {
    601         Int_t idx;
    602         const Int_t n = sscanf(str.Data(), " %d %n", &idx, &len);
    603 
    604         if (n!=1)
    605             break;
    606 
    607         str.Remove(0, len);
     576
     577        if (str[0]=='#')
     578            continue;
     579
     580        const Int_t idx = str.Atoi();
    608581
    609582        if (idx>=GetSize())
     
    617590// --------------------------------------------------------------------------
    618591//
    619 // Write the information into an ascii file. If a run-number is given the
    620 // run-number will lead the line.
    621 //
    622 Bool_t MBadPixelsCam::AsciiWrite(ostream &fout, UInt_t run=0) const
    623 {
    624     if (run)
    625         fout << run << ":";
    626 
     592// Write the information into an ascii file.
     593//
     594Bool_t MBadPixelsCam::AsciiWrite(ostream &fout) const
     595{
    627596    for (int i=0; i<GetSize(); i++)
    628597        if ((*this)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    629             fout << " " << i;
    630 
    631     if (run && GetSize())
    632         fout << endl;
     598            fout << i << endl;
    633599
    634600    return kTRUE;
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h

    r7903 r8149  
    5050    Short_t GetNumMaxCluster(const MGeomCam &geom, Int_t aidx=-1) { return GetNumMaxCluster(MBadPixelsPix::kUnsuitableRun, geom, aidx); }
    5151
    52     void   AsciiRead(istream &fin, UInt_t run);
    53     void   AsciiRead(istream &fin) { AsciiRead(fin, 0); }
    54     Bool_t AsciiWrite(ostream &out, UInt_t run) const;
    55     Bool_t AsciiWrite(ostream &out) const { return AsciiWrite(out, 0); }
     52    void   AsciiRead(istream &fin);
     53    Bool_t AsciiWrite(ostream &out) const;
    5654
    5755    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h

    r8140 r8149  
    7171        { return GetCam()->GetNumMaxCluster(geom, aidx); }
    7272 
    73   void   AsciiRead(istream &fin, UInt_t run)
    74         { GetCam()->AsciiRead(fin,run); }
    75   void   AsciiRead(istream &fin)
    76         {GetCam()->AsciiRead(fin); }
    77   Bool_t AsciiWrite(ostream &out, UInt_t run)
    78         const { return GetCam()->AsciiWrite(out,run); }
    79   Bool_t AsciiWrite(ostream &out)
    80         const { return GetCam()->AsciiWrite(out); }
     73  void   AsciiRead(istream &fin) { GetCam()->AsciiRead(fin); }
     74  Bool_t AsciiWrite(ostream &out) const { return GetCam()->AsciiWrite(out); }
    8175 
    8276  // Inits
  • trunk/MagicSoft/Mars/mdata/MDataPhrase.cc

    r8091 r8149  
    282282    }
    283283
     284    p = 0;
     285
    284286    // Now check for matrix elemets as M[5]
    285287    reg = TPRegexp("\\w+\\[\\d+\\]");
  • trunk/MagicSoft/Mars/mjobs/badpixels_0_559.rc

    r6302 r8149  
    1 0: 0 559
     10
     2559
Note: See TracChangeset for help on using the changeset viewer.