// =====================================================================
/*!
//
//  \file TEventAction.hh
//  \brief This file contains the TEventAction class.
//  \author Go IWAI <goiwai@users.sourceforge.jp>
//
//  $Id: TEventAction.hh,v 1.4 2003/11/03 08:35:12 goiwai Exp $
//  $Name: CLDAQ-1-11-00 $
//  $Log: TEventAction.hh,v $
//  Revision 1.4  2003/11/03 08:35:12  goiwai
//  Doxygen用のタグとコメントをうちこんでいく試みを開始しました.
//
//  Revision 1.3  2003/10/06 16:56:02  goiwai
//  *** empty log message ***
//
//  Revision 1.2  2003/07/30 16:18:09  goiwai
//  ファイルにコミットログをつけることにしました.
//
*/
// =====================================================================
#ifndef __TEVENTACTION_HH
#define __TEVENTACTION_HH

#include "Tglobals.h"

class TEvent;
class TReadoutList;
class TRunManager;
class TEventManager;
class TReadoutBook;
class TCrate;


/*!
// \example
//
// If example code exists.
//
*/

/*!
// \class TEventAction
// \brief This is the TEventAction class.
// \author Go IWAI <goiwai@users.sourceforge.jp>
//
// The TEventAction class detail description.
// Write it down ASAP!
//
// \todo None?
// \bug None?
// \ingroup EventCategory
*/
class TEventAction
{

  protected:
    TRunManager* theRunManager;
    TEventManager* theEventManager;
    TReadoutBook* theReadoutBook;
    TCrate* theCrate;

  public:
    TEventAction();
    virtual ~TEventAction();

  public:
    virtual TReadoutList* WaitEvent() = 0;

  public:
    virtual Tvoid BeginOfEventAction( TEvent& anEvent );
    virtual Tvoid EndOfEventAction( TEvent& anEvent );

  public:
    TRunManager* GetRunManager() const;
    TEventManager* GetEventManager() const;
    TReadoutBook* GetReadoutBook() const;
    TCrate* GetCrate() const;
    Tvoid SetRunManager( TRunManager* manager );
    Tvoid SetEventManager( TEventManager* manager );
    Tvoid SetReadoutBook( TReadoutBook* book );
    Tvoid SetCrate( TCrate* crate );

};

inline TRunManager* TEventAction::GetRunManager() const
{
  return theRunManager;
}

inline TEventManager* TEventAction::GetEventManager() const
{
  return theEventManager;
}

inline TReadoutBook* TEventAction::GetReadoutBook() const
{
  return theReadoutBook;
}

inline TCrate* TEventAction::GetCrate() const
{
  return theCrate;
}

inline Tvoid TEventAction::SetRunManager( TRunManager* manager )
{
  theRunManager = manager;
  return;
}

inline Tvoid TEventAction::SetEventManager( TEventManager* manager )
{
  theEventManager = manager;
  return;
}

inline Tvoid TEventAction::SetReadoutBook( TReadoutBook* book )
{
  theReadoutBook = book;
  return;
}

inline Tvoid TEventAction::SetCrate( TCrate* crate )
{
  theCrate = crate;
  return;
}

#endif
