// =====================================================================
//  $Id: Rs00ReadoutBookDefinition.cc,v 1.4 2003/10/06 16:28:15 goiwai Exp $
//  $Name: CLDAQ-1-14-06 $
//  $Log: Rs00ReadoutBookDefinition.cc,v $
//  Revision 1.4  2003/10/06 16:28:15  goiwai
//  *** empty log message ***
//
//  Revision 1.3  2003/07/30 16:14:23  goiwai
//  ファイルにコミットログをつけることにしました.
//
// =====================================================================
#include "TReadoutList.hh"
#include "TReadoutSection.hh"
#include "TReadoutSegment.hh"
#include "TCrate.hh"
#include "TReadoutBook.hh"
#include "Rs00ReadoutBookDefinition.hh"

Rs00ReadoutBookDefinition::Rs00ReadoutBookDefinition()
  : TReadoutBookDefinition()
{;}

Rs00ReadoutBookDefinition::~Rs00ReadoutBookDefinition()
{;}

TReadoutBook* Rs00ReadoutBookDefinition::Define()
{
  TReadoutBook* book = new TReadoutBook();

  TReadoutList* event = new TReadoutList( "EVENT" );
  TReadoutSection sec( "RS232C MODULE" );

  // クレート定義で決めた名前と同期していなければならない
  Tstring moduleid;
  Tstring segid;
  //moduleid = "MODEL 2700";
  moduleid = "MODEL 2400";
  segid = moduleid;
  TReadoutSegment seg0( theCrate->GetModule( moduleid ), segid );
  moduleid = "TIMER";
  segid = moduleid;
  TReadoutSegment seg1( theCrate -> GetModule( moduleid ), segid );
  moduleid = "CLOCK";
  segid = moduleid;
  TReadoutSegment seg2( theCrate -> GetModule( moduleid ), segid );


  sec.push_back( seg0 );
  sec.push_back( seg1 );
  sec.push_back( seg2 );
  event -> push_back( sec );

  book -> AddReadoutList( event );

  return book;
}
