Changeset 4577


Ignore:
Timestamp:
08/11/04 12:01:44 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4574 r4577  
    2020                                                 -*-*- END OF LINE -*-*-
    2121
     22  2004/08/10: Thomas Bretz
     23
     24   * mreport/MReportFileReadCC.[h,cc]:
     25     - added
     26
     27   * mreport/Makefile, mreport/ReportsLinkDef.h:
     28     - added MReportFileReadCC
     29
     30   * mreport/MReport*.[h,cc]:
     31     - prpagate file version number to all Interpreters
     32
     33   * merpp.cc:
     34     - added new commandline options to support different CC files
     35     - changed help-output
     36
     37   * readraw.cc:
     38     - a small fix (a '.' was missing)
     39
     40   * mraw/MRawEvtData.cc:
     41     - fixed bug in Print
     42
     43   * manalysis/MGeomApply.cc:
     44     - changed to Init all MCamEvents in the parlist
     45
     46   * mbase/MParList.[h,cc]:
     47     - added a cast operator to TIterator*
     48     - check whether a automatic created class inherits from MParConatiner
     49
     50   * mgui/MCamEvent.[h,cc]:
     51     - added Init
     52     - added InitSize
     53
     54   * mmc/MMcTrig.cxx:
     55     - added a new option to Print()
     56
     57   * mraw/MRawEvtData.[h,cc], mraw/MRawEvtHeader.[h,cc],
     58     mraw/MRawFileRead.cc, mraw/MRawSocketRead.cc
     59     - changed Init() to InitRead()
     60
     61   * msignal/MArrivalTime.[h,cc]:
     62     - changed argument of InitSize according to MCamEvent
     63
     64   * msql/MSQLServer.[h,cc]:
     65     - small changes to interface
     66
     67
     68
    2269  2004/08/10: Robert Wagner
    2370
    24    * mreports/MReportCamera.[h,cc]
     71   * mreport/MReportCamera.[h,cc]
    2572     - added function InterpreteHOT which interprete the HOT* part of
    2673       the report. The variable HVs_modified_by_HOT_Pixels is
     
    2976
    3077
     78
    3179  2004/08/10: Markus Gaug
    3280
     
    4290     - implemented different way to calculate error of signal
    4391       in method kFlatCharge (as discussed with Keiichi).
     92
    4493
    4594
     
    53102     - change format of "Format"
    54103     - change default value for fgMaxHiGainVar to 40
     104
     105
    55106
    56107  2004/08/10: Nadia Tonello
  • trunk/MagicSoft/Mars/manalysis/MGeomApply.cc

    r4511 r4577  
    118118Bool_t MGeomApply::ReInit(MParList *pList)
    119119{
    120     MGeomCam *cam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam"));
    121     if (!cam)
     120    MGeomCam *geom = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam"));
     121    if (!geom)
    122122    {
    123123       *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl;
     
    128128    // the use of some camera files from the 0.7 beta version in which the
    129129    // array containing pixel ratios is not initialized.
    130     cam->CalcPixRatio();
    131 
     130    geom->CalcPixRatio();
     131
     132    TIter Next(*pList);
     133    TObject *o = 0;
     134
     135    while ((o=Next()))
     136    {
     137        MCamEvent *cam = dynamic_cast<MCamEvent*>(o);
     138        if (cam)
     139            cam->Init(*geom);
     140    }
     141/*
    132142    MPedestalCam *ped = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
    133143    if (ped)
    134         ped->Init(*cam);
     144        ped->Init(*geom);
    135145
    136146    MCalibrationCam *cal = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam"));
    137147    if (cal)
    138         cal->Init(*cam);
     148        cal->Init(*geom);
    139149
    140150    MCalibrationCam *cat = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam"));
    141151    if (cat)
    142         cat->Init(*cam);
     152        cat->Init(*geom);
    143153
    144154    MCalibrationCam *qe = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationQECam"));
    145155    if (qe)
    146         qe->Init(*cam);
     156        qe->Init(*geom);
    147157
    148158    MCalibrationCam *pcam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationPedCam"));
    149159    if (pcam)
    150         pcam->Init(*cam);
     160        pcam->Init(*geom);
    151161
    152162    MPedPhotCam *pedphot = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
    153163    if (pedphot)
    154         pedphot->Init(*cam);
     164        pedphot->Init(*geom);
    155165
    156166    MExtractedSignalCam *ext = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
    157167    if (ext)
    158         ext->InitSize(cam->GetNumPixels());
     168        ext->Init(*cam);
    159169
    160170    MArrivalTimeCam *tme = (MArrivalTimeCam*)pList->FindObject(AddSerialNumber("MArrivalTimeCam"));
     
    168178    MBadPixelsCam *bad = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
    169179    if (bad)
    170       bad->InitSize(cam->GetNumPixels());
     180        bad->InitSize(cam->GetNumPixels());
     181    */
    171182
    172183    return kTRUE;
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r3568 r4577  
    515515    }
    516516
     517    if (!cls->InheritsFrom(MParContainer::Class()))
     518    {
     519        *fLog << " - Class doesn't inherit from MParContainer." << endl;
     520        return NULL;
     521    }
     522
    517523    //
    518524    // create the parameter container of the the given class type
     
    936942    return kTRUE;
    937943}
     944
     945// --------------------------------------------------------------------------
     946//
     947// Can be used to create an iterator over all containers, eg:
     948//   MParList plist;
     949//   TIter Next(plist); // Be aware: Use a object here rather than a pointer!
     950//   TObject *o=0;
     951//   while ((o=Next()))
     952//   {
     953//       [...]
     954//   }
     955//
     956MParList::operator TIterator*() const
     957{
     958    return new TOrdCollectionIter(fContainer);
     959}
  • trunk/MagicSoft/Mars/mbase/MParList.h

    r2958 r4577  
    9494    Bool_t WriteEnv(TEnv &env, TString prefix, Bool_t print=kFALSE) const;
    9595
     96    operator TIterator*() const;
     97
    9698    ClassDef(MParList, 1) // list of parameter containers (MParContainer)
    9799};
  • trunk/MagicSoft/Mars/mgui/MCamEvent.cc

    r3226 r4577  
    4040#include "MCamEvent.h"
    4141
     42#include "MGeomCam.h"
     43
    4244ClassImp(MCamEvent);
     45
     46// --------------------------------------------------------------------------
     47//
     48// You can overwrite this function if you want the container to be
     49// initialized by MGeomApply with the geometry. If it is not overloaded
     50// it calls InitSize with the corresponding pixel number. If this information
     51// is enough for you it is enough to overload InitSize.
     52//
     53void MCamEvent::Init(const MGeomCam &geom)
     54{
     55    InitSize(geom.GetNumPixels());
     56}
  • trunk/MagicSoft/Mars/mgui/MCamEvent.h

    r2958 r4577  
    1414    virtual void   DrawPixelContent(Int_t num) const = 0;
    1515
     16    virtual void   Init(const MGeomCam &geom);
     17    virtual void   InitSize(const UInt_t i) { } // Used by MGeomApply see Init()
     18
    1619    ClassDef(MCamEvent, 0) // A camera event
    1720};
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r4358 r4577  
    5050    ~MRawEvtData();
    5151
    52     void Init(MRawRunHeader *rh, MRawCrateArray *arr)
     52    void InitRead(MRawRunHeader *rh, MRawCrateArray *arr)
    5353    {
    5454        //
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc

    r4052 r4577  
    140140// a raw binary file
    141141//
    142 void MRawEvtHeader::Init(MRawRunHeader *rh, MTime *t)
     142void MRawEvtHeader::InitRead(MRawRunHeader *rh, MTime *t)
    143143{
    144144    //
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h

    r4040 r4577  
    5353    ~MRawEvtHeader();
    5454
    55     void Init(MRawRunHeader *rh, MTime *t);
     55    void InitRead(MRawRunHeader *rh, MTime *t);
    5656
    5757    void Clear(Option_t * = NULL);
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r4178 r4577  
    206206    // Run header must be valid!
    207207    //
    208     fRawEvtHeader->Init(fRawRunHeader, fRawEvtTime);
    209     fRawEvtData  ->Init(fRawRunHeader, fRawCrateArray);
     208    fRawEvtHeader->InitRead(fRawRunHeader, fRawEvtTime);
     209    fRawEvtData  ->InitRead(fRawRunHeader, fRawCrateArray);
    210210
    211211    //
  • trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc

    r4019 r4577  
    262262    // Run header must be valid!
    263263    //
    264     fRawEvtHeader->Init(fRawRunHeader, fRawEvtTime);
    265     fRawEvtData  ->Init(fRawRunHeader, fRawCrateArray);
     264    fRawEvtHeader->InitRead(fRawRunHeader, fRawEvtTime);
     265    fRawEvtData  ->InitRead(fRawRunHeader, fRawCrateArray);
    266266
    267267    if (!ReadEvent(*fIn))
  • trunk/MagicSoft/Mars/mraw/RawLinkDef.h

    r2675 r4577  
    55#pragma link off all functions;
    66
    7 #pragma link C++ class MRawRunHeader;
     7#pragma link C++ class MRawRunHeader+;
    88
    9 #pragma link C++ class MRawEvtHeader;
    10 #pragma link C++ class MRawEvtData;
     9#pragma link C++ class MRawEvtHeader+;
     10#pragma link C++ class MRawEvtData+;
    1111#pragma link C++ class MRawEvtPixelIter+;
    1212
  • trunk/MagicSoft/Mars/msignal/MArrivalTime.cc

    r4522 r4577  
    6767}
    6868
    69 void MArrivalTime::InitSize(Int_t i)
     69void MArrivalTime::InitSize(const UInt_t i)
    7070{
    7171  fData.Set(i);
  • trunk/MagicSoft/Mars/msignal/MArrivalTime.h

    r4522 r4577  
    3030
    3131    void   Reset();
    32     void   InitSize(Int_t i);
     32    void   InitSize(const UInt_t i);
    3333
    3434    UInt_t GetSize() const { return fData.GetSize(); }
  • trunk/MagicSoft/Mars/msql/MSQLServer.cc

    r4514 r4577  
    221221}
    222222
    223 void MSQLServer::PrintLine(const TArrayI &max) const /*FOLD00*/
     223void MSQLServer::PrintLine(const TArrayI &max) /*FOLD00*/
    224224{
    225225    cout << "+" << setfill('-');
     
    229229}
    230230
    231 void MSQLServer::PrintTable(TSQLResult *res) const /*FOLD00*/
    232 {
    233     Int_t n = res->GetFieldCount();
     231void MSQLServer::PrintTable(TSQLResult &res) /*FOLD00*/
     232{
     233    Int_t n = res.GetFieldCount();
    234234
    235235    TArrayI max(n);
    236236
    237237    for (int i=0; i<n; i++)
    238         max[i] = strlen(res->GetFieldName(i));
     238        max[i] = strlen(res.GetFieldName(i));
    239239
    240240    TSQLRow *row;
    241241
    242242    TList rows;
    243     while ((row=res->Next()))
     243    while ((row=res.Next()))
    244244    {
    245245        for (int i=0; i<n; i++)
     
    254254    cout << "|" << setfill(' ');
    255255    for (int i=0; i<n; i++)
    256         cout << setw(max[i]+1) << res->GetFieldName(i) << " |";
     256        cout << setw(max[i]+1) << res.GetFieldName(i) << " |";
    257257    cout << endl;
    258258
     
    305305    if (res)
    306306    {
    307         PrintTable(res);
     307        PrintTable(*res);
    308308        delete res;
    309309    }
  • trunk/MagicSoft/Mars/msql/MSQLServer.h

    r4514 r4577  
    2828    Bool_t PrintError(const char *txt, const char *q) const;
    2929
    30     void PrintLine(const TArrayI &max) const;
    31     void PrintTable(TSQLResult *res) const;
    3230    TString GetFields() const;
    3331
     
    8482    ~MSQLServer();
    8583
     84    static void PrintLine(const TArrayI &max);
     85    static void PrintTable(TSQLResult &res);
     86
    8687    const char *GetName() const;
    8788
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.cxx

    r2399 r4577  
    9393}
    9494
    95 void MMcTrig::Print(Option_t *Option) const {
    96   //
    97   //  print out the data member on screen
    98   //
    99   Int_t i,j;
     95void MMcTrig::Print(Option_t *option) const
     96{
     97    //
     98    //  print out the data member on screen
     99    //
     100    cout << "Monte Carlo Trigger output:" << endl;
     101    cout << " First Level Trigger in this Event: " << fNumFirstLevel << endl;
     102    if (!TString(option).Contains("short"))
     103    {
     104        cout << " Times of first Level Trigger in this Event: ";
     105        for (int i=0; i<fNumFirstLevel; i++)
     106            cout << fTimeFirst[i] << " ";
     107        cout << endl;
    100108
    101   cout <<endl << "Monte Carlo Trigger output:" <<endl;
    102   cout << " First  Level Trigger in this Event: "<<fNumFirstLevel<<endl;
    103   cout << " Times of first  Level Trigger in this Event: ";
    104   for (i=0;i<fNumFirstLevel;i++){
    105     cout<< fTimeFirst[i]<<"-";
    106   }
    107   cout<<endl;
    108   cout << " Pixels of first  Level Trigger in this Event : ";
    109   for (i=0;i<fNumFirstLevel;i++){
    110     for(j=0;j<CAMERA_PIXELS/8+1;j++){
    111       cout<<fPixelsFirst[j][i]<<"-";
     109        cout << " Pixels of first  Level Trigger in this Event: ";
     110        for (int i=0; i<fNumFirstLevel; i++)
     111            for(int j=0; j<CAMERA_PIXELS/8+1; j++)
     112                cout << (int)fPixelsFirst[j][i] << " ";
     113        cout << endl;
    112114    }
    113   }
    114   cout<<endl;
    115   cout << " Second Level Trigger in this Event: " << fNumSecondLevel << endl;
    116   cout << endl ;
     115
     116    cout << " Second Level Trigger in this Event: " << fNumSecondLevel << endl;
     117    cout << endl;
    117118}
    118119
Note: See TracChangeset for help on using the changeset viewer.