Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2489)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2490)
@@ -1,3 +1,48 @@
                                                  -*-*- END OF LINE -*-*-
+
+  2003/11/10: Nicola Galante
+  
+   * macros/dohtml.C:
+     - added mreflector
+     
+   * mbase/MEvtLoop.[h,cc]:
+     - removed instantiation of gListOfPrimitives
+     
+   * mbase/MGGroupFrame.h:
+     - minor change
+     
+   * mbase/MLog.cc:
+     - added a comment
+     
+   * mbase/MParContainer.[h,cc]:
+     - removed include MEvtLoop.h
+     - added instantiation of gListOfPrimitves
+     
+   * mbase/MReadSocket.[h,cc]:
+     - added more functionality
+     - added comments
+     - added Open() Close()
+     
+   * mbase/MTask.cc:
+     - removed obsolete include for MGGroupFrame
+
+   * mfilter/MFRealTimePeriod.h:
+     - initialize fTime with 0
+     
+   * mhist/MHCamEvent.cc, mhist/MHEvent.cc, mhist/MHTriggerLvl0.cc:
+     - removed creation of additional pad in Draw
+     
+   * mhist/MHCamera.cc:
+     - added creating of additional pad in Draw
+     - added some comments
+     
+   * mraw/MRawSocketRead.[h,cc]:
+     - added comments
+     - added fPort data member
+     - take MStatusDisplay status into account
+     - SetStausLine2 added
+     - SetProgressBarPosition added
+     - removed obsolete include of iosfwd
+
 
   
@@ -15,4 +60,5 @@
      - Added some instruction to write all the MMcTriggerLvl2 histograms into
        a TFile 
+
 
 
Index: trunk/MagicSoft/Mars/macros/dohtml.C
===================================================================
--- trunk/MagicSoft/Mars/macros/dohtml.C	(revision 2489)
+++ trunk/MagicSoft/Mars/macros/dohtml.C	(revision 2490)
@@ -51,6 +51,7 @@
     sourcedir += "mmc:";
     sourcedir += "mmontecarlo:";
+    sourcedir += "mranforest:";
     sourcedir += "mraw:";
-    sourcedir += "mranforest:";
+    sourcedir += "mreflector:";
     sourcedir += "mtools:";
     sourcedir += ".:";
Index: trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 2490)
@@ -96,12 +96,4 @@
 using namespace std;
 
-
-//!
-//! Maybe we can add a static parameter list to MEvtLoop
-//! Also we can derive MEvtLoop from MTaskList to have a static tasklist, too
-//!
-
-TList *gListOfPrimitives; // forward declaration in MParContainer.h
-
 // --------------------------------------------------------------------------
 //
@@ -372,5 +364,4 @@
     if (fProgress && fNumEvents>0)
         fProgress->SetPosition((Double_t)num/fNumEvents);
-
 
     // FIXME: This is a workaround, because TApplication::Run is not
Index: trunk/MagicSoft/Mars/mbase/MEvtLoop.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEvtLoop.h	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MEvtLoop.h	(revision 2490)
@@ -85,6 +85,3 @@
 };
 
-// FIXME: Move as (persistent) static data member to MParContainer
-R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop
-
 #endif
Index: trunk/MagicSoft/Mars/mbase/MGGroupFrame.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGGroupFrame.h	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MGGroupFrame.h	(revision 2490)
@@ -14,5 +14,5 @@
 class MGGroupFrame : public TGGroupFrame, public TGWidget
 {
-    MGTask  *fTask;
+    MGTask *fTask;
     MGList *fList;
 
Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 2490)
@@ -51,9 +51,5 @@
 #include "MLogManip.h"
 
-#ifndef __COSY__
-#include "MEvtLoop.h"     // gListOfPrimitives
-#else
 TList *gListOfPrimitives; // forard declaration in MParContainer.h
-#endif
 
 #undef DEBUG
Index: trunk/MagicSoft/Mars/mbase/MParContainer.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 2490)
@@ -132,4 +132,12 @@
 };
 
+//!
+//! Maybe we can add a static parameter list to MEvtLoop
+//! Also we can derive MEvtLoop from MTaskList to have a static tasklist, too
+//!
+
+// FIXME: Move as (persistent) static data member to MParContainer
+R__EXTERN TList *gListOfPrimitives; // instantiation in MEvtLoop
+
 /*
 class MParContainer : public TNamed
Index: trunk/MagicSoft/Mars/mbase/MReadSocket.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadSocket.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MReadSocket.cc	(revision 2490)
@@ -16,7 +16,7 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2001
+!   Author(s): Thomas Bretz, 10/2003 <mailto:tbretz@astro.uni.wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2003
 !
 !
@@ -27,4 +27,25 @@
 //
 // MReadSocket
+//
+// This class acts like a standard C++ istream, but read from a socket
+// (ifstream works similar)
+//
+// ios::io_state:
+// --------------
+// eof()  or ios::eofbit:  Connection closed or not established
+// fail() or ios::failbit: Error trying to establish connection or
+//                         waiting for data in underflow() timed out
+// good() tells you that everything is ok and we can read from the stream
+//
+// Example:
+// --------
+//
+//    Double_t d;
+//
+//    MReadSocket sin(1024); // open port 1024
+//
+//    sin >> d;
+//    sin.read((char*)&d, sizeof(Double_t));
+//
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,4 +65,16 @@
 using namespace std;
 
+// --------------------------------------------------------------------------
+//
+// You can use the constructor in two ways:
+//
+//    MReadSocket read(7000);
+// This opens the socket and blocks until the connection has been
+// established.
+//
+//    MReadSocket read;
+// Returns immidiatly. The connection will be opend by calling
+//    read.Open(7000);
+//
 MReadSocket::MReadSocket(int port, int mtu) : istream(this), fMtu(mtu), fTimeout(2500), fServSock(NULL), fRxSocket(NULL)
 {
@@ -50,16 +83,37 @@
     setg(fBuffer, fBuffer, fBuffer+1);
 
-    cout << "Starting server socket on port 7000..." << endl;
-
-    while (1)
+    clear(ios::eofbit);
+
+    if (port>0)
+        Open(port);
+}
+
+// --------------------------------------------------------------------------
+//
+//  Destructor. Close an possible open connection and delete the fBuffer
+//
+MReadSocket::~MReadSocket()
+{
+    Close();
+    delete fBuffer;
+}
+
+void MReadSocket::OpenServerSocket(int port)
+{
+    if (fServSock)
+        return;
+
+    cout << "Starting server socket on port #" << port << "..." << endl;
+
+    while (!fServSock)
     {
         fServSock=new TServerSocket(port, kTRUE);
         if (fServSock->IsValid())
-            break;
+            continue;
 
         cout << "ServerSocket not valid: ";
         switch (fServSock->GetErrorCode())
         {
-        case 0: cout << "No error." << endl; break;
+        case  0: cout << "No error." << endl; break;
         case -1: cout << "low level socket() call failed." << endl; break;
         case -2: cout << "low level bind() call failed." << endl; break;
@@ -68,71 +122,144 @@
         }
 
-        delete fServSock;
-        fServSock=NULL;
-        break;
-    }
-    if (!fServSock)
-    {
-        cout << "MReadSocket: TServerSocket - Connection timed out." << endl;
-        setstate(ios::failbit);
+        Close();
+        clear(ios::failbit);
         return;
     }
 
     fServSock->SetOption(kNoBlock, 1);
-
-    while (1)
+}
+
+void MReadSocket::OpenConnection(Bool_t block)
+{
+    do
     {
         const TTime timeout = gSystem->Now() + TTime(5000);
 
         TDatime now;
-        cout << now.AsString() << ": Waiting for conntection on port 7000..." << endl;
-        fRxSocket = NULL;
-        while ((Long_t)fRxSocket<=0 && gSystem->Now()<timeout)
+        cout << now.AsString() << ": Waiting for connection..." << endl;
+
+        //
+        // fRxSocket<0  means: No connection,non-blocking mode
+        // fRxSocket==0 means: Error
+        // This is only done until timeout is reached
+        //
+        while (fRxSocket==0 && gSystem->Now()<timeout)
         {
             fRxSocket = fServSock->Accept();
             if (fRxSocket==0)
-                cout << "Error: TServerSock::Accept" << endl;
-            usleep(1);
+            {
+                cout << "MReadSocket::OpenConnection: ERROR - TServerSock::Accept()" << endl;
+                setstate(ios::failbit);
+                return;
+            }
+            if ((Long_t)fRxSocket<0)
+                fRxSocket=NULL;
+
+            usleep(10);
         }
 
-        if ((Long_t)fRxSocket<=0)
+        //
+        // No connection has been established. Restart waiting for
+        // connection except we are in non-blocking mode.
+        //
+        if (fRxSocket==0)
             continue;
 
+        //
+        // Check if the established connection is valid
+        //
         if (fRxSocket->IsValid())
-            break;
+        {
+            cout << "Connection established..." << endl;
+            fRxSocket->SetOption(kNoBlock, 1);
+            clear();
+            return;
+        }
 
         cout << "TSocket: Connection not valid..." << endl;
         delete fRxSocket;
-    }
-
-    if ((Long_t)fRxSocket<=0)
-    {
-        cout << "MReadSocket: TServerSocket::Accept - Connection timed out." << endl;
         fRxSocket=NULL;
         setstate(ios::failbit);
         return;
-    }
-
-    cout << "Connection established..." << endl;
-
-    fRxSocket->SetOption(kNoBlock, 1);
+
+    } while (block);
+}
+
+// --------------------------------------------------------------------------
+//
+//  Open the connectionj on port port. Wait until the connection has
+//  been established. If an error occures and the connection cannot
+//  be established return kFALSE. To check whether an error occured
+//  use operator!() or operator void*() or fail()
+//
+Bool_t MReadSocket::Open(int port, Bool_t block=kFALSE)
+{
+    //
+    // If no port is given use the port given in the constructor
+    //
+    if (port<=0)
+        port = fPort;
+
+    //
+    // Remember port for later uses
+    //
+    if (fPort<=0)
+        fPort = port;
+
+    //
+    // Check whether a connection has already been established
+    //
+    if (fServSock)
+    {
+        //
+        // Check whether the connection has the right port
+        //
+        if (fServSock->GetLocalPort()!=port)
+            Close();
+    }
+
+    //
+    // Check whether port is valid
+    //
+    if (port<=0)
+    {
+        cout << "Invalid port #" << port << "!" << endl;
+        clear(ios::failbit);
+        return kFALSE;
+    }
+
+    //
+    // Start server socket...
+    //
+    OpenServerSocket(port);
+    if (!fServSock)
+        return kFALSE;
+
+    OpenConnection(block);
+    if (!fRxSocket)
+        return kFALSE;
 
     underflow();
-}
-
-// --------------------------------------------------------------------------
-//
-//  Destructor, destroying the gui mutex.
-//
-MReadSocket::~MReadSocket()
+    return kTRUE;
+}
+
+void MReadSocket::Close()
 {
     if (fRxSocket)
+    {
         delete fRxSocket;
+        fRxSocket=NULL;
+    }
     if (fServSock)
+    {
+        const Int_t port = fServSock->GetLocalPort();
+
         delete fServSock;
-
-    delete fBuffer;
-
-    cout << "Connection on Port 7000 closed." << endl;
+        fServSock=NULL;
+
+        cout << "Connection on Port #" << port << " closed." << endl;
+    }
+
+    clear(ios::eofbit);
 }
 
@@ -149,5 +276,6 @@
 int MReadSocket::underflow()
 {
-    if (fail())
+    // FIXME:     vvvvv is this correct?
+    if (fail() || eof())
     {
         setg(fBuffer, fBuffer, fBuffer+fMtu);
@@ -185,3 +313,2 @@
     return 0;
 }
-
Index: trunk/MagicSoft/Mars/mbase/MReadSocket.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadSocket.h	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MReadSocket.h	(revision 2490)
@@ -19,4 +19,5 @@
     char *fBuffer; //!
 
+    int   fPort;
     int   fMtu;
     TTime fTimeout;
@@ -25,13 +26,19 @@
     TSocket        *fRxSocket;
 
+    void OpenServerSocket(int port);
+    void OpenConnection(Bool_t block);
+
     int underflow();
     int sync();
 
 public:
-    MReadSocket(int port, int mtu=1500);
+    MReadSocket(int port=-1, int mtu=1500);
     MReadSocket(MReadSocket const& log) : istream((std::streambuf*)&log)
     {
     }
     ~MReadSocket();
+
+    Bool_t Open(int port=-1, Bool_t block=kFALSE);
+    void   Close();
 
     void SetTimeout(UInt_t millisec) { fTimeout = millisec; }
Index: trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 2490)
@@ -83,5 +83,4 @@
 
 #include "MFilter.h"
-#include "MGGroupFrame.h"
 #include "MStatusDisplay.h"
 
Index: trunk/MagicSoft/Mars/mfilter/MFRealTimePeriod.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFRealTimePeriod.h	(revision 2489)
+++ trunk/MagicSoft/Mars/mfilter/MFRealTimePeriod.h	(revision 2490)
@@ -15,5 +15,5 @@
 
 public:
-    MFRealTimePeriod(UInt_t millis=1000) : fMilliSec(millis)
+    MFRealTimePeriod(UInt_t millis=1000) : fTime(0), fMilliSec(millis)
     {
         fName  = "MFRealTimePeriod";
Index: trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 2490)
@@ -144,5 +144,5 @@
     *fLog << all << underline << GetDescriptor() << ": Mean=" << mean << ", Rms=" << rms << endl;
 
-    for (unsigned int i=0; i<fSum->GetNumPixels(); i++)
+    for (UInt_t i=0; i<fSum->GetNumPixels(); i++)
     {
         if (!fSum->IsUsed(i))
@@ -151,8 +151,4 @@
         if ((*fSum)[i+1]>mean+s*rms)
             *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " > " << s << "*rms" << endl;
-        // if ((*fSum)[i+1]==0)
-        //     *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " == 0" << endl;
-        // if ((*fSum)[i+1]<fSum->GetMean()-s*fSum->GetRMS())
-        //     *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " < " << s << "*rms" << endl;
     }
 }
@@ -175,8 +171,4 @@
 
     pad->cd(1);
-    gPad->SetBorderMode(0);
-    gPad->Divide(1,1);
-    gPad->cd(1);
-    gPad->SetBorderMode(0);
     fSum->Draw();
 
Index: trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2490)
@@ -359,13 +359,12 @@
 // To draw a camera into its own pad do something like:
 //
+// MGeomCamMagic m;
+// MHCamera *d=new MHCamera(m);
+//
 // TCanvas *c = new TCanvas;
 // c->Divide(2,1);
-// MGeomCamMagic m;
-// MHCamera *d=new MHCamera(&m);
+// c->cd(1);
+//
 // d->FillRandom();
-// c->cd(1);
-// gPad->SetBorderMode(0);
-// gPad->Divide(1,1);
-// gPad->cd(1);
 // d->Draw();
 // d->SetBit(kCanDelete);
@@ -375,14 +374,24 @@
     // root 3.02:
     // gPad->SetFixedAspectRatio()
-    Int_t col = 16;
-
-    if (gPad)
-        col = gPad->GetFillColor();
-
-    TVirtualPad *pad = gPad ? gPad : MH::MakeDefCanvas("CamDisplay", "Mars Camera Display", 656, 600);
+    const Color_t col = gPad ? gPad->GetFillColor() : 16;
+    TVirtualPad  *pad = gPad ? gPad : MH::MakeDefCanvas("CamDisplay", "Mars Camera Display", 656, 600);
     pad->SetBorderMode(0);
     pad->SetFillColor(col);
 
+    //
+    // Create an own pad for the MHCamera-Object which can be
+    // resized in paint to keep the correct aspect ratio
+    //
+    pad->Divide(1, 1, 0, 0, col);
+    pad->cd(1);
+    gPad->SetBorderMode(0);
+
     AppendPad(option);
+
+    //
+    // Do not change gPad. The user should not see, that Draw
+    // changes gPad...
+    //
+    pad->cd();
 }
 
Index: trunk/MagicSoft/Mars/mhist/MHEvent.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHEvent.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mhist/MHEvent.cc	(revision 2490)
@@ -256,14 +256,6 @@
     }
 
-    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    pad->Divide(1,1);
-
-    pad->cd(1);
-    gPad->SetBorderMode(0);
-    gPad->Divide(1,1);
-    gPad->cd(1);
-    gPad->SetBorderMode(0);
+    if (!gPad)
+        MakeDefCanvas(this);
     fHist->Draw();
 }
Index: trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2490)
@@ -179,8 +179,10 @@
 
     pad->cd(1);
-    gPad->SetBorderMode(0);
-    gPad->Divide(1,1);
-    gPad->cd(1);
-    gPad->SetBorderMode(0);
+    /*
+     gPad->SetBorderMode(0);
+     gPad->Divide(1,1);
+     gPad->cd(1);
+     gPad->SetBorderMode(0);
+     */
     fSum->Draw();
 
Index: trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc	(revision 2489)
+++ trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc	(revision 2490)
@@ -35,5 +35,9 @@
 //
 //  Output Containers:
-//   MRawRunHeader, MRawEvtHeader, MRawEvtData, MRawCrateArray, MRawEvtTime
+//   MRawRunHeader
+//   MRawEvtHeader
+//   MRawEvtData
+//   MRawCrateArray
+//   MRawEvtTime
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -58,5 +62,5 @@
 #include "MRawCrateArray.h"
 
-//#include "../mmain/MStatusDisplay.h"
+#include "MStatusDisplay.h"
 
 ClassImp(MRawSocketRead);
@@ -69,10 +73,10 @@
 //
 MRawSocketRead::MRawSocketRead(const char *name, const char *title)
-    : fIn(NULL)
+    : fIn(NULL), fPort(-1)
 {
     fName  = name  ? name  : "MRawSocketRead";
     fTitle = title ? title : "Task to read DAQ binary data from tcp/ip socket";
 
-    fIn = new MReadSocket(7000);
+    fIn = new MReadSocket;
 }
 
@@ -84,4 +88,52 @@
 {
     delete fIn;
+}
+
+// --------------------------------------------------------------------------
+//
+// Open the socket. This blocks until the connection has been established,
+// an error occured opening the connection or the user requested to
+// quit the application.
+//
+Bool_t MRawSocketRead::OpenSocket()
+{
+    if (fDisplay)
+        fDisplay->SetStatusLine2(Form("Waiting for connection on port #%d...", fPort));
+
+    //
+    // Open socket connection
+    //
+    while (1)
+    {
+        //
+        // If port could be opened eveything is ok
+        //
+        if (fIn->Open(fPort))
+            return kTRUE;
+
+        //
+        // If a MStatusDisplay is attached the user might have
+        // requested to quit the application
+        //
+        if (fDisplay)
+            switch (fDisplay->CheckStatus())
+            {
+            case MStatusDisplay::kFileClose:
+            case MStatusDisplay::kFileExit:
+                *fLog << inf << "MRawSocketRead::PreProcess - MStatusDisplay triggered exit." << endl;
+                return kFALSE;
+            default:
+                break;
+            }
+
+        //
+        // If an error occured during opening the socket stop
+        //
+        if (fIn->fail())
+            break;
+    }
+
+    *fLog << err << "ERROR - Cannot open port #" << fPort << endl;
+    return kFALSE;
 }
 
@@ -104,4 +156,7 @@
 Int_t MRawSocketRead::PreProcess(MParList *pList)
 {
+    if (!OpenSocket())
+        return kFALSE;
+
     //
     //  check if all necessary containers exist in the Parameter list.
@@ -269,16 +324,21 @@
 
     fEvtNumber=fRawEvtHeader->GetDAQEvtNumber();
-/*
+
     if (fDisplay)
         fDisplay->SetProgressBarPosition((Float_t)fEvtNumber/fRawRunHeader->GetNumEvents());
- */
+
     return kTRUE;
 }
 
 Int_t MRawSocketRead::PostProcess()
-{   /*
+{
+    //
+    // Close Socket connection
+    //
+    fIn->Close();
+
     if (fDisplay)
         fDisplay->SetProgressBarPosition(1);
-     */
+
     return kTRUE;
 }
Index: trunk/MagicSoft/Mars/mraw/MRawSocketRead.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawSocketRead.h	(revision 2489)
+++ trunk/MagicSoft/Mars/mraw/MRawSocketRead.h	(revision 2490)
@@ -4,8 +4,4 @@
 #ifndef MARS_MTask
 #include "MTask.h"
-#endif
-
-#ifndef __IOSFWD__
-#include <iosfwd>
 #endif
 
@@ -33,7 +29,11 @@
     UInt_t          fEvtNumber;     //!
 
-    Int_t PreProcess(MParList *pList);
-    Int_t Process();
-    Int_t PostProcess();
+    Int_t           fPort;          // Port on which we wait for the connection
+
+    Bool_t OpenSocket();
+
+    Int_t  PreProcess(MParList *pList);
+    Int_t  Process();
+    Int_t  PostProcess();
 
 public:
@@ -41,4 +41,6 @@
     ~MRawSocketRead();
 
+    void SetPort(int port) { fPort = port; }
+
     ClassDef(MRawSocketRead, 0)	//Task to read DAQ binary data from tcp/ip socket
 };
