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