Changeset 2984


Ignore:
Timestamp:
01/30/04 14:55:59 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2983 r2984  
    1818       calibrated pixel information.
    1919
     20
     21
    2022 2004/01/30: Thomas Bretz
    2123 
     
    2628     - added a dynamic_cast from MParContainer to MCamEvent to get the
    2729       correct pointer to the correct base-class.
     30
     31   * mbase/MStatusDisplay.cc:
     32     - In EventInfo check whether gPad==0
     33     
     34   * mfileio/MReadMarsFile.cc:
     35     - removed reading RunHeaders from PreProcess, this resulted
     36       in strange behaviour of writing RunHeaders
     37     - fixed consistency check for RunType accordingly
     38
     39   * mfilter/MFilterList.cc:
     40     - do not skip adding filter if only a filter with the same name
     41       exists
     42       
     43   * mraw/MRawFileRead.cc:
     44     - added an output message if run header is not accessible
     45     
     46   * mraw/MRawRunHeader.[h,cc]:
     47     - initialize fRunType to new enum kRTNone
    2848
    2949
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r2899 r2984  
    532532    if (gROOT->IsBatch())
    533533        return;
     534
    534535    fStatusBar->SetText(txt, 1);
    535536
     
    816817        return;
    817818
    818     TCanvas *c = (TCanvas *)gTQSender;
     819    TCanvas *c = (TCanvas*)gTQSender;
    819820
    820821    TVirtualPad* save=gPad;
    821822
    822     gPad = c->GetSelectedPad();
    823 
    824     SetStatusLine2(selected->GetObjectInfo(px,py));
     823    gPad = c ? c->GetSelectedPad() : NULL;
     824
     825    if (gPad)
     826        SetStatusLine2(selected->GetObjectInfo(px,py));
    825827
    826828    gPad=save;
  • trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc

    r2607 r2984  
    124124Bool_t MReadMarsFile::Notify()
    125125{
    126     Int_t runtype = -1;
     126    UInt_t runtype = 0xffff;
    127127
    128128    const MRawRunHeader *rawheader = (MRawRunHeader*)fParList->FindObject("MRawRunHeader");
     
    145145    if (!MReadTree::Notify())
    146146        return kFALSE;
     147
     148    if (rawheader && runtype!=0xffff && runtype != rawheader->GetRunType())
     149    {
     150        *fLog << warn << "Warning - You are mixing files with different run types (";
     151        *fLog << runtype << ", " << rawheader->GetRunType() << ")" << endl;
     152    }
    147153
    148154    if (fDisplay)
     
    152158        txt += GetNumEntry()-1;
    153159        fDisplay->SetStatusLine2(txt);
    154     }
    155 
    156     if (rawheader)
    157     {
    158         if (runtype != rawheader->GetRunType())
    159             *fLog << warn << "Warning - You are mixing files with different run types!" << endl;
    160160    }
    161161
     
    209209    }
    210210
     211    /*
    211212    const Int_t idx = GetFileIndex();
    212213    fRun->SetEventNum(idx<0?0:idx); // Assumption: One Entry per File!
     
    216217        return kFALSE;
    217218    }
    218 
     219    */
    219220    return MReadTree::PreProcess(pList);
    220221}
  • trunk/MagicSoft/Mars/mfilter/MFilterList.cc

    r2583 r2984  
    188188
    189189    if (fFilters.FindObject(name))
    190     {
    191190        *fLog << warn << dbginf << "'" << name << "' exists in List already... skipped." << endl;
    192         return kTRUE;
    193     }
    194191
    195192    *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r2748 r2984  
    149149    //
    150150    fRawRunHeader->ReadEvt(*fIn);
     151    if (!(*fIn))
     152    {
     153        *fLog << err << "Error: Accessing file '" << fFileName << "'" << endl;
     154        return kFALSE;
     155    }
     156    if (fRawRunHeader->GetMagicNumber()!=kMagicNumber)
     157        return kFALSE;
     158
    151159    fRawRunHeader->Print();
    152 
    153     if (fRawRunHeader->GetMagicNumber()!=kMagicNumber)
    154         return kFALSE;
    155160
    156161    *fRawEvtTime = fRawRunHeader->GetRunStart();
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r2775 r2984  
    7575    fFormatVersion=0;
    7676    fSoftVersion=0;
    77     fRunType=0;
     77    fRunType=kRTNone;  // use 0xffff for invalidation, 0 means: Data run
    7878    fRunNumber=0;
    7979    fProjectName[0]=0;
     
    184184    case kRTMonteCarlo:
    185185        return "Monte Carlo";
     186    case kRTNone:
     187        return "<none>";
    186188    default:
    187189        return "<unknown>";
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.h

    r2775 r2984  
    2424//
    2525enum {
    26     kRTData        = 0,
    27     kRTPedestal    = 1,
    28     kRTCalibration = 2,
    29     kRTMonteCarlo  = 256
     26    kRTData        = 0x0000,
     27    kRTPedestal    = 0x0001,
     28    kRTCalibration = 0x0002,
     29    kRTMonteCarlo  = 0x0100,
     30    kRTNone        = 0xffff
    3031};
    3132
Note: See TracChangeset for help on using the changeset viewer.