//*CMZ :  1.03/02 25/08/97  16.23.18  by  Fons Rademakers
//*-- Author :    Fons Rademakers   16/09/95

//*KEEP,CopyRight,T=C.
/*************************************************************************
 * Copyright(c) 1995-1999, The ROOT System, All rights reserved.         *
 * Authors: Rene Brun, Fons Rademakers.                                  *
 * For list of contributors see $ROOTSYS/AA_CREDITS.                     *
 *                                                                       *
 * Permission to use, copy, modify and distribute this software and its  *
 * documentation for non-commercial purposes is hereby granted without   *
 * fee, provided that the above copyright notice appears in all copies   *
 * and that both the copyright notice and this permission notice appear  *
 * in the supporting documentation. The authors make no claims about the *
 * suitability of this software for any purpose. It is provided "as is"  *
 * without express or implied warranty.                                  *
 *************************************************************************/
//*KEND.

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TSysEvtHandler                                                       //
//                                                                      //
// Abstract base class for handling system events.                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

//*KEEP,TSysEvtHandler.
#include "TSysEvtHandler.h"
//*KEEP,TSystem.
#include "TSystem.h"
//*KEND.


ClassImp(TSysEvtHandler)
ClassImp(TFileHandler)


//______________________________________________________________________________
 TFileHandler::TFileHandler(int fd, int mask)
{
   // Create a file descriptor event handler.

   fFileNum = fd;
   if (!mask)
      mask = 1;
   fMask = mask;
}

//______________________________________________________________________________
 Bool_t TFileHandler::Notify()
{
   // Notify when event occured on descriptor associated with this handler.

   return kFALSE;
}

//______________________________________________________________________________
 Bool_t TFileHandler::ReadNotify()
{
   // Notify when something can be read from the descriptor associated with
   // this handler.

   return kFALSE;
}

//______________________________________________________________________________
 Bool_t TFileHandler::WriteNotify()
{
   // Notify when something can be written to the descriptor associated with
   // this handler.

   return kFALSE;
}

//______________________________________________________________________________
 Bool_t TFileHandler::HasReadInterest()
{
   // True if handler is interested in read events.

   return (fMask & 1);
}

//______________________________________________________________________________
 Bool_t TFileHandler::HasWriteInterest()
{
   // True if handler is interested in write events.

   return (fMask & 2);
}

//______________________________________________________________________________
 void TFileHandler::Remove()
{
   // Remove file event handler from system file handler list.

   if (gSystem && fFileNum != -1)
      gSystem->RemoveFileHandler(this);
}


ClassImp(TSignalHandler)

//______________________________________________________________________________
TSignalHandler::TSignalHandler(ESignals sig, Bool_t sync)
{
   // Create signal event handler.

   fSignal = sig;
   fSync   = sync;
   fDelay  = 0;
}

//______________________________________________________________________________
Bool_t TSignalHandler::Notify()
{
   // Notify when signal occurs.

   return kFALSE;
}

//______________________________________________________________________________
void TSignalHandler::Remove()
{
   // Remove signal handler from system signal handler list.

   if (gSystem && fSignal != (ESignals)-1)
      gSystem->RemoveSignalHandler(this);
}


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.