Ttypes.h Source File

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

# Ttypes.h

解説を見る。

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