00001
00002
00003
00004
00005
00006 #ifndef SOURCECARDROUTING_H
00007 #define SOURCECARDROUTING_H
00008
00009
00010 #include <iostream>
00011 #include <string>
00012
00013 class SourceCardRouting {
00014
00015 public:
00016
00017 SourceCardRouting();
00018 ~SourceCardRouting();
00019
00020
00021
00022
00023 void EMUtoSFP( unsigned short (&eIsoRank)[4],
00024 unsigned short (&eIsoCardId)[4],
00025 unsigned short (&eIsoRegionId)[4],
00026 unsigned short (&eNonIsoRank)[4],
00027 unsigned short (&eNonIsoCardId)[4],
00028 unsigned short (&eNonIsoRegionId)[4],
00029 unsigned short (&MIPbits)[7][2],
00030 unsigned short (&Qbits)[7][2],
00031 unsigned short (&SFP)[2][4] );
00032
00033
00034
00035
00036 void SFPtoEMU( unsigned short (&eIsoRank)[4],
00037 unsigned short (&eIsoCardId)[4],
00038 unsigned short (&eIsoRegionId)[4],
00039 unsigned short (&eNonIsoRank)[4],
00040 unsigned short (&eNonIsoCardId)[4],
00041 unsigned short (&eNonIsoRegionId)[4],
00042 unsigned short (&MIPbits)[7][2],
00043 unsigned short (&Qbits)[7][2],
00044 unsigned short (&SFP)[2][4] );
00045
00046
00047
00048
00049
00050 void RC56HFtoSFP( unsigned short (&RC)[7][2],
00051 unsigned short (&RCof)[7][2],
00052 unsigned short (&RCtau)[7][2],
00053 unsigned short (&HF)[4][2],
00054 unsigned short (&HFQ)[4][2],
00055 unsigned short (&SFP)[2][4] );
00056
00057
00058
00059
00060 void SFPtoRC56HF( unsigned short (&RC)[7][2],
00061 unsigned short (&RCof)[7][2],
00062 unsigned short (&RCtau)[7][2],
00063 unsigned short (&HF)[4][2],
00064 unsigned short (&HFQ)[4][2],
00065 unsigned short (&SFP)[2][4] );
00066
00067
00068
00069 void RC012toSFP( unsigned short (&RC)[7][2],
00070 unsigned short (&RCof)[7][2],
00071 unsigned short (&RCtau)[7][2],
00072 unsigned short (&SFP)[2][4] );
00073
00074
00075
00076 void SFPtoRC012( unsigned short (&RC)[7][2],
00077 unsigned short (&RCof)[7][2],
00078 unsigned short (&RCtau)[7][2],
00079 unsigned short (&SFP)[2][4] );
00080
00081
00082
00083 void RC234toSFP( unsigned short (&RC)[7][2],
00084 unsigned short (&RCof)[7][2],
00085 unsigned short (&RCtau)[7][2],
00086 unsigned short (&sisterRC)[7][2],
00087 unsigned short (&sisterRCof)[7][2],
00088 unsigned short (&sisterRCtau)[7][2],
00089 unsigned short (&SFP)[2][4] );
00090
00091
00092
00093 void SFPtoRC234( unsigned short (&RC)[7][2],
00094 unsigned short (&RCof)[7][2],
00095 unsigned short (&RCtau)[7][2],
00096 unsigned short (&sisterRC)[7][2],
00097 unsigned short (&sisterRCof)[7][2],
00098 unsigned short (&sisterRCtau)[7][2],
00099 unsigned short (&SFP)[2][4] );
00100
00101
00102
00103
00104
00105
00106 void SFPtoVHDCI( int RoutingMode,
00107 unsigned short (&SFP)[2][4],
00108 unsigned long (&VHDCI)[2][2] );
00109
00110
00111
00112
00113 void VHDCItoSFP( int RoutingMode,
00114 unsigned short (&SFP)[2][4],
00115 unsigned long (&VHDCI)[2][2] );
00116
00117
00118
00119
00120
00121
00122
00123 void EMUtoVHDCI( unsigned short (&eIsoRank)[4],
00124 unsigned short (&eIsoCardId)[4],
00125 unsigned short (&eIsoRegionId)[4],
00126 unsigned short (&eNonIsoRank)[4],
00127 unsigned short (&eNonIsoCardId)[4],
00128 unsigned short (&eNonIsoRegionId)[4],
00129 unsigned short (&MIPbits)[7][2],
00130 unsigned short (&Qbits)[7][2],
00131 unsigned long (&VHDCI)[2][2] );
00132
00133
00134
00135
00136
00137 void VHDCItoEMU( unsigned short (&eIsoRank)[4],
00138 unsigned short (&eIsoCardId)[4],
00139 unsigned short (&eIsoRegionId)[4],
00140 unsigned short (&eNonIsoRank)[4],
00141 unsigned short (&eNonIsoCardId)[4],
00142 unsigned short (&eNonIsoRegionId)[4],
00143 unsigned short (&MIPbits)[7][2],
00144 unsigned short (&Qbits)[7][2],
00145 unsigned long (&VHDCI)[2][2] );
00146
00147
00148
00149
00150
00151
00152
00153
00154 void RC56HFtoVHDCI( unsigned short (&RC)[7][2],
00155 unsigned short (&RCof)[7][2],
00156 unsigned short (&RCtau)[7][2],
00157 unsigned short (&HF)[4][2],
00158 unsigned short (&HFQ)[4][2],
00159 unsigned long (&VHDCI)[2][2] );
00160
00161
00162
00163
00164 void VHDCItoRC56HF( unsigned short (&RC)[7][2],
00165 unsigned short (&RCof)[7][2],
00166 unsigned short (&RCtau)[7][2],
00167 unsigned short (&HF)[4][2],
00168 unsigned short (&HFQ)[4][2],
00169 unsigned long (&VHDCI)[2][2] );
00170
00171
00172
00173 void RC012toVHDCI( unsigned short (&RC)[7][2],
00174 unsigned short (&RCof)[7][2],
00175 unsigned short (&RCtau)[7][2],
00176 unsigned long (&VHDCI)[2][2]);
00177
00178
00179
00180 void VHDCItoRC012( unsigned short (&RC)[7][2],
00181 unsigned short (&RCof)[7][2],
00182 unsigned short (&RCtau)[7][2],
00183 unsigned long (&VHDCI)[2][2] );
00184
00185
00186
00187 void RC234toVHDCI( unsigned short (&RC)[7][2],
00188 unsigned short (&RCof)[7][2],
00189 unsigned short (&RCtau)[7][2],
00190 unsigned short (&sisterRC)[7][2],
00191 unsigned short (&sisterRCof)[7][2],
00192 unsigned short (&sisterRCtau)[7][2],
00193 unsigned long (&VHDCI)[2][2] );
00194
00195
00196
00197 void VHDCItoRC234( unsigned short (&RC)[7][2],
00198 unsigned short (&RCof)[7][2],
00199 unsigned short (&RCtau)[7][2],
00200 unsigned short (&sisterRC)[7][2],
00201 unsigned short (&sisterRCof)[7][2],
00202 unsigned short (&sisterRCtau)[7][2],
00203 unsigned long (&VHDCI)[2][2] );
00204
00205
00206
00207
00208
00209
00210 void EMUtoSTRING( unsigned short &logicalCardID,
00211 unsigned short &eventNumber,
00212 unsigned short (&eIsoRank)[4],
00213 unsigned short (&eIsoCardId)[4],
00214 unsigned short (&eIsoRegionId)[4],
00215 unsigned short (&eNonIsoRank)[4],
00216 unsigned short (&eNonIsoCardId)[4],
00217 unsigned short (&eNonIsoRegionId)[4],
00218 unsigned short (&MIPbits)[7][2],
00219 unsigned short (&Qbits)[7][2],
00220 std::string &dataString );
00221
00222
00223
00224 void RC56HFtoSTRING( unsigned short &logicalCardID,
00225 unsigned short &eventNumber,
00226 unsigned short (&RC)[7][2],
00227 unsigned short (&RCof)[7][2],
00228 unsigned short (&RCtau)[7][2],
00229 unsigned short (&HF)[4][2],
00230 unsigned short (&HFQ)[4][2],
00231 std::string &dataString );
00232
00233
00234 void RC012toSTRING( unsigned short &logicalCardID,
00235 unsigned short &eventNumber,
00236 unsigned short (&RC)[7][2],
00237 unsigned short (&RCof)[7][2],
00238 unsigned short (&RCtau)[7][2],
00239 std::string &dataString );
00240
00241
00242 void RC234toSTRING( unsigned short &logicalCardID,
00243 unsigned short &eventNumber,
00244 unsigned short (&RC)[7][2],
00245 unsigned short (&RCof)[7][2],
00246 unsigned short (&RCtau)[7][2],
00247 unsigned short (&sisterRC)[7][2],
00248 unsigned short (&sisterRCof)[7][2],
00249 unsigned short (&sisterRCtau)[7][2],
00250 std::string &dataString );
00251
00252
00253
00254
00255 void SFPtoSTRING( unsigned short &logicalCardID,
00256 unsigned short &eventNumber,
00257 int RoutingMode,
00258 unsigned short (&SFP)[2][4],
00259 std::string &dataString );
00260
00261
00262
00263
00264 void STRINGtoVHDCI( unsigned short &logicalCardID,
00265 unsigned short &eventNumber,
00266 std::string &dataString,
00267 unsigned long (&VHDCI)[2][2] );
00268
00269
00270
00271 void VHDCItoSTRING( unsigned short &logicalCardID,
00272 unsigned short &eventNumber,
00273 std::string &dataString,
00274 unsigned long (&VHDCI)[2][2] );
00275
00276
00277
00278 void LogicalCardIDtoRoutingMode( unsigned short &logicalCardID,
00279 int &RoutingMode,
00280 int &RCTCrateNumber );
00281
00282 void RoutingModetoLogicalCardID( unsigned short &logicalCardID,
00283 int &RoutingMode,
00284 int &RCTCrateNumber );
00285
00286
00287
00288 };
00289
00290 #endif //~SOURCECARDMANAGER_H
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391