Changeset 2529 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
11/19/03 00:03:53 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2528 r2529  
    33
    44                                                 -*-*- END OF LINE -*-*-
     5 2003/11/18: Thomas Bretz
     6
     7   * mars.cc:
     8     - changed Usage to standard Usage
     9     
     10   * merpp.cc, mona.cc, readraw.cc, star.cc, status.cc,
     11     mbase/MArgs.[h,cc]:
     12     - removed const-qualifier for argv
     13     
     14   * mbase/MTask.cc:
     15     - fixed a bug in PrintStatistics (setfill was not set)
     16     
     17   * mbase/MTaskList.cc:
     18     - simplified PrintStatistics
     19   
     20   * mbase/MTime.h:
     21     - added Getter
     22     
     23   * mfileio/MReadTree.cc:
     24     - remove a leading "*" when checking whether a branch which
     25       should be enabled exists
     26       
     27   * mfileio/MWriteRootFile.cc:
     28     - fixed a crash when Print is called and GetTree() returns NULL
     29     
     30   * mhist/MHEvent.cc:
     31     - implemented more levels (MeV, GeV, etc) for energy display
     32     
     33   * mraw/MRawSocketRead.cc:
     34     - removed some obsolete comment
     35     
     36   * mreport/MReport.[h,cc]:
     37     - added FindTime
     38     - removed an invalid line (ReadAngle) in the header file
     39     - Set class version to 1
     40     - do not write fTime '//!'
     41     
     42   * mreport/MReportFileRead.cc:
     43     - fixed handling of MTimes
     44
     45
     46
    547 2003/11/18: Abelardo Moralejo
    648
     
    850     - Fixed missing initialization of fLongitmax
    951
     52
     53
    1054 2003/11/18: Markus Gaug
    1155
    1256   * manalysis/MCalibrationCalc:
    13         - performs the eventloop and fills the calibration classes
     57     - performs the eventloop and fills the calibration classes
    1458
    1559   * manalysis/MCalibrationCam:
    16         - holds the classes: MCalibrationPix and MCalibrationBlindPix and MCalibrationPINDiode
    17         - one MCalibrationPix per pixel
     60     - holds the classes: MCalibrationPix and MCalibrationBlindPix
     61       and MCalibrationPINDiode
     62     - one MCalibrationPix per pixel
    1863
    1964   * manalysis/MCalibrationPix:
    20         - holds the fit results and conversion factors, etc per pixel
    21         - hold histograms MHCalibrationPixel
     65     - holds the fit results and conversion factors, etc per pixel
     66     - hold histograms MHCalibrationPixel
    2267
    2368   * manalysis/MCalibrationBlindPix:
    24         - holds fit results and derived number of photons, etc
    25         - hold histogram MHCalibrationBlindPixel
     69     - holds fit results and derived number of photons, etc
     70     - hold histogram MHCalibrationBlindPixel
    2671
    2772   * manalysis/MCalibrationPINDiode:
    28         - holds fit results and derived number of photons, etc
    29         - hold histogram MHCalibrationPINDiode
     73     - holds fit results and derived number of photons, etc
     74     - hold histogram MHCalibrationPINDiode
    3075
    3176   * mhist/MHCalibrationPix:
    32         - histograms with sum of charges, time slices and reduced charges vs. event number
    33         - fit functions
     77     - histograms with sum of charges, time slices and reduced
     78       charges vs. event number
     79     - fit functions
    3480
    3581   * mhist/MHCalibrationPixel:
    36         - histograms with sum of charges, time slices and reduced charges vs. event number
    37         - fit functions
     82     - histograms with sum of charges, time slices and reduced
     83       charges vs. event number
     84     - fit functions
    3885
    3986   * mhist/MHCalibrationBlindPixel:
    40         - histograms with sum of charges, time slices and reduced charges vs. event number
    41         - fit functions
     87     - histograms with sum of charges, time slices and reduced
     88       charges vs. event number
     89     - fit functions
    4290
    4391   * mhist/MHCalibrationPINDiode:
    44         - histograms with sum of charges, time slices and reduced charges vs. event number
    45         - fit functions
    46 
    47    *mhist/MH:
    48         - new function: CutEdges
    49 
    50    *macros/calibration.C
    51         - simple macro showing the functionning
    52 
    53  
     92     - histograms with sum of charges, time slices and reduced
     93       charges vs. event number
     94     - fit functions
     95
     96   * mhist/MH:
     97     - new function: CutEdges
     98
     99   * macros/calibration.C
     100     - simple macro showing the functionning
     101
     102
     103
    54104 2003/11/17: Thomas Bretz
    55105 
  • trunk/MagicSoft/Mars/mbase/MArgs.cc

    r2377 r2529  
    5454//  fArgv: A TList containing all other command line arguments
    5555//
    56 MArgs::MArgs(int argc, const char **argv) : fArgc(argc)
    57 {
     56MArgs::MArgs(int argc, char **argv) : fArgc(argc)
     57{
     58    // FIXME: argv has no const-qualifier to be idetical with
     59    //        TApplication.
    5860    fName = argv[0];
    5961
  • trunk/MagicSoft/Mars/mbase/MArgs.h

    r2275 r2529  
    3131
    3232public:
    33     MArgs(int argc, const char **argv);
     33    MArgs(int argc, char **argv);
    3434    ~MArgs();
    3535
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r2490 r2529  
    328328void MTask::PrintStatistics(const Int_t lvl, Bool_t title) const
    329329{
    330     *fLog << all << setw(lvl) << " " << GetDescriptor() << "\t";
     330    *fLog << all << setfill(' ') << setw(lvl) << " " << GetDescriptor() << "\t";
    331331    *fLog << dec << fNumExecutions;
    332332    if (fFilter)
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r2470 r2529  
    592592    }
    593593    else
    594     {
    595         *fLog << setw(lvl) << " " << GetDescriptor();
    596         if (title)
    597             *fLog << "\t" << fTitle;
    598         *fLog << endl;
    599     }
     594        MTask::PrintStatistics(lvl, title);
    600595
    601596    //
  • trunk/MagicSoft/Mars/mbase/MTime.h

    r2461 r2529  
    8383    }
    8484
    85     void SetTime(Byte_t h, Byte_t m, Byte_t s, UShort_t ns)
     85    void SetTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns)
    8686    {
    8787        fHour    = h;
     
    114114        return operator double();
    115115    }
     116
     117    Byte_t GetHour() const { return fHour; }
     118    Byte_t GetMin() const { return fMin; }
     119    Byte_t GetSec() const { return fSec; }
     120    UInt_t GetNanoSec() const { return fNanoSec; }
    116121
    117122    ClassDef(MTime, 2)  //A generalized MARS time stamp
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r2470 r2529  
    409409    // Check whether this branch really exists
    410410    //
    411     if (fChain->GetBranch(name))
     411    TString bn(name);
     412    if (bn.EndsWith("*"))
     413        bn.Remove(bn.Length()-1);
     414
     415    if (fChain->GetBranch(bn))
    412416        SetBranchStatus(name, status);
    413417
     
    905909}
    906910
     911TString MReadTree::GetTreeName() const
     912{
     913    return fChain->GetName();
     914}
     915
    907916// --------------------------------------------------------------------------
    908917//
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r2470 r2529  
    161161        MRootFileBranch *b = (MRootFileBranch*)obj;
    162162
    163         if (b->GetTree()->TestBit(kIsNewTree))
     163        if (!b->GetTree() || b->GetTree()->TestBit(kIsNewTree))
    164164            continue;
    165165
  • trunk/MagicSoft/Mars/mhist/MHEvent.cc

    r2512 r2529  
    226226        s.Insert(0, txt);
    227227
    228         s += "}{";
    229         s += "  E=";
     228        s += "}{  E=";
     229
    230230        if (fMcEvt->GetEnergy()>1000)
    231231            s += Form("%.1fTeV", fMcEvt->GetEnergy()/1000);
    232232        else
    233             s += Form("%dGeV", fMcEvt->GetEnergy()+.5);
     233            if (fMcEvt->GetEnergy()>10)
     234                s += Form("%dGeV", (Int_t)(fMcEvt->GetEnergy()+.5));
     235            else
     236                if (fMcEvt->GetEnergy()>1)
     237                    s += Form("%.1fGeV", fMcEvt->GetEnergy());
     238                else
     239                    s += Form("%dMeV", (Int_t)(fMcEvt->GetEnergy()*1000+.5));
     240
    234241        s += " r=";
    235242        s += (int)(fMcEvt->GetImpact()/100+.5);
    236         s += "m ZA=";
     243        s += "m Zd=";
    237244        s += (int)(fMcEvt->GetTheta()*180/TMath::Pi()+.5);
    238         s += "\xb0 ";
    239         s += fMcEvt->GetPhotElfromShower();
    240         s += "PhEl";
    241         s += "}";
     245        s += "\\circ ";
     246        if (fMcEvt->GetPhotElfromShower()>=10000)
     247            s += Form("%dk", (Int_t)(fMcEvt->GetPhotElfromShower()/1000.+.5));
     248        else
     249            if (fMcEvt->GetPhotElfromShower()>=1000)
     250                s += Form("%.1fk", fMcEvt->GetPhotElfromShower()/1000.);
     251            else
     252                s += fMcEvt->GetPhotElfromShower();
     253        s += "PhEl}";
    242254    }
    243255
  • trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc

    r2496 r2529  
    135135
    136136    *fLog << err << "ERROR - Cannot open port #" << fPort << endl;
     137
    137138    return kFALSE;
    138139}
     
    187188    fEvtNumber = (UInt_t)-1;
    188189
    189     /*
    190     MEvtLoop *loop=(MEvtLoop*)pList->FindObject("Evtloop");
    191     if (loop)
    192         loop->SetProgressBar((TGProgressBar*)NULL);
    193      */
    194190    return kTRUE;
    195191}
  • trunk/MagicSoft/Mars/mreport/MReport.cc

    r2523 r2529  
    3333
    3434#include "MTime.h"
     35#include "MParList.h"
    3536
    3637ClassImp(MReport);
     
    8283    return kTRUE;
    8384}
     85
     86MTime *MReport::FindTime(MParList &plist)
     87{
     88    fTime = NULL;
     89
     90    TString id(ClassName());
     91    if (!id.BeginsWith("MReport"))
     92    {
     93        *fLog << warn << " WARNING - Class name '" << id << "' ";
     94        *fLog << " doesn't begin with 'MReport'... no MTime assigned." << endl;
     95        return NULL;
     96    }
     97
     98    id.Remove(0, 7);
     99    if (id.IsNull())
     100    {
     101        *fLog << warn << " WARNING - No postfix existing... no MTime assigned." << endl;
     102        return NULL;
     103    }
     104
     105    id.Prepend("MTime");
     106
     107    fTime = (MTime*)plist.FindCreateObj("MTime", id);
     108    return fTime;
     109}
  • trunk/MagicSoft/Mars/mreport/MReport.h

    r2520 r2529  
    77
    88class MTime;
     9class MParList;
    910
    1011class MReport : public MParContainer
     
    1415
    1516    Byte_t  fState;
    16     MTime  *fTime;
     17    MTime  *fTime;             //!
    1718
    1819    ULong_t Hash() const { return fIdentifier.Hash(); }
     
    3940    void SetTime(MTime *t) { fTime = t; }
    4041
    41     static Bool_t ReadAngle(TString &str, Double_t &ret);
     42    MTime *FindTime(MParList &plist);
    4243
    43     ClassDef(MReport, 0) // Base class for control reports
     44    ClassDef(MReport, 1) // Base class for control reports
    4445};
    4546
  • trunk/MagicSoft/Mars/mreport/MReportFileRead.cc

    r2523 r2529  
    6060    ULong_t Hash() const { return fReport->GetIdentifier().Hash(); }
    6161    MReport *GetReport() { return fReport; }
    62     void SetTime(MTime *t) { fReport->SetTime(t); }
     62    //void SetTime(MTime *t) { fReport->SetTime(t); }
    6363    Bool_t Interprete(TString &str)
    6464    {
     
    6969        return kTRUE;
    7070    }
     71    void SetTime(MParList &plist) { fReport->FindTime(plist); }
     72    void AddToList(MParList &plist) { plist.AddToList(fReport); }
    7173};
    7274
     
    178180Int_t MReportFileRead::PreProcess(MParList *pList)
    179181{
    180     MTime *time = (MTime*)pList->FindCreateObj("MTime");
    181     if (!time)
    182         return kFALSE;
    183 
    184     fList->ForEach(MReportHelp, SetTime)(time);
     182    //MTime *time = (MTime*)pList->FindCreateObj("MTime");
     183    //if (!time)
     184    //    return kFALSE;
     185
     186    fList->ForEach(MReportHelp, SetTime)(*pList);
     187    fList->ForEach(MReportHelp, AddToList)(*pList);
    185188
    186189    //
     
    249252    fIn->close();
    250253
     254    if (!GetNumExecutions())
     255        return kTRUE;
     256
    251257    *fLog << inf << endl;
    252258    *fLog << GetDescriptor() << " statistics:" << endl;
Note: See TracChangeset for help on using the changeset viewer.