Changeset 13484
- Timestamp:
- 05/01/12 10:19:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r13478 r13484 45 45 // ######################################################################### 46 46 47 /* 48 class Camera : public TObject 47 class DimSubscriptions 49 48 { 50 typedef pair<double,double> Position;51 typedef vector<Position> Positions;52 53 Positions fGeom;54 55 void CreatePalette()56 {57 58 double ss[5] = {0.00, 0.25, 0.50, 0.75, 1.00};59 double rr[5] = {0.15, 0.00, 0.00, 1.00, 0.85};60 double gg[5] = {0.15, 0.00, 1.00, 0.00, 0.85};61 double bb[5] = {0.15, 1.00, 0.00, 0.00, 0.85};62 63 const Int_t nn = 1440;64 65 Int_t idx = TColor::CreateGradientColorTable(5, ss, rr, gg, bb, nn);66 for (int i=0; i<nn; i++)67 fPalette.push_back(idx++);68 }69 70 void CreateGeometry()71 {72 const double gsSin60 = sqrt(3.)/2;73 74 const int rings = 23;75 76 // add the first pixel to the list77 78 fGeom.push_back(make_pair(0, -0.5));79 80 for (int ring=1; ring<=rings; ring++)81 {82 for (int s=0; s<6; s++)83 {84 for (int i=1; i<=ring; i++)85 {86 double xx, yy;87 switch (s)88 {89 case 0: // Direction South East90 xx = (ring+i)*0.5;91 yy = (-ring+i)*gsSin60;92 break;93 94 case 1: // Direction North East95 xx = ring-i*0.5;96 yy = i*gsSin60;97 break;98 99 case 2: // Direction North100 xx = ring*0.5-i;101 yy = ring*gsSin60;102 break;103 104 case 3: // Direction North West105 xx = -(ring+i)*0.5;106 yy = (ring-i)*gsSin60;107 break;108 109 case 4: // Direction South West110 xx = 0.5*i-ring;111 yy = -i*gsSin60;112 break;113 114 case 5: // Direction South115 xx = i-ring*0.5;116 yy = -ring*gsSin60;117 break;118 }119 120 if (xx*xx + yy*yy - xx > 395.75)121 continue;122 123 fGeom.push_back(make_pair(yy, xx-0.5));124 }125 }126 }127 }128 129 valarray<double> fData;130 vector<bool> fBold;131 vector<bool> fEnable;132 133 int fWhite;134 135 int64_t fMin;136 int64_t fMax;137 138 49 public: 139 Camera() : fData(1440), fBold(1440), fEnable(1440), fWhite(-1), fMin(-1), fMax(-1) 140 { 141 CreatePalette(); 142 CreateGeometry(); 143 144 for (int i=0; i<1440; i++) 145 { 146 fData[i] = i; 147 fBold[i]=false; 148 fEnable[i]=true; 149 } 150 } 151 152 void Reset() { fBold.assign(1440, false); } 153 154 void SetBold(int idx) { fBold[idx]=true; } 155 void SetWhite(int idx) { fWhite=idx; } 156 void SetEnable(int idx, bool b) { fEnable[idx]=b; } 157 void Toggle(int idx) { fEnable[idx]=!fEnable[idx]; } 158 double GetData(int idx) const { return fData[idx]; } 159 void SetMin(int64_t min) { fMin=min; } 160 void SetMax(int64_t max) { fMax=max; } 161 162 const char *GetName() const { return "Camera"; } 163 164 vector<Int_t> fPalette; 165 166 void Paint(const Position &p) 167 { 168 static const Double_t fgCos60 = 0.5; // TMath::Cos(60/TMath::RadToDeg()); 169 static const Double_t fgSin60 = sqrt(3.)/2; // TMath::Sin(60/TMath::RadToDeg()); 170 171 static const Double_t fgDy[6] = { fgCos60, 0., -fgCos60, -fgCos60, 0., fgCos60 }; 172 static const Double_t fgDx[6] = { fgSin60/3, fgSin60*2/3, fgSin60/3, -fgSin60/3, -fgSin60*2/3, -fgSin60/3 }; 173 174 // 175 // calculate the positions of the pixel corners 176 // 177 static Double_t x[7], y[7]; 178 for (Int_t i=0; i<7; i++) 179 { 180 x[i] = p.first + fgDx[i%6]; 181 y[i] = p.second + fgDy[i%6]; 182 } 183 184 gPad->PaintFillArea(6, x, y); 185 gPad->PaintPolyLine(7, x, y); 186 } 187 188 int GetCol(double dmin, double val, double dmax, bool enable) 189 { 190 if (!enable) 191 return kWhite; 192 193 if (val<dmin) 194 return kBlue+4;//kBlack; 195 196 if (val>dmax) 197 return kRed+4;//kWhite; 198 199 const double min = dmin; 200 const double scale = dmax==dmin ? 1 : dmax-dmin; 201 202 const int col = (val-min)/scale*(fPalette.size()-1); 203 204 return gStyle->GetColorPalette(col); 205 } 206 207 void Paint(Option_t *) 208 { 209 gStyle->SetPalette(fPalette.size(), fPalette.data()); 210 211 const double r = double(gPad->GetWw())/gPad->GetWh(); 212 const double max = 20.5; // 20.5 rings in x and y 213 214 if (r>1) 215 gPad->Range(-r*max, -max, r*max, max); 216 else 217 gPad->Range(-max, -max/r, max, max/r); 218 219 Double_t x1, x2, y1, y2; 220 gPad->GetRange(x1, x2, y1, y2); 221 222 double dmin = fData[0]; 223 double dmax = fData[0]; 224 225 for (unsigned int i=0; i<fData.size(); i++) 226 { 227 if (!fEnable[i]) 228 continue; 229 230 if (fData[i]>dmax) 231 dmax = fData[i]; 232 if (fData[i]<dmin) 233 dmin = fData[i]; 234 } 235 236 if (fMin>=0) 237 dmin = fMin; 238 if (fMax>=0) 239 dmax = fMax; 240 241 // const double min = dmin; 242 // const double scale = dmax==dmin ? 1 : dmax-dmin; 243 244 TAttFill fill(0, 1001); 245 TAttLine line; 246 247 int cnt=0; 248 for (Positions::iterator p=fGeom.begin(); p!=fGeom.end(); p++, cnt++) 249 { 250 if (fBold[cnt]) 251 continue; 252 253 const int col = GetCol(dmin, fData[cnt], dmax, fEnable[cnt]); 254 255 fill.SetFillColor(col); 256 fill.Modify(); 257 258 Paint(*p); 259 } 260 261 line.SetLineWidth(2); 262 line.Modify(); 263 264 cnt = 0; 265 for (Positions::iterator p=fGeom.begin(); p!=fGeom.end(); p++, cnt++) 266 { 267 if (!fBold[cnt]) 268 continue; 269 270 const int col = GetCol(dmin, fData[cnt], dmax, fEnable[cnt]); 271 272 fill.SetFillColor(col); 273 fill.Modify(); 274 275 Paint(*p); 276 } 277 278 TMarker m(0,0,kStar); 279 m.DrawMarker(0, 0); 280 281 if (fWhite<0) 282 return; 283 284 const Position &p = fGeom[fWhite]; 285 286 line.SetLineColor(kWhite); 287 line.Modify(); 288 289 const int col = GetCol(dmin, fData[fWhite], dmax, fEnable[fWhite]); 290 291 fill.SetFillColor(col); 292 fill.Modify(); 293 294 Paint(p); 295 } 296 297 int GetIdx(float px, float py) const 298 { 299 static const double sqrt3 = sqrt(3); 300 301 int idx = 0; 302 for (Positions::const_iterator p=fGeom.begin(); p!=fGeom.end(); p++, idx++) 303 { 304 const Double_t dy = py - p->second; 305 if (fabs(dy)>0.5) 306 continue; 307 308 const Double_t dx = px - p->first; 309 310 if (TMath::Abs(dy + dx*sqrt3) > 1) 311 continue; 312 313 if (TMath::Abs(dy - dx*sqrt3) > 1) 314 continue; 315 316 return idx; 317 } 318 return -1; 319 } 320 321 char *GetObjectInfo(Int_t px, Int_t py) const 322 { 323 static stringstream stream; 324 static string str; 325 326 const float x = gPad->AbsPixeltoX(px); 327 const float y = gPad->AbsPixeltoY(py); 328 329 const int idx = GetIdx(x, y); 330 331 stream.seekp(0); 332 if (idx>=0) 333 { 334 stream << "Pixel=" << idx << " Data=" << fData[idx] << '\0'; 335 } 336 337 str = stream.str(); 338 return const_cast<char*>(str.c_str()); 339 } 340 341 Int_t DistancetoPrimitive(Int_t px, Int_t py) 342 { 343 const float x = gPad->AbsPixeltoX(px); 344 const float y = gPad->AbsPixeltoY(py); 345 346 return GetIdx(x, y)>=0 ? 0 : 99999; 347 } 348 349 void SetData(const valarray<double> &data) 350 { 351 fData = data; 352 } 353 354 void SetData(const float *data) 355 { 356 for (int i=0; i<1440; i++) 357 fData[i] = data[i]; 358 } 50 DimStampedInfo fDNS; 51 52 DimStampedInfo fLoggerStats; 53 DimStampedInfo fLoggerFilenameNight; 54 DimStampedInfo fLoggerFilenameRun; 55 DimStampedInfo fLoggerNumSubs; 56 57 DimStampedInfo fFtmPassport; 58 DimStampedInfo fFtmTriggerRates; 59 DimStampedInfo fFtmError; 60 DimStampedInfo fFtmFtuList; 61 DimStampedInfo fFtmStaticData; 62 DimStampedInfo fFtmDynamicData; 63 DimStampedInfo fFtmCounter; 64 65 DimStampedInfo fFadWriteStats; 66 DimStampedInfo fFadStartRun; 67 DimStampedInfo fFadRuns; 68 DimStampedInfo fFadEvents; 69 DimStampedInfo fFadRawData; 70 DimStampedInfo fFadEventData; 71 DimStampedInfo fFadConnections; 72 DimStampedInfo fFadFwVersion; 73 DimStampedInfo fFadRunNumber; 74 DimStampedInfo fFadDNA; 75 DimStampedInfo fFadTemperature; 76 DimStampedInfo fFadPrescaler; 77 DimStampedInfo fFadRefClock; 78 DimStampedInfo fFadRoi; 79 DimStampedInfo fFadDac; 80 DimStampedInfo fFadDrsCalibration; 81 DimStampedInfo fFadStatus; 82 DimStampedInfo fFadStatistics1; 83 DimStampedInfo fFadStatistics2; 84 DimStampedInfo fFadFileFormat; 85 86 DimStampedInfo fFscTemp; 87 DimStampedInfo fFscVolt; 88 DimStampedInfo fFscCurrent; 89 DimStampedInfo fFscHumidity; 90 91 DimStampedInfo fFeedbackDeviation; 92 DimStampedInfo fFeedbackReference; 93 DimStampedInfo fFeedbackCalibration; 94 95 DimStampedInfo fBiasNominal; 96 DimStampedInfo fBiasVolt; 97 DimStampedInfo fBiasDac; 98 DimStampedInfo fBiasCurrent; 99 100 DimStampedInfo fRateScan; 101 102 DimStampedInfo fMagicWeather; 103 104 DimSubscriptions(DimInfoHandler *ptr) : 105 fDNS("DIS_DNS/VERSION_NUMBER", 1, int(0), ptr), 106 //- 107 fLoggerStats ("DATA_LOGGER/STATS", (void*)NULL, 0, ptr), 108 fLoggerFilenameNight("DATA_LOGGER/FILENAME_NIGHTLY", (void*)NULL, 0, ptr), 109 fLoggerFilenameRun ("DATA_LOGGER/FILENAME_RUN", (void*)NULL, 0, ptr), 110 fLoggerNumSubs ("DATA_LOGGER/NUM_SUBS", (void*)NULL, 0, ptr), 111 //- 112 fFtmPassport ("FTM_CONTROL/PASSPORT", (void*)NULL, 0, ptr), 113 fFtmTriggerRates ("FTM_CONTROL/TRIGGER_RATES", (void*)NULL, 0, ptr), 114 fFtmError ("FTM_CONTROL/ERROR", (void*)NULL, 0, ptr), 115 fFtmFtuList ("FTM_CONTROL/FTU_LIST", (void*)NULL, 0, ptr), 116 fFtmStaticData ("FTM_CONTROL/STATIC_DATA", (void*)NULL, 0, ptr), 117 fFtmDynamicData ("FTM_CONTROL/DYNAMIC_DATA", (void*)NULL, 0, ptr), 118 fFtmCounter ("FTM_CONTROL/COUNTER", (void*)NULL, 0, ptr), 119 //- 120 fFadWriteStats ("FAD_CONTROL/STATS", (void*)NULL, 0, ptr), 121 fFadStartRun ("FAD_CONTROL/START_RUN", (void*)NULL, 0, ptr), 122 fFadRuns ("FAD_CONTROL/RUNS", (void*)NULL, 0, ptr), 123 fFadEvents ("FAD_CONTROL/EVENTS", (void*)NULL, 0, ptr), 124 fFadRawData ("FAD_CONTROL/RAW_DATA", (void*)NULL, 0, ptr), 125 fFadEventData ("FAD_CONTROL/EVENT_DATA", (void*)NULL, 0, ptr), 126 fFadConnections ("FAD_CONTROL/CONNECTIONS", (void*)NULL, 0, ptr), 127 fFadFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", (void*)NULL, 0, ptr), 128 fFadRunNumber ("FAD_CONTROL/RUN_NUMBER", (void*)NULL, 0, ptr), 129 fFadDNA ("FAD_CONTROL/DNA", (void*)NULL, 0, ptr), 130 fFadTemperature ("FAD_CONTROL/TEMPERATURE", (void*)NULL, 0, ptr), 131 fFadPrescaler ("FAD_CONTROL/PRESCALER", (void*)NULL, 0, ptr), 132 fFadRefClock ("FAD_CONTROL/REFERENCE_CLOCK", (void*)NULL, 0, ptr), 133 fFadRoi ("FAD_CONTROL/REGION_OF_INTEREST", (void*)NULL, 0, ptr), 134 fFadDac ("FAD_CONTROL/DAC", (void*)NULL, 0, ptr), 135 fFadDrsCalibration ("FAD_CONTROL/DRS_CALIBRATION", (void*)NULL, 0, ptr), 136 fFadStatus ("FAD_CONTROL/STATUS", (void*)NULL, 0, ptr), 137 fFadStatistics1 ("FAD_CONTROL/STATISTICS1", (void*)NULL, 0, ptr), 138 fFadStatistics2 ("FAD_CONTROL/STATISTICS2", (void*)NULL, 0, ptr), 139 fFadFileFormat ("FAD_CONTROL/FILE_FORMAT", (void*)NULL, 0, ptr), 140 //- 141 fFscTemp ("FSC_CONTROL/TEMPERATURE", (void*)NULL, 0, ptr), 142 fFscVolt ("FSC_CONTROL/VOLTAGE", (void*)NULL, 0, ptr), 143 fFscCurrent ("FSC_CONTROL/CURRENT", (void*)NULL, 0, ptr), 144 fFscHumidity ("FSC_CONTROL/HUMIDITY", (void*)NULL, 0, ptr), 145 //- 146 fFeedbackDeviation ("FEEDBACK/DEVIATION", (void*)NULL, 0, ptr), 147 fFeedbackReference ("FEEDBACK/REFERENCE", (void*)NULL, 0, ptr), 148 fFeedbackCalibration("FEEDBACK/CALIBRATION", (void*)NULL, 0, ptr), 149 //- 150 fBiasNominal ("BIAS_CONTROL/NOMINAL", (void*)NULL, 0, ptr), 151 fBiasVolt ("BIAS_CONTROL/VOLTAGE", (void*)NULL, 0, ptr), 152 fBiasDac ("BIAS_CONTROL/DAC", (void*)NULL, 0, ptr), 153 fBiasCurrent ("BIAS_CONTROL/CURRENT", (void*)NULL, 0, ptr), 154 //- 155 fRateScan ("RATE_SCAN/DATA", (void*)NULL, 0, ptr), 156 //- 157 fMagicWeather ("MAGIC_WEATHER/DATA", (void*)NULL, 0, ptr) 158 { 159 } 359 160 }; 360 */361 // #########################################################################362 161 363 162 class FactGui : public MainWindow, public DimNetwork … … 387 186 bool fInChooseBiasCam; // FIXME. Find a better solution 388 187 389 DimStampedInfo fDimDNS;390 391 DimStampedInfo fDimLoggerStats;392 DimStampedInfo fDimLoggerFilenameNight;393 DimStampedInfo fDimLoggerFilenameRun;394 DimStampedInfo fDimLoggerNumSubs;395 396 DimStampedInfo fDimFtmPassport;397 DimStampedInfo fDimFtmTriggerRates;398 DimStampedInfo fDimFtmError;399 DimStampedInfo fDimFtmFtuList;400 DimStampedInfo fDimFtmStaticData;401 DimStampedInfo fDimFtmDynamicData;402 DimStampedInfo fDimFtmCounter;403 404 DimStampedInfo fDimFadWriteStats;405 DimStampedInfo fDimFadStartRun;406 DimStampedInfo fDimFadRuns;407 DimStampedInfo fDimFadEvents;408 DimStampedInfo fDimFadRawData;409 DimStampedInfo fDimFadEventData;410 DimStampedInfo fDimFadConnections;411 DimStampedInfo fDimFadFwVersion;412 DimStampedInfo fDimFadRunNumber;413 DimStampedInfo fDimFadDNA;414 DimStampedInfo fDimFadTemperature;415 DimStampedInfo fDimFadPrescaler;416 DimStampedInfo fDimFadRefClock;417 DimStampedInfo fDimFadRoi;418 DimStampedInfo fDimFadDac;419 DimStampedInfo fDimFadDrsCalibration;420 DimStampedInfo fDimFadStatus;421 DimStampedInfo fDimFadStatistics1;422 DimStampedInfo fDimFadStatistics2;423 DimStampedInfo fDimFadFileFormat;424 425 DimStampedInfo fDimFscTemp;426 DimStampedInfo fDimFscVolt;427 DimStampedInfo fDimFscCurrent;428 DimStampedInfo fDimFscHumidity;429 430 DimStampedInfo fDimFeedbackDeviation;431 DimStampedInfo fDimFeedbackReference;432 DimStampedInfo fDimFeedbackCalibration;433 434 DimStampedInfo fDimBiasNominal;435 DimStampedInfo fDimBiasVolt;436 DimStampedInfo fDimBiasDac;437 DimStampedInfo fDimBiasCurrent;438 439 DimStampedInfo fDimRateScan;440 441 DimStampedInfo fDimMagicWeather;442 443 188 map<string, DimInfo*> fServices; 189 190 DimSubscriptions *fDim; 444 191 445 192 // ========================== LED Colors ================================ … … 3347 3094 getInfo()->getTimestamp(); 3348 3095 3349 if (getInfo()==&fDim DNS)3096 if (getInfo()==&fDim->fDNS) 3350 3097 return PostInfoHandler(&FactGui::handleDimDNS); 3351 3098 #ifdef DEBUG_DIM 3352 3099 cout << "HandleDimInfo " << getInfo()->getName() << endl; 3353 3100 #endif 3354 if (getInfo()==&fDim LoggerStats)3101 if (getInfo()==&fDim->fLoggerStats) 3355 3102 return PostInfoHandler(&FactGui::handleLoggerStats); 3356 3103 … … 3358 3105 // return PostInfoHandler(&FactGui::handleFadFiles); 3359 3106 3360 if (getInfo()==&fDim FadWriteStats)3107 if (getInfo()==&fDim->fFadWriteStats) 3361 3108 return PostInfoHandler(&FactGui::handleFadWriteStats); 3362 3109 3363 if (getInfo()==&fDim FadConnections)3110 if (getInfo()==&fDim->fFadConnections) 3364 3111 return PostInfoHandler(&FactGui::handleFadConnections); 3365 3112 3366 if (getInfo()==&fDim FadFwVersion)3113 if (getInfo()==&fDim->fFadFwVersion) 3367 3114 return PostInfoHandler(&FactGui::handleFadFwVersion); 3368 3115 3369 if (getInfo()==&fDim FadRunNumber)3116 if (getInfo()==&fDim->fFadRunNumber) 3370 3117 return PostInfoHandler(&FactGui::handleFadRunNumber); 3371 3118 3372 if (getInfo()==&fDim FadDNA)3119 if (getInfo()==&fDim->fFadDNA) 3373 3120 return PostInfoHandler(&FactGui::handleFadDNA); 3374 3121 3375 if (getInfo()==&fDim FadTemperature)3122 if (getInfo()==&fDim->fFadTemperature) 3376 3123 return PostInfoHandler(&FactGui::handleFadTemperature); 3377 3124 3378 if (getInfo()==&fDim FadRefClock)3125 if (getInfo()==&fDim->fFadRefClock) 3379 3126 return PostInfoHandler(&FactGui::handleFadRefClock); 3380 3127 3381 if (getInfo()==&fDim FadRoi)3128 if (getInfo()==&fDim->fFadRoi) 3382 3129 return PostInfoHandler(&FactGui::handleFadRoi); 3383 3130 3384 if (getInfo()==&fDim FadDac)3131 if (getInfo()==&fDim->fFadDac) 3385 3132 return PostInfoHandler(&FactGui::handleFadDac); 3386 3133 3387 if (getInfo()==&fDim FadDrsCalibration)3134 if (getInfo()==&fDim->fFadDrsCalibration) 3388 3135 return PostInfoHandler(&FactGui::handleFadDrsCalibration); 3389 3136 3390 if (getInfo()==&fDim FadPrescaler)3137 if (getInfo()==&fDim->fFadPrescaler) 3391 3138 return PostInfoHandler(&FactGui::handleFadPrescaler); 3392 3139 3393 if (getInfo()==&fDim FadStatus)3140 if (getInfo()==&fDim->fFadStatus) 3394 3141 return PostInfoHandler(&FactGui::handleFadStatus); 3395 3142 3396 if (getInfo()==&fDim FadStatistics1)3143 if (getInfo()==&fDim->fFadStatistics1) 3397 3144 return PostInfoHandler(&FactGui::handleFadStatistics1); 3398 3145 3399 if (getInfo()==&fDim FadStatistics2)3146 if (getInfo()==&fDim->fFadStatistics2) 3400 3147 return PostInfoHandler(&FactGui::handleFadStatistics2); 3401 3148 3402 if (getInfo()==&fDim FadFileFormat)3149 if (getInfo()==&fDim->fFadFileFormat) 3403 3150 return PostInfoHandler(&FactGui::handleFadFileFormat); 3404 3151 3405 if (getInfo()==&fDim FadEvents)3152 if (getInfo()==&fDim->fFadEvents) 3406 3153 return PostInfoHandler(&FactGui::handleFadEvents); 3407 3154 3408 if (getInfo()==&fDim FadRuns)3155 if (getInfo()==&fDim->fFadRuns) 3409 3156 return PostInfoHandler(&FactGui::handleFadRuns); 3410 3157 3411 if (getInfo()==&fDim FadStartRun)3158 if (getInfo()==&fDim->fFadStartRun) 3412 3159 return PostInfoHandler(&FactGui::handleFadStartRun); 3413 3160 3414 if (getInfo()==&fDim FadRawData)3161 if (getInfo()==&fDim->fFadRawData) 3415 3162 return PostInfoHandler(&FactGui::handleFadRawData); 3416 3163 3417 if (getInfo()==&fDim FadEventData)3164 if (getInfo()==&fDim->fFadEventData) 3418 3165 return PostInfoHandler(&FactGui::handleFadEventData); 3419 3166 … … 3422 3169 return PostInfoHandler(&FactGui::handleFadSetup); 3423 3170 */ 3424 if (getInfo()==&fDim LoggerFilenameNight)3171 if (getInfo()==&fDim->fLoggerFilenameNight) 3425 3172 return PostInfoHandler(&FactGui::handleLoggerFilenameNight); 3426 3173 3427 if (getInfo()==&fDim LoggerNumSubs)3174 if (getInfo()==&fDim->fLoggerNumSubs) 3428 3175 return PostInfoHandler(&FactGui::handleLoggerNumSubs); 3429 3176 3430 if (getInfo()==&fDim LoggerFilenameRun)3177 if (getInfo()==&fDim->fLoggerFilenameRun) 3431 3178 return PostInfoHandler(&FactGui::handleLoggerFilenameRun); 3432 3179 3433 if (getInfo()==&fDim FtmTriggerRates)3180 if (getInfo()==&fDim->fFtmTriggerRates) 3434 3181 return PostInfoHandler(&FactGui::handleFtmTriggerRates); 3435 3182 3436 if (getInfo()==&fDim FtmCounter)3183 if (getInfo()==&fDim->fFtmCounter) 3437 3184 return PostInfoHandler(&FactGui::handleFtmCounter); 3438 3185 3439 if (getInfo()==&fDim FtmDynamicData)3186 if (getInfo()==&fDim->fFtmDynamicData) 3440 3187 return PostInfoHandler(&FactGui::handleFtmDynamicData); 3441 3188 3442 if (getInfo()==&fDim FtmPassport)3189 if (getInfo()==&fDim->fFtmPassport) 3443 3190 return PostInfoHandler(&FactGui::handleFtmPassport); 3444 3191 3445 if (getInfo()==&fDim FtmFtuList)3192 if (getInfo()==&fDim->fFtmFtuList) 3446 3193 return PostInfoHandler(&FactGui::handleFtmFtuList); 3447 3194 3448 if (getInfo()==&fDim FtmStaticData)3195 if (getInfo()==&fDim->fFtmStaticData) 3449 3196 return PostInfoHandler(&FactGui::handleFtmStaticData); 3450 3197 3451 if (getInfo()==&fDim FtmError)3198 if (getInfo()==&fDim->fFtmError) 3452 3199 return PostInfoHandler(&FactGui::handleFtmError); 3453 3200 3454 if (getInfo()==&fDim FscTemp)3201 if (getInfo()==&fDim->fFscTemp) 3455 3202 return PostInfoHandler(&FactGui::handleFscTemp); 3456 3203 3457 if (getInfo()==&fDim FscVolt)3204 if (getInfo()==&fDim->fFscVolt) 3458 3205 return PostInfoHandler(&FactGui::handleFscVolt); 3459 3206 3460 if (getInfo()==&fDim FscCurrent)3207 if (getInfo()==&fDim->fFscCurrent) 3461 3208 return PostInfoHandler(&FactGui::handleFscCurrent); 3462 3209 3463 if (getInfo()==&fDim FscHumidity)3210 if (getInfo()==&fDim->fFscHumidity) 3464 3211 return PostInfoHandler(&FactGui::handleFscHumidity); 3465 3212 3466 if (getInfo()==&fDim BiasNominal)3213 if (getInfo()==&fDim->fBiasNominal) 3467 3214 return PostInfoHandler(&FactGui::handleBiasNominal); 3468 3215 3469 if (getInfo()==&fDim BiasVolt)3216 if (getInfo()==&fDim->fBiasVolt) 3470 3217 return PostInfoHandler(&FactGui::handleBiasVolt); 3471 3218 3472 if (getInfo()==&fDim BiasDac)3219 if (getInfo()==&fDim->fBiasDac) 3473 3220 return PostInfoHandler(&FactGui::handleBiasDac); 3474 3221 3475 if (getInfo()==&fDim BiasCurrent)3222 if (getInfo()==&fDim->fBiasCurrent) 3476 3223 return PostInfoHandler(&FactGui::handleBiasCurrent); 3477 3224 3478 if (getInfo()==&fDim FeedbackReference)3225 if (getInfo()==&fDim->fFeedbackReference) 3479 3226 return PostInfoHandler(&FactGui::handleFeedbackReference); 3480 3227 3481 if (getInfo()==&fDim FeedbackDeviation)3228 if (getInfo()==&fDim->fFeedbackDeviation) 3482 3229 return PostInfoHandler(&FactGui::handleFeedbackDeviation); 3483 3230 3484 if (getInfo()==&fDim FeedbackCalibration)3231 if (getInfo()==&fDim->fFeedbackCalibration) 3485 3232 return PostInfoHandler(&FactGui::handleFeedbackCalibration); 3486 3233 3487 if (getInfo()==&fDim RateScan)3234 if (getInfo()==&fDim->fRateScan) 3488 3235 return PostInfoHandler(&FactGui::handleRateScan); 3489 3236 3490 if (getInfo()==&fDim MagicWeather)3237 if (getInfo()==&fDim->fMagicWeather) 3491 3238 return PostInfoHandler(&FactGui::handleMagicWeather); 3492 3239 … … 4028 3775 fInChoosePatchTH(false), 4029 3776 fInChooseBiasHv(false), fInChooseBiasCam(false), 4030 fDimDNS("DIS_DNS/VERSION_NUMBER", 1, int(0), this),4031 3777 //- 4032 fDimLoggerStats ("DATA_LOGGER/STATS", (void*)NULL, 0, this), 4033 fDimLoggerFilenameNight("DATA_LOGGER/FILENAME_NIGHTLY", (void*)NULL, 0, this), 4034 fDimLoggerFilenameRun ("DATA_LOGGER/FILENAME_RUN", (void*)NULL, 0, this), 4035 fDimLoggerNumSubs ("DATA_LOGGER/NUM_SUBS", (void*)NULL, 0, this), 4036 //- 4037 fDimFtmPassport ("FTM_CONTROL/PASSPORT", (void*)NULL, 0, this), 4038 fDimFtmTriggerRates ("FTM_CONTROL/TRIGGER_RATES", (void*)NULL, 0, this), 4039 fDimFtmError ("FTM_CONTROL/ERROR", (void*)NULL, 0, this), 4040 fDimFtmFtuList ("FTM_CONTROL/FTU_LIST", (void*)NULL, 0, this), 4041 fDimFtmStaticData ("FTM_CONTROL/STATIC_DATA", (void*)NULL, 0, this), 4042 fDimFtmDynamicData ("FTM_CONTROL/DYNAMIC_DATA", (void*)NULL, 0, this), 4043 fDimFtmCounter ("FTM_CONTROL/COUNTER", (void*)NULL, 0, this), 4044 //- 4045 fDimFadWriteStats ("FAD_CONTROL/STATS", (void*)NULL, 0, this), 4046 fDimFadStartRun ("FAD_CONTROL/START_RUN", (void*)NULL, 0, this), 4047 fDimFadRuns ("FAD_CONTROL/RUNS", (void*)NULL, 0, this), 4048 fDimFadEvents ("FAD_CONTROL/EVENTS", (void*)NULL, 0, this), 4049 fDimFadRawData ("FAD_CONTROL/RAW_DATA", (void*)NULL, 0, this), 4050 fDimFadEventData ("FAD_CONTROL/EVENT_DATA", (void*)NULL, 0, this), 4051 fDimFadConnections ("FAD_CONTROL/CONNECTIONS", (void*)NULL, 0, this), 4052 fDimFadFwVersion ("FAD_CONTROL/FIRMWARE_VERSION", (void*)NULL, 0, this), 4053 fDimFadRunNumber ("FAD_CONTROL/RUN_NUMBER", (void*)NULL, 0, this), 4054 fDimFadDNA ("FAD_CONTROL/DNA", (void*)NULL, 0, this), 4055 fDimFadTemperature ("FAD_CONTROL/TEMPERATURE", (void*)NULL, 0, this), 4056 fDimFadPrescaler ("FAD_CONTROL/PRESCALER", (void*)NULL, 0, this), 4057 fDimFadRefClock ("FAD_CONTROL/REFERENCE_CLOCK", (void*)NULL, 0, this), 4058 fDimFadRoi ("FAD_CONTROL/REGION_OF_INTEREST", (void*)NULL, 0, this), 4059 fDimFadDac ("FAD_CONTROL/DAC", (void*)NULL, 0, this), 4060 fDimFadDrsCalibration ("FAD_CONTROL/XDRS_CALIBRATION", (void*)NULL, 0, this), 4061 fDimFadStatus ("FAD_CONTROL/STATUS", (void*)NULL, 0, this), 4062 fDimFadStatistics1 ("FAD_CONTROL/STATISTICS1", (void*)NULL, 0, this), 4063 fDimFadStatistics2 ("FAD_CONTROL/STATISTICS2", (void*)NULL, 0, this), 4064 fDimFadFileFormat ("FAD_CONTROL/FILE_FORMAT", (void*)NULL, 0, this), 4065 //- 4066 fDimFscTemp ("FSC_CONTROL/TEMPERATURE", (void*)NULL, 0, this), 4067 fDimFscVolt ("FSC_CONTROL/VOLTAGE", (void*)NULL, 0, this), 4068 fDimFscCurrent ("FSC_CONTROL/CURRENT", (void*)NULL, 0, this), 4069 fDimFscHumidity ("FSC_CONTROL/HUMIDITY", (void*)NULL, 0, this), 4070 //- 4071 fDimFeedbackDeviation ("FEEDBACK/DEVIATION", (void*)NULL, 0, this), 4072 fDimFeedbackReference ("FEEDBACK/REFERENCE", (void*)NULL, 0, this), 4073 fDimFeedbackCalibration("FEEDBACK/CALIBRATION", (void*)NULL, 0, this), 4074 //- 4075 fDimBiasNominal ("BIAS_CONTROL/NOMINAL", (void*)NULL, 0, this), 4076 fDimBiasVolt ("BIAS_CONTROL/VOLTAGE", (void*)NULL, 0, this), 4077 fDimBiasDac ("BIAS_CONTROL/DAC", (void*)NULL, 0, this), 4078 fDimBiasCurrent ("BIAS_CONTROL/CURRENT", (void*)NULL, 0, this), 4079 //- 4080 fDimRateScan ("RATE_SCAN/DATA", (void*)NULL, 0, this), 4081 //- 4082 fDimMagicWeather ("MAGIC_WEATHER/DATA", (void*)NULL, 0, this), 3778 fDim(0), 4083 3779 //- 4084 3780 fDimVersion(0), … … 4151 3847 } 4152 3848 4153 // --------------------------------------------------------------------------4154 4155 /*4156 ifstream fin1("Trigger-Patches.txt");4157 4158 string buf;4159 4160 int l = 0;4161 while (getline(fin1, buf, '\n'))4162 {4163 buf = Tools::Trim(buf);4164 if (buf[0]=='#')4165 continue;4166 4167 stringstream str(buf);4168 for (int i=0; i<9; i++)4169 {4170 unsigned int n;4171 str >> n;4172 4173 if (n>=fPatchHW.size())4174 continue;4175 4176 fPatchHW[n] = l;4177 }4178 l++;4179 }4180 4181 if (l!=160)4182 cerr << "WARNING - Problems reading Trigger-Patches.txt" << endl;4183 */4184 // --------------------------------------------------------------------------4185 4186 /*4187 ifstream fin2("MasterList-v3.txt");4188 4189 l = 0;4190 4191 while (getline(fin2, buf, '\n'))4192 {4193 buf = Tools::Trim(buf);4194 if (buf[0]=='#')4195 continue;4196 4197 unsigned int softid, hardid, dummy;4198 4199 stringstream str(buf);4200 4201 str >> softid;4202 str >> dummy;4203 str >> hardid;4204 4205 if (softid>=fPixelMapHW.size())4206 continue;4207 4208 fPixelMapHW[softid] = hardid;4209 4210 l++;4211 }4212 4213 if (l!=1440)4214 cerr << "WARNING - Problems reading MasterList-v3.txt" << endl;4215 */4216 3849 // -------------------------------------------------------------------------- 4217 3850 … … 4617 4250 connect(fAdcDataCanv, SIGNAL( RootEventProcessed(TObject*, unsigned int, TCanvas*)), 4618 4251 this, SLOT (slot_RootEventProcessed(TObject*, unsigned int, TCanvas*))); 4252 4253 4254 fDim = new DimSubscriptions(this); 4619 4255 } 4620 4256 4621 4257 ~FactGui() 4622 4258 { 4259 4260 delete fDim; 4261 4623 4262 // Unsubscribe all services 4624 4263 for (map<string,DimInfo*>::iterator i=fServices.begin();
Note:
See TracChangeset
for help on using the changeset viewer.