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

TCamacScalerModule.cc

解説を見る。
00001 // =====================================================================
00002 //  $Id: TCamacScalerModule.cc,v 1.4 2004/03/07 10:30:31 goiwai Exp $
00003 //  $Name: CLDAQ-1-14-03 $
00004 //  $Log: TCamacScalerModule.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:10  goiwai
00013 //  ファイルにコミットログをつけることにしました.
00014 //
00015 // =====================================================================
00016 #include "TCamacScalerModule.hh"
00017 #include "TDataSegment.hh"
00018 #include "TDataElement.hh"
00019 
00020 TCamacScalerModule::TCamacScalerModule( TCamacCrateController* cc7x00, Tint slot, Tint nch, Tdata_t datalen )
00021   : TCamacModule( cc7x00, slot, nch, datalen )
00022 {;}
00023 
00024 TCamacScalerModule::TCamacScalerModule( const TCamacScalerModule& right )
00025   : TCamacModule( right )
00026 {;}
00027 
00028 TCamacScalerModule::~TCamacScalerModule()
00029 {;}
00030 
00031 const TCamacScalerModule& TCamacScalerModule::operator=( const TCamacScalerModule& right )
00032 {
00033   *( (TCamacModule*)this ) = *( (TCamacModule*)(&right) );
00034   return *this;
00035 }
00036 
00037 Tbool TCamacScalerModule::operator==( const TCamacScalerModule& right ) const
00038 {
00039   return *( (TCamacModule*)this ) == *( (TCamacModule*)(&right) );
00040 }
00041 
00042 Tbool TCamacScalerModule::operator!=( const TCamacScalerModule& right ) const
00043 {
00044   return *( (TCamacModule*)this ) != *( (TCamacModule*)(&right) );
00045 }
00046 
00047 Tvoid TCamacScalerModule::FillData( TDataElement& element, Tint channel )
00048 {
00049   if ( channel < 0 || channel >= theNumberOfChannels ) {
00050     Tcerr << "TCamacScalerModule::FillData: invalid ID " << channel << Tendl;
00051     element.FillData( &theStatus, tTypeInt, 1 );
00052   } else {
00053     Read( channel );
00054     element.FillData( &theCamacData, tTypeUnsignedInt, 1 );
00055   }
00056   return;
00057 }
00058 
00059 Tint TCamacScalerModule::ReadOverflowChannel()
00060 {
00061   return execute( 0, 1 );
00062 }
00063 
00064 Tint TCamacScalerModule::ClearOverflowChannel()
00065 {
00066   return execute( 0, 10 );
00067 }
00068 
00069 Tint TCamacScalerModule::IncrementAllChannel()
00070 {
00071   return execute( 0, 25 );
00072 }
00073 
00074 Tint TCamacScalerModule::Clear()
00075 {
00076   ClearOverflowChannel();
00077   return execute( 0, tCamacClear );
00078 }
00079 
00080 Tint TCamacScalerModule::Update()
00081 {
00082   return Clear();
00083 }
00084 
00085 Tint TCamacScalerModule::Initialize()
00086 {
00087   return Clear();  
00088 }
00089 
00090 #ifdef __CLDAQ_ROOT_DLL
00091     ClassImp(TCamacScalerModule)
00092 #endif


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