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

TSoftwareScalerModule.cc

解説を見る。
00001 // =====================================================================
00002 //  $Id: TSoftwareScalerModule.cc,v 1.4 2004/03/07 10:30:31 goiwai Exp $
00003 //  $Name: CLDAQ-1-14-03 $
00004 //  $Log: TSoftwareScalerModule.cc,v $
00005 //  Revision 1.4  2004/03/07 10:30:31  goiwai
00006 //  ROOTに組みこむためのおまじないマクロを埋めこみました。
00007 //  全てにおいて完全に動作するわけではありません。
00008 //
00009 //  Revision 1.3  2003/10/06 17:02:40  goiwai
00010 //  *** empty log message ***
00011 //
00012 //  Revision 1.2  2003/07/30 16:19:11  goiwai
00013 //  ファイルにコミットログをつけることにしました.
00014 //
00015 // =====================================================================
00016 #include "TSoftwareScalerModule.hh"
00017 #include "TDataSegment.hh"
00018 #include "TDataElement.hh"
00019 
00020 TSoftwareScalerModule::TSoftwareScalerModule( Tint nchannel )
00021   : TSoftwareModule( nchannel ), theChannel( nchannel, 0 )
00022 {;}
00023 
00024 TSoftwareScalerModule::TSoftwareScalerModule( const TSoftwareScalerModule& right )
00025   : TSoftwareModule( right ), theChannel( right.theChannel )
00026 {;}
00027 
00028 TSoftwareScalerModule::~TSoftwareScalerModule()
00029 {;}
00030 
00031 Tvoid TSoftwareScalerModule::FillData( TDataElement& element, Tint channel )
00032 {
00033   if ( channel < 0 || channel >= theNumberOfChannels ) {
00034     Tcerr << "TSoftwareScalerModule::FillData: invalid ID " << channel << Tendl;
00035     theStatus = -EFAULT;
00036     element.FillData( &theStatus, tTypeInt, 1 );
00037   } else {
00038     element.FillData( &theChannel[ channel ], tTypeInt, 1 );
00039   }
00040   return;
00041 }
00042 
00043 const TSoftwareScalerModule& TSoftwareScalerModule::operator=( const TSoftwareScalerModule& right )
00044 {
00045   *( (TSoftwareModule*)this ) = *( (TSoftwareModule*)(&right) );
00046   theChannel = right.theChannel;
00047   return *this;
00048 }
00049 
00050 Tbool TSoftwareScalerModule::operator==( const TSoftwareScalerModule& right ) const
00051 {
00052   Tbool ret = Ttrue;
00053   ret &= ( *( (TSoftwareModule*)this ) == *( (TSoftwareModule*)(&right) ) );
00054   ret &= ( theChannel == right.theChannel );
00055   return ret;
00056 }
00057 
00058 Tbool TSoftwareScalerModule::operator!=( const TSoftwareScalerModule& right ) const
00059 {
00060   Tbool ret = Tfalse;
00061   ret |= ( *( (TSoftwareModule*)this ) != *( (TSoftwareModule*)(&right) ) );
00062   ret |= ( theChannel != right.theChannel );
00063   return ret;
00064 }
00065 
00066 #ifdef __CLDAQ_ROOT_DLL
00067     ClassImp(TSoftwareScalerModule)
00068 #endif


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