Changeset 12160
- Timestamp:
- 10/02/11 13:28:28 (13 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/Makefile.am
r12000 r12160 70 70 if HAS_HELP2MAN 71 71 dist_man1_MANS = \ 72 dimctrl.man ftmctrl.man datalogger.man triggerschedule.man fitsdump.man 72 dimctrl.man \ 73 ftmctrl.man \ 74 fadctrl.man \ 75 fscctrl.man \ 76 mcp.man \ 77 feedback.man \ 78 biasctrl.man \ 79 datalogger.man \ 80 fitsdump.man 73 81 endif 74 82 … … 377 385 fact_SOURCES = $(fact_SRCADD) $(fact_QT_SOURCES) \ 378 386 gui/CheckBoxDelegate.cc gui/HtmlDelegate.cc \ 379 gui/fact.cc gui/FactGui.cc src/HeadersFTM.cc 387 gui/fact.cc gui/FactGui.cc src/HeadersFTM.cc \ 388 src/PixelMap.cc 380 389 381 390 viewer_LDADD = $(QT4_LIB) $(QT4_LDFLAGS) -L. -lQtOpenGL -lGLU libConfiguration.la libTools.la -
trunk/FACT++/Makefile.in
r12000 r12160 229 229 gui/BasicGlCamera.cc gui/CheckBoxDelegate.cc \ 230 230 gui/HtmlDelegate.cc gui/fact.cc gui/FactGui.cc \ 231 src/HeadersFTM.cc 231 src/HeadersFTM.cc src/PixelMap.cc 232 232 am__objects_2 = 233 233 @HAS_GUI_TRUE@am__objects_3 = gui/design.$(OBJEXT) … … 245 245 gui/CheckBoxDelegate.$(OBJEXT) gui/HtmlDelegate.$(OBJEXT) \ 246 246 gui/fact.$(OBJEXT) gui/FactGui.$(OBJEXT) \ 247 src/HeadersFTM.$(OBJEXT) 247 src/HeadersFTM.$(OBJEXT) src/PixelMap.$(OBJEXT) 248 248 fact_OBJECTS = $(am_fact_OBJECTS) 249 249 am__DEPENDENCIES_1 = … … 690 690 # libAstro.la 691 691 @HAS_HELP2MAN_TRUE@dist_man1_MANS = \ 692 @HAS_HELP2MAN_TRUE@ dimctrl.man ftmctrl.man datalogger.man triggerschedule.man fitsdump.man 692 @HAS_HELP2MAN_TRUE@ dimctrl.man \ 693 @HAS_HELP2MAN_TRUE@ ftmctrl.man \ 694 @HAS_HELP2MAN_TRUE@ fadctrl.man \ 695 @HAS_HELP2MAN_TRUE@ fscctrl.man \ 696 @HAS_HELP2MAN_TRUE@ mcp.man \ 697 @HAS_HELP2MAN_TRUE@ feedback.man \ 698 @HAS_HELP2MAN_TRUE@ biasctrl.man \ 699 @HAS_HELP2MAN_TRUE@ datalogger.man \ 700 @HAS_HELP2MAN_TRUE@ fitsdump.man 693 701 694 702 … … 881 889 test_SOURCES = src/test.cc 882 890 test_LDADD = libTools.la libStateMachine.la libTime.la libDim.la libDim++.la libConfiguration.la 891 892 #test_SOURCES = src/test.cc src/DataCalib.cc src/DataProcessorImp.cc src/DimWriteStatistics.cc src/FitsFile.cc src/MessageImp.cc src/DimDescriptionService.cc src/WindowLog.cc 893 #test_LDADD = libTime.la libDim.la libDim++.la 894 #libTools.la libStateMachine.la libTime.la libDim.la libDim++.la libConfiguration.la 883 895 datalogger_SOURCES = src/datalogger.cc src/LocalControl.h \ 884 896 $(am__append_6) … … 935 947 fact_SOURCES = $(fact_SRCADD) $(fact_QT_SOURCES) \ 936 948 gui/CheckBoxDelegate.cc gui/HtmlDelegate.cc \ 937 gui/fact.cc gui/FactGui.cc src/HeadersFTM.cc 949 gui/fact.cc gui/FactGui.cc src/HeadersFTM.cc \ 950 src/PixelMap.cc 938 951 939 952 viewer_LDADD = $(QT4_LIB) $(QT4_LDFLAGS) -L. -lQtOpenGL -lGLU libConfiguration.la libTools.la … … 1279 1292 gui/FactGui.$(OBJEXT): gui/$(am__dirstamp) \ 1280 1293 gui/$(DEPDIR)/$(am__dirstamp) 1294 src/PixelMap.$(OBJEXT): src/$(am__dirstamp) \ 1295 src/$(DEPDIR)/$(am__dirstamp) 1281 1296 fact$(EXEEXT): $(fact_OBJECTS) $(fact_DEPENDENCIES) 1282 1297 @rm -f fact$(EXEEXT) … … 1494 1509 -rm -f src/MessageImp.$(OBJEXT) 1495 1510 -rm -f src/MessageImp.lo 1511 -rm -f src/PixelMap.$(OBJEXT) 1496 1512 -rm -f src/Readline.$(OBJEXT) 1497 1513 -rm -f src/Readline.lo … … 1615 1631 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/MessageDim.Plo@am__quote@ 1616 1632 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/MessageImp.Plo@am__quote@ 1633 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/PixelMap.Po@am__quote@ 1617 1634 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Readline.Plo@am__quote@ 1618 1635 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ReadlineColor.Plo@am__quote@ -
trunk/FACT++/gui/FactGui.h
r12136 r12160 3690 3690 fDimFadRuns ("FAD_CONTROL/RUNS", (void*)NULL, 0, this), 3691 3691 fDimFadEvents ("FAD_CONTROL/EVENTS", (void*)NULL, 0, this), 3692 fDimFadRawData ("FAD_CONTROL/RAW _DATA", (void*)NULL, 0, this),3692 fDimFadRawData ("FAD_CONTROL/RAWX_DATA", (void*)NULL, 0, this), 3693 3693 fDimFadEventData ("FAD_CONTROL/EVENT_DATA", (void*)NULL, 0, this), 3694 3694 fDimFadConnections ("FAD_CONTROL/CONNECTIONS", (void*)NULL, 0, this), … … 3701 3701 fDimFadRoi ("FAD_CONTROL/REGION_OF_INTEREST", (void*)NULL, 0, this), 3702 3702 fDimFadDac ("FAD_CONTROL/DAC", (void*)NULL, 0, this), 3703 fDimFadDrsCalibration ("FAD_CONTROL/DRS _CALIBRATION", (void*)NULL, 0, this),3703 fDimFadDrsCalibration ("FAD_CONTROL/DRSX_CALIBRATION", (void*)NULL, 0, this), 3704 3704 fDimFadStatus ("FAD_CONTROL/STATUS", (void*)NULL, 0, this), 3705 3705 fDimFadStatistics1 ("FAD_CONTROL/STATISTICS1", (void*)NULL, 0, this), -
trunk/FACT++/src/DataWriteFits.cc
r12148 r12160 44 44 fFile.AddColumn('C', "Errors", 4); 45 45 fFile.AddColumn('I', "SoftTrig"); 46 fFile.AddColumn('I', " PCTime",2);46 fFile.AddColumn('I', "UnixTimeUTC", 2); 47 47 fFile.AddColumn('I', "BoardTime", NBOARDS); 48 48 fFile.AddColumn('S', "StartCellData", NPIX); -
trunk/FACT++/src/PixelMap.h
r12151 r12160 31 31 int group() const { return pixel()>4; } 32 32 int hv() const { return hv_channel+hv_board*32; } 33 34 operator bool() const { return index>=0; } 33 35 }; 34 36 … … 181 183 }; 182 184 183 //const PixelMapEntry PixelMap::empty = { 0, 0, 0, 0, 0, 0 };184 185 185 #endif -
trunk/FACT++/src/feedback.cc
r12067 r12160 301 301 // Kd = 0; 302 302 303 // -110 / -110 (-23 DAC / -0.51V)304 // Reference voltage: -238 / -203305 // -360 / -343 ( 23 DAC / 0.51V)306 307 // 0.005 A/V308 // 220 Amplitude / 1V309 310 // Gain = 1V / 200 = 0.005311 312 303 // => Kp = 0.01 * gain = 0.00005 313 304 // => Ki = 0.8 * gain/20s = 0.00025 314 305 // => Kd = 0.1 * gain/20s = 0.00003 315 306 316 //valarray<double> correction = - Kp*(PV[2] - PV[1]) + Ki * dT * (SP-PV[2]) - Kd/dT * (PV[2] - 2*PV[1] + PV[0]); 307 //valarray<double> correction = 308 // - Kp * (PV[2] - PV[1]) 309 // + dT * Ki * (SP - PV[2]) 310 // - Kd / dT * (PV[2] - 2*PV[1] + PV[0]); 311 // 312 // - (Kp+Kd/dT1) * (PV[2] - PV[1]) 313 // + dT2 * Ki * (SP - PV[2]) 314 // + Kd / dT1 * (PV[1] - PV[0]); 315 // 316 // - Kp * (PV[2] - PV[1]) 317 // + Ki * (SP - PV[2])*dT 318 // - Kd * (PV[2] - PV[1])/dT 319 // + Kd * (PV[1] - PV[0])/dT; 320 // 317 321 //valarray<double> correction = 318 322 // - Kp*(PV[2] - PV[1]) + Ki * T21 * (SP-PV[2]) - Kd*(PV[2]-PV[1])/T21 - Kd*(PV[0]-PV[1])/T01; … … 324 328 ); 325 329 330 /* 331 integral = 0 332 start: 333 integral += (fSP - fPV[2])*dt 334 335 output = Kp*(fSP - fPV[2]) + Ki*integral - Kd*(fPV[2] - fPV[1])/dt 336 337 wait(dt) 338 339 goto start 340 */ 341 326 342 vector<float> vec(2*BIAS::kNumChannels); 327 343 for (int i=0; i<BIAS::kNumChannels; i++) … … 337 353 Info("Sending correction to feedback."); 338 354 339 dic_cmnd_service((char*)"BIAS_CONTROL/ADD_REFERENCE_VOLTAGES",340 (void*)(vec.data()+416), 416*sizeof(float));355 DimClient::sendCommandNB("BIAS_CONTROL/ADD_REFERENCE_VOLTAGES", 356 (void*)(vec.data()+416), 416*sizeof(float)); 341 357 342 358 /* … … 607 623 return 1; 608 624 } 625 626 // -110 / -110 (-23 DAC / -0.51V) 627 // Reference voltage: -238 / -203 628 // -360 / -343 ( 23 DAC / 0.51V) 629 630 // 0.005 A/V 631 // 220 Amplitude / 1V 632 633 // Gain = 1V / 200 = 0.005 609 634 610 635 fGain = 5; // (BIAS)V / (DRS)V ( 1V / 0.22V ) … … 676 701 void PrintHelp() 677 702 { 703 Main::PrintHelp<StateMachineFeedback>(); 704 678 705 /* Additional help text which is printed after the configuration 679 706 options goes here */ -
trunk/FACT++/src/tools.cc
r11229 r12160 73 73 return str.substr(start, end-start+1); 74 74 } 75 76 // -------------------------------------------------------------------------- 77 // 78 //! This is a static helper to remove leading and trailing whitespaces. 79 //! 80 //! Usage example: 81 //! 82 //! \code 83 //! string str = " Dies ist ein test fuer einen ganz langen Satz " 84 //! "und ob er korrekt umgebrochen und formatiert wird. Alles " 85 //! "nur ein simpler test aber trotzdem ganz wichtig."; 86 //! 87 //! cout << setfill('-') << setw(40) << "+" << endl; 88 //! while (1) 89 //! { 90 //! const string rc = Tools::Wrap(str, 40); 91 //! if (rc.empty()) 92 //! break; 93 //! cout << rc << endl; 94 //! } 95 //! \endcode 96 //! 97 string Tools::Wrap(string &str, size_t width) 98 { 99 const size_t pos = str.length()<width ? string::npos : str.find_last_of(' ', width); 100 if (pos==string::npos) 101 { 102 const string rc = str; 103 str = ""; 104 return rc; 105 } 106 107 const size_t indent = str.find_first_not_of(' '); 108 109 const string rc = str.substr(0, pos); 110 const size_t p2 = str.find_first_not_of(' ', pos+1); 111 112 str = str.substr(0, indent) + str.substr(p2==string::npos ? pos+1 : p2); 113 114 return rc; 115 } -
trunk/FACT++/src/tools.h
r11229 r12160 1 #ifndef FACT_Tools 2 #define FACT_Tools 3 1 4 #include <string> 2 5 … … 6 9 std::string Form(const char *fmt, ...); 7 10 std::string Trim(const std::string &str); 11 std::string Wrap(std::string &str, size_t width=78); 8 12 } 13 14 #endif
Note:
See TracChangeset
for help on using the changeset viewer.