Changeset 2466 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
11/04/03 13:47:39 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2465 r2466  
    3030   * mimage/MImgCleanStd.cc, mimage/MImgCleanTGB.cc:
    3131     - directly use MGeomCam::GetPixRatioSqrt() now
     32
     33   * mraw/MRawSocketRead.cc:
     34     - updated comment header
     35     - updated class description
     36     - removed obsolete fMutex, Lock() and UnLock()
     37     - moved code from Do() to Process()
     38     - added comments
    3239
    3340
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.cc

    r2458 r2466  
    5858#include <TGraph.h>
    5959#include <TArrayC.h>
     60#include <TVirtualPad.h>
    6061
    6162#include "MLog.h"
     
    213214//     <index>      The pixel with the given index is drawn
    214215//
    215 #include <TVirtualPad.h>
    216216void MRawEvtData::Draw(Option_t *opt)
    217217{
  • trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc

    r2386 r2466  
    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-2003
    2121!
    2222!
     
    2424
    2525//////////////////////////////////////////////////////////////////////////////
    26 //                                                                          //
    27 //  MRawSocketRead                                                            //
    28 //                                                                          //
    29 //  This tasks reads the raw binary file like specified in the TDAS???      //
    30 //  and writes the data in the corresponding containers which are           //
    31 //  either retrieved from the parameter list or created and added.          //
    32 //                                                                          //
    33 //  Input Containers:                                                       //
    34 //   -/-                                                                    //
    35 //                                                                          //
    36 //  Output Containers:                                                      //
    37 //   MRawRunHeader, MRawEvtHeader, MRawEvtData, MRawCrateArray, MRawEvtTime //
    38 //                                                                          //
     26//
     27//  MRawSocketRead
     28//
     29//  This tasks reads the raw binary file like specified in the TDAS???
     30//  and writes the data in the corresponding containers which are
     31//  either retrieved from the parameter list or created and added.
     32//
     33//  Input Containers:
     34//   -/-
     35//
     36//  Output Containers:
     37//   MRawRunHeader, MRawEvtHeader, MRawEvtData, MRawCrateArray, MRawEvtTime
     38//
    3939//////////////////////////////////////////////////////////////////////////////
    4040#include "MRawSocketRead.h"
    4141
    42 #include <TMutex.h>
     42#include <stdlib.h> // atoi
    4343
    4444#include "MReadSocket.h"
     
    5858#include "MRawCrateArray.h"
    5959
     60//#include "../mmain/MStatusDisplay.h"
     61
    6062ClassImp(MRawSocketRead);
    6163
     
    7375
    7476    fIn = new MReadSocket(7000);
    75     fMutex = new TMutex;
    7677}
    7778
     
    8283MRawSocketRead::~MRawSocketRead()
    8384{
    84     delete fMutex;
    8585    delete fIn;
    8686}
     
    140140}
    141141
    142 Int_t MRawSocketRead::Do()
     142// --------------------------------------------------------------------------
     143//
     144// The Process reads one event from the binary file:
     145//  - The event header is read
     146//  - the run header is read
     147//  - all crate information is read
     148//  - the raw data information of one event is read
     149//
     150Int_t MRawSocketRead::Process()
    143151{
    144152    /*
     
    254262    }
    255263
     264    //
     265    // If no new event was recorded the DAQ resends an old event
     266    //
    256267    if (fEvtNumber==fRawEvtHeader->GetDAQEvtNumber())
    257268        return kCONTINUE;
    258269
    259270    fEvtNumber=fRawEvtHeader->GetDAQEvtNumber();
    260 
    261     //*fLog << dbg << "Evt " << fRawEvtHeader->GetDAQEvtNumber() << endl;
    262 
     271/*
     272    if (fDisplay)
     273        fDisplay->SetProgressBarPosition((Float_t)fEvtNumber/fRawRunHeader->GetNumEvents());
     274 */
    263275    return kTRUE;
    264276}
    265277
    266 // --------------------------------------------------------------------------
    267 //
    268 // The Process reads one event from the binary file:
    269 //  - The event header is read
    270 //  - the run header is read
    271 //  - all crate information is read
    272 //  - the raw data information of one event is read
    273 //
    274 Int_t MRawSocketRead::Process()
    275 {
    276     Lock();
    277     Int_t rc = Do();
    278     UnLock();
    279     return rc;
    280 }
    281 
    282 Int_t MRawSocketRead::Lock()
    283 {
    284     return fMutex->Lock();
    285 }
    286 
    287 Int_t MRawSocketRead::UnLock()
    288 {
    289     return fMutex->UnLock();
    290 }
     278Int_t MRawSocketRead::PostProcess()
     279{   /*
     280    if (fDisplay)
     281        fDisplay->SetProgressBarPosition(1);
     282     */
     283    return kTRUE;
     284}
  • trunk/MagicSoft/Mars/mraw/MRawSocketRead.h

    r2386 r2466  
    66#endif
    77
    8 // gcc 3.2
    9 //class ifstream;
     8#ifndef __IOSFWD__
    109#include <iosfwd>
     10#endif
    1111
    1212class MTime;
    1313class MParList;
     14class MReadSocket;
     15class MRawEvtData;
     16class MRawEvtHeader;
    1417class MRawRunHeader;
    15 class MRawEvtHeader;
    16 class MRawEvtData;
    1718class MRawCrateArray;
    18 class MReadSocket;
    19 class TMutex;
    2019
    2120class MRawSocketRead : public MTask
     
    2827    MTime          *fRawEvtTime;    // raw evt time information container to fill from file
    2928
    30     TMutex *fMutex;
    31 
    3229    MReadSocket    *fIn;            //! buffered input stream (file to read from)
    3330    MParList       *fParList;       //!
     
    3633    UInt_t          fEvtNumber;     //!
    3734
    38     Int_t Do();
    39 
    4035    Int_t PreProcess(MParList *pList);
    4136    Int_t Process();
     37    Int_t PostProcess();
    4238
    4339public:
     
    4541    ~MRawSocketRead();
    4642
    47     Int_t Lock();
    48     Int_t UnLock();
    49 
    5043    ClassDef(MRawSocketRead, 0) //Task to read DAQ binary data from tcp/ip socket
    5144};
Note: See TracChangeset for help on using the changeset viewer.