Changeset 2461 for trunk/MagicSoft


Ignore:
Timestamp:
11/03/03 18:08:26 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2460 r2461  
    1414       workaround for thread safty by the more correct check
    1515       whether we are running in the main Thread (TThread::Self())
     16     - added double-cast to TProgressBar::SetPosition
    1617       
    1718   * mbase/MTask.h:
     
    3940       because 'more' also counts the ANSI color codes to determin
    4041       the line-length)
     42
     43   * mhistmc/MHMcCollectionArea.cc:
     44     - added UseCurrentStyle such that the axis labels are displayed
    4145
    4246   * mbase/MTime.[h,cc]:
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r2173 r2461  
    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-2003
    2121!
    2222!
     
    2424
    2525/////////////////////////////////////////////////////////////////////////////
    26 //                                                                         //
    27 // MTime                                                                   //
    28 //                                                                         //
    29 // A generalized MARS time stamp                                           //
    30 //                                                                         //
     26//
     27// MTime
     28//
     29// A generalized MARS time stamp
     30//
     31//
     32// Version 1:
     33// ----------
     34//  - first version
     35//
     36// Version 2:
     37// ----------
     38//  - removed fTimeStamp[2]
     39//
    3140/////////////////////////////////////////////////////////////////////////////
    32 
    3341#include "MTime.h"
    3442
     
    4351void MTime::Print(Option_t *) const
    4452{
    45     fLog->setf(ios::showbase);
    46     *fLog << "MTime Information:  " << hex
    47         << " " << setfill('0') << setw(2) << fTimeStamp[0]
    48         << " " << setfill('0') << setw(2) << fTimeStamp[1] << endl << endl;
     53    *fLog << GetDescriptor() << ": " << dec;
     54    *fLog << setfill('0') << setw(2) << (int)fHour << ":";
     55    *fLog << setfill('0') << setw(2) << (int)fMin  << ":";
     56    *fLog << setfill('0') << setw(2) << (int)fSec  << ".";
     57    *fLog << setfill('0') << setw(9) << fNanoSec << endl;
    4958}
    50 
  • trunk/MagicSoft/Mars/mbase/MTime.h

    r2438 r2461  
    1717{
    1818private:
    19     UInt_t   fTimeStamp[2]; // type of raw event which should be processed by this task
     19    //UInt_t   fTimeStamp[2]; // type of raw event which should be processed by this task
    2020    UInt_t   fDuration;     // time of validity
    2121
     
    3131        fTitle = title;
    3232
    33         SetTime(0, 0);
     33        SetTime((ULong_t)0);
    3434    }
    3535
    36     MTime(UInt_t t1, UInt_t t0)
    37     {
    38         SetTime(t1, t0);
    39     }
    40 
    41     MTime(MTime& t)
    42     {
    43         fTimeStamp[0] = t.fTimeStamp[0];
    44         fTimeStamp[1] = t.fTimeStamp[1];
    45         fDuration = t.fDuration;
    46     }
     36    MTime(MTime& t) { *this = t; }
    4737
    4838    void operator=(MTime &t)
    4939    {
    50         fTimeStamp[0] = t.fTimeStamp[0];
    51         fTimeStamp[1] = t.fTimeStamp[1];
    5240        fDuration = t.fDuration;
     41        fHour     = t.fHour;
     42        fMin      = t.fMin;
     43        fSec      = t.fSec;
     44        fNanoSec  = t.fNanoSec;
    5345    }
    5446
    55     ~MTime() {}
    56 
    5747    void Print(Option_t *t=NULL) const;
    58 
    59     void SetTime(UInt_t t1, UInt_t t0)
    60     {
    61         fTimeStamp[0] = t1;
    62         fTimeStamp[1] = t0;
    63     }
    6448
    6549    void SetCT1Time(UInt_t t1, UInt_t t0)
     
    117101    }
    118102
    119     UInt_t GetTimeLo()
    120     {
    121         return fTimeStamp[0];
    122     }
    123     UInt_t GetTimeHi()
    124     {
    125         return fTimeStamp[1];
    126     }
    127 
    128103    UInt_t GetDuration()
    129104    {
     
    140115    }
    141116
    142     ClassDef(MTime, 1)  //A generalized MARS time stamp
     117    ClassDef(MTime, 2)  //A generalized MARS time stamp
    143118};
    144119
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc

    r2367 r2461  
    905905    //  int   isecs_since_midday; // seconds passed since midday before sunset (JD of run start)
    906906    //  int   isecfrac_200ns;     // fractional part of isecs_since_midday
    907     fTime->SetTime(event.isecfrac_200ns, event.isecs_since_midday);
     907    fTime->SetCT1Time(event.isecfrac_200ns, event.isecs_since_midday);
    908908    fTime->SetDuration((Int_t)fRawRunHeader->GetMJD());
    909909    fTime->SetReadyToSave();
  • trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc

    r2173 r2461  
    117117    MHillasSrc &hil = *(MHillasSrc*)par;
    118118
    119     fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(), 0.0001*fTime->GetTimeLo(), w);
     119    fHist.Fill(fabs(hil.GetAlpha()), fEnergy->GetEnergy(), *fTime, w);
    120120    return kTRUE;
    121121}
  • trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc

    r2173 r2461  
    104104    const MMcEvt &mcevt = *(MMcEvt*)par;
    105105
    106     fHist.Fill(mcevt.GetEnergy(), 0.0001*fTime->GetTimeLo(), w);
     106    fHist.Fill(mcevt.GetEnergy(), *fTime, w);
    107107
    108108    return kTRUE;
  • trunk/MagicSoft/Mars/mhist/MHThetabarTime.cc

    r2173 r2461  
    6363    fHist.SetDirectory(NULL);
    6464
    65     fHist.SetXTitle("time [s]");
     65    fHist.SetXTitle("t [s]");
    6666    fHist.SetYTitle("\\bar{\\Theta} [ \\circ]");
    6767}
     
    122122Bool_t MHThetabarTime::Fill(const MParContainer *par, const Stat_t w)
    123123{
    124     const Int_t time = fTime->GetTimeLo();
    125 
    126     fHist.Fill(0.0001*time, fMcEvt->GetTheta()*kRad2Deg, w);
     124    fHist.Fill(*fTime, fMcEvt->GetTheta()*kRad2Deg, w);
    127125
    128126    return kTRUE;
  • trunk/MagicSoft/Mars/mhist/MHTimeDiffTheta.cc

    r2173 r2461  
    146146Bool_t MHTimeDiffTheta::Fill(const MParContainer *par, const Stat_t w)
    147147{
    148     const Double_t time = 200e-9*fTime->GetTimeLo() + fTime->GetTimeHi();
     148    const Double_t time = *fTime;
    149149
    150150    fHist.Fill(time-fLastTime, fMcEvt->GetTelescopeTheta()*kRad2Deg, w);
  • trunk/MagicSoft/Mars/mhist/MHTimeDiffTime.cc

    r2173 r2461  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz    1/2002 <mailto:tbretz@uni-sw.gwdg.de>
     18!   Author(s): Thomas Bretz    1/2002 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!   Author(s): Wolfgang Wittek 1/2002 <mailto:wittek@mppmu.mpg.de>
    2020!
     
    2525
    2626//////////////////////////////////////////////////////////////////////////////
    27 //                                                                          //
    28 //  MHTimeDiffTime                                                          //
    29 //                                                                          //
    30 //  calculates the 2D-histogram   time-difference vs. time                  //
    31 //                                                                          //
    32 //                                                                          //
     27//
     28//  MHTimeDiffTime
     29//
     30//  calculates the 2D-histogram   time-difference vs. time
     31//
     32//
    3333//////////////////////////////////////////////////////////////////////////////
    34 
    3534#include "MHTimeDiffTime.h"
    3635
     
    139138Bool_t MHTimeDiffTime::Fill(const MParContainer *par, const Stat_t w)
    140139{
    141     const Double_t time = 200e-9*fTime->GetTimeLo() + fTime->GetTimeHi();
     140    const Double_t time = *fTime;
    142141
    143142    fHist.Fill(time-fLastTime, time, w);
     
    146145    return kTRUE;
    147146}
    148 
    149 
    150 
    151 
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc

    r2386 r2461  
    125125    Clear();
    126126}
    127 
    128127
    129128// --------------------------------------------------------------------------
     
    216215        }
    217216    }
    218     *fLog << endl;
     217    if (fPixLoGainOn->GetSize())
     218        *fLog << endl;
    219219}
    220220
     
    226226{
    227227    fDAQEvtNumber = uiN;
    228     fTrigPattern[0] = (UInt_t) (ulTP/4294967296.0) ;
    229     fTrigPattern[1] = (UInt_t) (ulTP-fTrigPattern[0]*4294967296.0);
     228    fTrigPattern[0] = (UInt_t)(ulTP/4294967296.0) ;
     229    fTrigPattern[1] = (UInt_t)(ulTP-fTrigPattern[0]*4294967296.0);
    230230}
    231231
     
    239239    fin.read((char*)&fDAQEvtNumber, 4);  // Total=4
    240240
    241     UInt_t fAbsTime[2];
    242     fin.read((char*)fAbsTime,       8);  // Total=12
     241    UInt_t abstime[2];
     242    fin.read((char*)abstime,        8);  // Total=12
    243243
    244244    //
    245245    // store the time of the event in the corresponding container
    246246    //
    247     const Double_t mhz = 9.375;                          // [1e6 ticks/s]
    248     const Double_t t   = (Double_t)fAbsTime[0]/mhz;      // [ns]
     247    const Double_t mhz = 9.375;                        // [1e6 ticks/s]
     248    const Double_t t   = (Double_t)abstime[0]/mhz;     // [ns]
    249249    const UShort_t ns  = (UShort_t)fmod(t*1e-3, 1e9);
    250250    const Byte_t s     = (Byte_t)fmod(t/1e12, 60);
    251251    const Byte_t m     = (Byte_t)fmod(t/60e12, 60);
    252252    const Byte_t h     = (Byte_t)(t/3600e12);
    253 
    254253    fTime->SetTime(h, m, s, ns);
    255     fTime->SetTime(fAbsTime[0], fAbsTime[1]);
    256254
    257255    Byte_t dummy[4];
    258 
    259256    fin.read((char*)&fNumTrigLvl1,  4);  // Total=16
    260257    fin.read((char*)&fNumTrigLvl2,  4);  // Total=20
Note: See TracChangeset for help on using the changeset viewer.