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