Ignore:
Timestamp:
02/16/04 11:18:25 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mraw
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc

    r2645 r3183  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     18!   Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2001
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
  • trunk/MagicSoft/Mars/mraw/MRawCrateData.cc

    r2748 r3183  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     18!   Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2001
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r3047 r3183  
    1818!   Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc

    r3139 r3183  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2001
     18!   Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
  • trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc

    r3018 r3183  
    1919!   Author(s): Markus Gaus 10/2002 <mailto:markus@ifae.es>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2002
     21!   Copyright: MAGIC Software Development, 2000-2004
    2222!
    2323!
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r2984 r3183  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2001
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    148148    // Read RUN HEADER (see specification) from input stream
    149149    //
    150     fRawRunHeader->ReadEvt(*fIn);
     150    if (!fRawRunHeader->ReadEvt(*fIn))
     151        return kFALSE;
     152
    151153    if (!(*fIn))
    152154    {
     
    154156        return kFALSE;
    155157    }
    156     if (fRawRunHeader->GetMagicNumber()!=kMagicNumber)
    157         return kFALSE;
     158    //if (fRawRunHeader->GetMagicNumber()!=kMagicNumber)
     159    //    return kFALSE;
    158160
    159161    fRawRunHeader->Print();
  • trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc

    r2556 r3183  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2001
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
  • trunk/MagicSoft/Mars/mraw/MRawRead.cc

    r3139 r3183  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2001
     18!   Author(s): Thomas Bretz 10/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r3047 r3183  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2001
     18!   Author(s): Thomas Bretz 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    101101// Read in one run header from the binary file
    102102//
    103 void MRawRunHeader::ReadEvt(istream& fin)
     103Bool_t MRawRunHeader::ReadEvt(istream& fin)
    104104{
    105105    //
     
    116116    {
    117117        *fLog << err << "Error: Wrong Magic Number (0x" << hex << fMagicNumber << "): Not a Magic File!" << endl;
    118         return;
     118        return kFALSE;
    119119    }
    120120
     
    125125
    126126    fin.read((char*)&fFormatVersion,    2);     // Total=4
    127     if (fFormatVersion>2)
    128         *fLog << warn << "WARNING - Format version V" << fFormatVersion << " unknown!" << endl;
     127    if (fFormatVersion>kMaxFormatVersion)
     128    {
     129        *fLog << err << "WARNING - File vormat V" << fFormatVersion << " not implemented!" << endl;
     130        return kFALSE;
     131    }
    129132
    130133    fin.read((char*)&fSoftVersion,      2);     // Total=6
     
    165168    fin.read((char*)fPixAssignment->GetArray(), nPixel*2);
    166169    fin.read((char*)&dummy, 16);
     170
     171    return kTRUE;
    167172}
    168173
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.h

    r3047 r3183  
    1717// Magic number to detect the magic file type
    1818//
    19 const UShort_t kMagicNumber = 0xc0c0;
     19const UShort_t kMagicNumber      = 0xc0c0;
     20const Byte_t   kMaxFormatVersion =      3;
    2021
    2122//
     
    106107    void Print(Option_t *t=NULL) const;
    107108
    108     void ReadEvt(istream& fin);
     109    Bool_t ReadEvt(istream& fin);
    109110
    110111    ClassDef(MRawRunHeader, 2)  // storage container for general info
  • trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc

    r2748 r3183  
    1818!   Author(s): Thomas Bretz, 10/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    220220    //
    221221    fLog->SetNullOutput();
    222     fRawRunHeader->ReadEvt(*fIn);
     222    const Bool_t rc = fRawRunHeader->ReadEvt(*fIn);
    223223    fLog->SetNullOutput(kFALSE);
    224224
    225     if (fRawRunHeader->GetMagicNumber()!=kMagicNumber && fRawRunHeader->GetMagicNumber()!=kMagicNumber+1)
    226     {
    227         *fLog << err << "Error: Wrong Magic Number (0x" << hex << fRawRunHeader->GetMagicNumber() << "): Not a Magic File!" << endl;
    228         return kFALSE;
    229     }
     225    if (!rc)
     226        return kFALSE;
    230227
    231228    if (fRunNumber!=fRawRunHeader->GetRunNumber())
Note: See TracChangeset for help on using the changeset viewer.