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