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

Ttypes.h

解説を見る。
00001 // =====================================================================
00002 //  $Id: Ttypes.h,v 1.6 2003/07/30 18:31:09 goiwai Exp $
00003 //  $Name: CLDAQ-1-07-00 $
00004 //
00005 //  $Log: Ttypes.h,v $
00006 //  Revision 1.6  2003/07/30 18:31:09  goiwai
00007 //  バージョンを1.7.0としました.
00008 //  ここまでのものを CLDAQ-1-07-00 としてタグします.
00009 //
00010 //  Revision 1.5  2003/07/30 16:21:22  goiwai
00011 //  ファイルにコミットログをつけることにしました.
00012 //
00013 // =====================================================================
00014 #ifndef __TTYPES_HH
00015 #define __TTYPES_HH
00016 
00017 #include <iostream.h>
00018 #include <iomanip.h>
00019 #include <fstream.h>
00020 #include <stdio.h>
00021 #include <string>
00022 #include <list>
00023 #include <vector>
00024 #include <strstream.h>
00025 
00026 #define Tfalse 0
00027 #define Ttrue 1
00028 #define Tstd std
00029 #define Tios Tstd::ios
00030 #define Tin Tios::inin
00031 #define Tout Tios::out
00032 #define Tate Tios::ate
00033 #define Tapp Tios::app
00034 #define Ttrunc Tios::trunc
00035 #define Tnocreate Tios::nocreate
00036 #define Tnoreplace Tios::noreplace
00037 #define Tbin Tios::bin
00038 #define Tbinary Tios::binary
00039 #define Tgoodbit Tios::goodbit
00040 #define Teofbit Tios::eofbit
00041 #define Tfailbit Tios::failbit
00042 #define Tbadbit Tios::badbit
00043 #define Tostream Tstd::ostream
00044 #define Tostrstream Tstd::ostrstream
00045 #define Tistream Tstd::istream
00046 #define Tlist Tstd::list
00047 #define Tvector Tstd::vector
00048 #define Tcout Tstd::cout
00049 #define Tcin Tstd::cin
00050 #define Tcerr Tstd::cerr
00051 #define Tendl Tstd::endl
00052 #define Tends Tstd::ends
00053 #define Tdec Tstd::dec
00054 #define Thex Tstd::hex
00055 #define Toct Tstd::oct
00056 #define Tflush Tstd::flush
00057 #define Tsizeof(_type_) sizeof(_type_)
00058 
00059 typedef double Tdouble;
00060 typedef int Tint;
00061 typedef float Tfloat;
00062 typedef char Tchar;
00063 typedef long Tlong;
00064 typedef unsigned char TUchar;
00065 typedef unsigned int TUint;
00066 typedef unsigned long TUlong;
00067 typedef short Tshort;
00068 typedef unsigned short TUshort;
00069 typedef bool Tbool;
00070 typedef Tbool Tbit;
00071 typedef FILE TFileStream;
00072 typedef size_t Tsize_t;
00073 typedef pid_t Tpid_t;
00074 typedef time_t Ttime_t;
00075 typedef socklen_t Tsocklen_t;
00076 typedef caddr_t Tcaddr_t;
00077 typedef off_t Toff_t;
00078 typedef pthread_t Tthread_t;
00079 typedef clock_t Tclock_t;
00080 typedef void Tvoid;
00081 typedef Tstd::string Tstring;
00082 typedef Tstd::ofstream Tofstream;
00083 typedef Tstd::ifstream Tifstream;
00084 typedef Tvector<Tint> TintList;
00085 typedef Tvector<TUint> TUintList;
00086 typedef Tvector<TUshort> TUshortList;
00087 typedef Tvector<Tdouble> TdoubleList;
00088 typedef Tvector<Tfloat> TfloatList;
00089 typedef Tvector<Tstring> TstringList;
00090 #ifdef __CLDAQ_ZLIB_USE
00091 typedef z_stream Tzstream;
00092 typedef Byte Tbyte;
00093 #endif
00094 
00095 static const Tstring Tspace = " ";
00096 static const Tstring Thyphen = "-";
00097 static const Tstring Tslash = "/";
00098 static const Tstring Twslash = Tslash + Tslash;
00099 static const Tstring Twquote = "\"";
00100 static const Tstring Tquote = "'";
00101 static const Tstring Tsharp = "#";
00102 static const Tstring Tpipe = "|";
00103 static const Tstring Tcolon = ":";
00104 static const Tstring Twspace = Tspace + Tspace;
00105 static const Tstring Ttab = "\t";
00106 static const Tstring Tbeep = "\b";
00107 static const Tstring Thour = "h";
00108 static const Tstring Tmin = "m";
00109 static const Tstring Tsec = "s";
00110 static const Tstring Tmsec = "ms";
00111 static const Tstring Tusec = "us";
00112 static const Tstring Tnsec = "ns";
00113 static const Tstring Tid = "$Id: Ttypes.h,v 1.6 2003/07/30 18:31:09 goiwai Exp $";
00114 static const Tstring Tname = "$Name: CLDAQ-1-07-00 $";
00115 static const Tstring Tproject = "CLDAQ";
00116 static const Tstring Tversion = "1.7.0";
00117 static const Tstring Texit = "exit";
00118 static const Tstring Tprompt = Tproject + Thyphen + Tversion + ">" + Tspace;
00119 static const Tchar Tkey = '\x01';
00120 static const Tchar Teol = '\n';
00121 
00122 enum Tobject_t { 
00123   tObjectDataRecord,
00124   tObjectDataSection,
00125   tObjectDataSegment,
00126   tObjectDataElement,
00127   tObject1DHistogram,
00128   tObject2DHistogram,
00129   tObjectAppendGraph,
00130   tObjectSubstituteGraph,
00131   tObjectNtuple,
00132   tNumberOfObjectTypes,
00133   tObjectUnknown = -1
00134 };
00135 
00136 enum Telement_t {
00137   tTypeInt,
00138   tTypeString,
00139   tTypeDouble,
00140   tTypeObject,
00141   tTypeFloat,
00142   tTypeUnsignedShort,
00143   tTypeShort,
00144   tTypeWord,
00145   tTypeLong,
00146   tTypeUnsignedLong,
00147   tTypeUnsignedInt,
00148   tNumberOfElementTypes,
00149   tTypeUnknown = -1
00150 };
00151 
00152 enum Tstream_t { 
00153   tFileStream,
00154   tSocketStream,
00155   tSharedMemoryStream,
00156   tNumberOfStreamTypes,
00157   tUnknownStream = -1
00158 };
00159 
00160 enum Trandom_t {
00161   tRandomExponential,
00162   tRandomGaussian,
00163   tRandomChiSquare,
00164   tRandomLandau,
00165   tRandomGamma,
00166   tRandomPoisson,
00167   tNumberOfRandomTypes,
00168   tRandomUnknown = -1
00169 };
00170 
00171 enum Tstatus_t {
00172   tStatusStandby,
00173   tStatusReady,
00174   tStatusBusy,
00175   tStatusIdle,
00176   tStatusWaitingReady,
00177   tStatusJustTakingEvent,
00178   tStatusJustRecordingEvent,
00179   tStatusSleep,
00180   tStatusDead,
00181   tNumberOfStatusTypes,
00182   tStatusUnknown = -1
00183 };
00184 
00185 enum TvmeTransfer_t {
00186   tA16D16,
00187   tA16D32,
00188   tA24D16,
00189   tA24D32,
00190   tA32D16,
00191   tA32D32,
00192   tA24D16dma,
00193   tA32D16dma,
00194   tA24D32dma,
00195   tA32D32dma, 
00196   tNumberOfVmeTransferModes,
00197   tTransferModeUnknown = -1
00198 };
00199 
00200 // with Sanshiro driver
00201 static const Tstring TvmeDevices[ tNumberOfVmeTransferModes ] =
00202 {
00203   "/dev/vmedrv16d16",
00204   "/dev/vmedrv16d32",
00205   "/dev/vmedrv24d16",
00206   "/dev/vmedrv24d32",
00207   "/dev/vmedrv32d16",
00208   "/dev/vmedrv32d32",
00209   "/dev/vmedrv24d16dma",
00210   "/dev/vmedrv32d16dma",
00211   "/dev/vmedrv24d32dma",
00212   "/dev/vmedrv32d32dma"
00213 };
00214 
00215 enum TcamacCrateController_t {
00216   tISAcc7000_1,
00217   tISAcc7000_2,
00218   tISAcc7000_3,
00219   tISAcc7000_4,
00220   tISAcc7700_1,
00221   tISAcc7700_2,
00222   tISAcc7700_3,
00223   tISAcc7700_4, 
00224   tPCIcc7700_1,
00225   tPCIcc7700_2,
00226   tPCIcc7700_3,
00227   tPCIcc7700_4,
00228   tNumberOfCamacCrateController,
00229   tCamacCrateControllerUnknown = -1
00230 };
00231 
00232 // with Yasu driver
00233 static const Tstring TcamacDevices[ tNumberOfCamacCrateController ] =
00234 {
00235   "/dev/ISAcc7000.1",
00236   "/dev/ISAcc7000.2",
00237   "/dev/ISAcc7000.3",
00238   "/dev/ISAcc7000.4",
00239   "/dev/ISAcc7700.1",
00240   "/dev/ISAcc7700.2",
00241   "/dev/ISAcc7700.3",
00242   "/dev/ISAcc7700.4",
00243   "/dev/PCIcc7700.1",
00244   "/dev/PCIcc7700.2",
00245   "/dev/PCIcc7700.3",
00246   "/dev/PCIcc7700.4"
00247 };
00248 
00249 enum Truninfo_t { 
00250   tInfoFreeValue,
00251   tInfoSelectableValue,
00252   tInfoFreeText,
00253   tNumberOfInformations,
00254   tInfoUnknown = -1
00255 };
00256 
00257 enum { 
00258   tIDunknown = -1
00259 };
00260 
00261 static const Tstring TunknownID = "unkown ID";
00262 
00263 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.7.0)
Go IWAI <goiwai@users.sourceforge.jp>