メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TEvent.cc

解説を見る。
00001 // =====================================================================
00002 //  $Id: TEvent.cc,v 1.4 2004/03/07 10:30:30 goiwai Exp $
00003 //  $Name: CLDAQ-1-14-03 $
00004 //  $Log: TEvent.cc,v $
00005 //  Revision 1.4  2004/03/07 10:30:30  goiwai
00006 //  ROOTに組みこむためのおまじないマクロを埋めこみました。
00007 //  全てにおいて完全に動作するわけではありません。
00008 //
00009 //  Revision 1.3  2003/10/06 16:56:02  goiwai
00010 //  *** empty log message ***
00011 //
00012 //  Revision 1.2  2003/07/30 16:18:09  goiwai
00013 //  ファイルにコミットログをつけることにしました.
00014 //
00015 // =====================================================================
00016 #include "TEvent.hh"
00017 
00018 TEvent::TEvent( Tint eventID )
00019   : theEventID( eventID ), theDataRecord()
00020 {;}
00021 
00022 TEvent::TEvent( const TDataRecord& eventData )
00023   : theEventID( 0 ), theDataRecord( eventData )
00024 {;}
00025 
00026 TEvent::TEvent( Tint eventID, const TDataRecord& eventData )
00027   : theEventID( eventID ), theDataRecord( eventData )
00028 {;}
00029 
00030 TEvent::TEvent( const TEvent& right )
00031   : theEventID( right.theEventID ), 
00032     theDataRecord( right.theDataRecord )
00033 {;}
00034 
00035 TEvent::~TEvent()
00036 {;}
00037 
00038 const TEvent& TEvent::operator=( const TEvent& right )
00039 {
00040   theEventID = right.theEventID;
00041   theDataRecord = right.theDataRecord;
00042   return *this;
00043 }
00044 
00045 Tbool TEvent::operator==( const TEvent& right ) const
00046 {
00047   if ( theEventID == right.theEventID && theDataRecord == right.theDataRecord ) {
00048     return Ttrue;
00049   } else {
00050     return Tfalse;
00051   }
00052 }
00053 
00054 Tbool TEvent::operator!=( const TEvent& right ) const
00055 {
00056   if ( theEventID != right.theEventID || theDataRecord != right.theDataRecord ) {
00057     return Ttrue;
00058   } else {
00059     return Tfalse;
00060   }
00061 }
00062 
00063 Tvoid TEvent::Clear()
00064 {
00065   theDataRecord.Clear();
00066   theEventID = 0;
00067   return;
00068 }
00069 
00070 Tstring TEvent::GetStringEventID( Tint digits ) const
00071 {
00072   return itostr( theEventID, digits );
00073 }
00074 
00075 #ifdef __CLDAQ_ROOT_DLL
00076     ClassImp(TEvent)
00077 #endif


CLDAQ - a Class Library for DataAcQuisition (Version 1.14.3)
Go IWAI -- goiwai at users.sourceforge.jp