Changeset 11983
- Timestamp:
- 09/06/11 12:54:57 (13 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/Makefile.am
r11982 r11983 38 38 chatclient chatserv \ 39 39 biasctrl \ 40 mcp feedback\40 mcp \ 41 41 fitsdump 42 42 … … 269 269 libConfiguration.la 270 270 271 feedback_SOURCES = src/feedback.cc src/LocalControl.h272 feedback_LDADD = libDim.la libDim++.la libDimExtension.la \273 libTime.la libTools.la libStateMachine.la \274 libConfiguration.la275 276 271 277 272 argv_SOURCES = src/argv.cc -
trunk/FACT++/Makefile.in
r11982 r11983 52 52 fadctrl$(EXEEXT) fad$(EXEEXT) fscctrl$(EXEEXT) fsc$(EXEEXT) \ 53 53 chatclient$(EXEEXT) chatserv$(EXEEXT) biasctrl$(EXEEXT) \ 54 mcp$(EXEEXT) feedback$(EXEEXT) fitsdump$(EXEEXT) \ 55 $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ 56 $(am__EXEEXT_4) 54 mcp$(EXEEXT) fitsdump$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \ 55 $(am__EXEEXT_3) $(am__EXEEXT_4) 57 56 @HAS_GUI_TRUE@am__append_1 = fact 58 57 @HAS_VIEWER_TRUE@am__append_2 = viewer … … 271 270 fadctrl_DEPENDENCIES = libDim.la libDim++.la libDimExtension.la \ 272 271 libTime.la libTools.la libStateMachine.la libConfiguration.la 273 am_feedback_OBJECTS = src/feedback.$(OBJEXT)274 feedback_OBJECTS = $(am_feedback_OBJECTS)275 feedback_DEPENDENCIES = libDim.la libDim++.la libDimExtension.la \276 libTime.la libTools.la libStateMachine.la libConfiguration.la277 272 am_fitsdump_OBJECTS = src/fitsdump.$(OBJEXT) 278 273 fitsdump_OBJECTS = $(am_fitsdump_OBJECTS) … … 398 393 $(dimctrl_SOURCES) $(dns_SOURCES) $(drivectrl_SOURCES) \ 399 394 $(dserver2_SOURCES) $(fact_SOURCES) $(fad_SOURCES) \ 400 $(fadctrl_SOURCES) $(feedback_SOURCES) $(fitsdump_SOURCES) \ 401 fitsgrep.c $(fitsloader_SOURCES) $(fsc_SOURCES) \ 402 $(fscctrl_SOURCES) $(ftm_SOURCES) $(ftmctrl_SOURCES) \ 403 $(log_SOURCES) $(logtime_SOURCES) $(mcp_SOURCES) \ 404 $(readfits_SOURCES) sched.c $(scheduler_SOURCES) \ 405 $(test_SOURCES) $(time_SOURCES) $(triggerschedule_SOURCES) \ 406 $(viewer_SOURCES) 395 $(fadctrl_SOURCES) $(fitsdump_SOURCES) fitsgrep.c \ 396 $(fitsloader_SOURCES) $(fsc_SOURCES) $(fscctrl_SOURCES) \ 397 $(ftm_SOURCES) $(ftmctrl_SOURCES) $(log_SOURCES) \ 398 $(logtime_SOURCES) $(mcp_SOURCES) $(readfits_SOURCES) sched.c \ 399 $(scheduler_SOURCES) $(test_SOURCES) $(time_SOURCES) \ 400 $(triggerschedule_SOURCES) $(viewer_SOURCES) 407 401 DIST_SOURCES = $(libConfiguration_la_SOURCES) $(libDim___la_SOURCES) \ 408 402 $(libDim_la_SOURCES) $(libDimExtension_la_SOURCES) \ … … 414 408 $(drivectrl_SOURCES) $(dserver2_SOURCES) \ 415 409 $(am__fact_SOURCES_DIST) $(fad_SOURCES) \ 416 $(am__fadctrl_SOURCES_DIST) $(feedback_SOURCES) \ 417 $(fitsdump_SOURCES) fitsgrep.c $(fitsloader_SOURCES) \ 418 $(fsc_SOURCES) $(fscctrl_SOURCES) $(ftm_SOURCES) \ 419 $(ftmctrl_SOURCES) $(log_SOURCES) $(logtime_SOURCES) \ 420 $(mcp_SOURCES) $(readfits_SOURCES) sched.c \ 410 $(am__fadctrl_SOURCES_DIST) $(fitsdump_SOURCES) fitsgrep.c \ 411 $(fitsloader_SOURCES) $(fsc_SOURCES) $(fscctrl_SOURCES) \ 412 $(ftm_SOURCES) $(ftmctrl_SOURCES) $(log_SOURCES) \ 413 $(logtime_SOURCES) $(mcp_SOURCES) $(readfits_SOURCES) sched.c \ 421 414 $(scheduler_SOURCES) $(test_SOURCES) $(time_SOURCES) \ 422 415 $(triggerschedule_SOURCES) $(am__viewer_SOURCES_DIST) … … 859 852 libConfiguration.la 860 853 861 feedback_SOURCES = src/feedback.cc src/LocalControl.h862 feedback_LDADD = libDim.la libDim++.la libDimExtension.la \863 libTime.la libTools.la libStateMachine.la \864 libConfiguration.la865 866 854 argv_SOURCES = src/argv.cc 867 855 argv_LDADD = libConfiguration.la … … 1303 1291 @rm -f fadctrl$(EXEEXT) 1304 1292 $(AM_V_CXXLD)$(CXXLINK) $(fadctrl_OBJECTS) $(fadctrl_LDADD) $(LIBS) 1305 src/feedback.$(OBJEXT): src/$(am__dirstamp) \1306 src/$(DEPDIR)/$(am__dirstamp)1307 feedback$(EXEEXT): $(feedback_OBJECTS) $(feedback_DEPENDENCIES)1308 @rm -f feedback$(EXEEXT)1309 $(AM_V_CXXLD)$(CXXLINK) $(feedback_OBJECTS) $(feedback_LDADD) $(LIBS)1310 1293 src/fitsdump.$(OBJEXT): src/$(am__dirstamp) \ 1311 1294 src/$(DEPDIR)/$(am__dirstamp) … … 1529 1512 -rm -f src/fad.$(OBJEXT) 1530 1513 -rm -f src/fadctrl.$(OBJEXT) 1531 -rm -f src/feedback.$(OBJEXT)1532 1514 -rm -f src/fitsdump.$(OBJEXT) 1533 1515 -rm -f src/fitsloader.$(OBJEXT) … … 1639 1621 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fad.Po@am__quote@ 1640 1622 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fadctrl.Po@am__quote@ 1641 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/feedback.Po@am__quote@1642 1623 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fitsdump.Po@am__quote@ 1643 1624 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fitsloader.Po@am__quote@ -
trunk/FACT++/ftmctrl.rc
r11982 r11983 1 console=22 3 run-type=data4 run-type=pedestal5 run-type=drs-calib6 7 sampling-frequency.default = 20008 9 ftu-report-interval.default = 10010 11 12 [trigger]13 enable-trigger.default = yes14 enable-trigger.pedestal = no15 enable-trigger.drs-calib = no16 17 enable-external-1.default = no18 enable-external-2.default = no19 enable-veto.default = no20 enable-clock-conditioner.default = no21 22 multiplicity-physics.default = 123 multiplicity-calib.default = 4024 coincidence-window-physics.default = 1025 coincidence-window-calib.default = 1026 dead-time.default = 2527 delay.default = 2528 time-marker-delay.default = 2529 30 #disable-patch.default =31 #disable-pixel.default =32 33 34 [trigger.threshold]35 36 patch.default = 15037 logic.default = 1638 39 40 [trigger.sequence]41 interval.default = 5042 pedestal.default = 043 lp-int.default = 044 lp-ext.default = 045 46 47 [light-pulser.external]48 49 intensity.default = 10050 enable-group1.default = no51 enable-group2.default = no52 53 54 [light-pulser.internal]55 56 intensity.default = 1057 enable-group1.default = no58 enable-group2.default = no59 60 61 1 [clock-conditioner] 62 2 frequency = 800 … … 96 36 R15.4000 = 0x1400fa0f 97 37 R15.5000 = 0x0802710f 98 -
trunk/FACT++/src/RemoteControl.h
r11982 r11983 121 121 { 122 122 } 123 124 //void SetReceiver(void *) { }125 123 126 124 bool PrintGeneralHelp() -
trunk/FACT++/src/argv.cc
r11982 r11983 4 4 5 5 using namespace std; 6 7 template<class T,class S>8 std::ostream &operator<<(std::ostream &out, const pair<T,S> &f)9 {10 out << f.first << "|" << f.second;11 return out;12 }13 template<class T, class S>14 std::istream &operator>>(std::istream &in, pair<T,S> &f)15 {16 char c;17 in >> f.first;18 in >> c;19 if (c!=':')20 return in;21 in >> f.second;22 return in;23 }24 25 typedef pair<int,int> mytype;26 27 28 //Source is OutputStreamable, meaning that an operator<< is defined29 // that takes a std::ostream or std::wostream object on the left hand side30 // and an instance of the argument type on the right.31 32 // Target is InputStreamable, meaning that an operator>> is defined that33 // takes a std::istream or std::wistream object on the left hand side and34 // an instance of the result type on the right.35 36 //Target is CopyConstructible [20.1.3].37 //Target is DefaultConstructible, meaning that it is possible to default-initialize an object of that type [8.5, 20.1.4].38 6 39 7 // -------------------------------------------------------------------------- … … 99 67 po::options_description config("Configuration"); 100 68 config.add_options() 101 ("xxx", vars<int>(), "Print available commandline options.")102 ("test.*", var<int>(), "Print available commandline options.")103 ("map.*", var<int>(), "Print available commandline options.")104 69 ("compression", var<int>(), "set compression level") 105 70 ("optimization", var<int>(10, &opt), "optimization level") … … 117 82 ("switch", po_switch(), "include path") 118 83 ("bool", var<bool>()->implicit_value(true), "include path") 119 ("mytype", var<mytype>(), "include path")120 84 ; 121 85 … … 206 170 cout << "Program " << argv[0] << " started successfully." << endl; 207 171 208 cout << conf.Has("test.A") << " " << conf.Get<int>("test.A") << endl;209 cout << conf.Has("test.%") << " " << conf.Get<int>("test.%") << endl;210 cout << conf.Has("test.9") << " " << conf.Get<int>("test.9") << endl;211 cout << conf.Has("test.data") << " " << conf.Get<int>("test.data") << endl;212 cout << conf.Has("test.pedestal") << " " << conf.Get<int>("test.pedestal") << endl;213 cout << conf.Has("map.1") << " " << conf.Get<int>("map.1") << endl;214 cout << conf.Has("map.2") << " " << conf.Get<int>("map.2") << endl;215 216 return 0;217 218 172 cout << conf.Has("switch") << " " << conf.Get<bool>("switch") << endl; 219 cout << conf.Has("bool") << " " << conf.Get<bool>("bool") << endl; 220 cout << conf.Has("mytype") << " " << conf.Get<mytype>("mytype") << endl; 221 222 cout << "---" << endl; 223 cout << conf.Has("test:A") << " " << conf.Get<int>("test:A") << endl; 224 cout << conf.Has("test:%") << " " << conf.Get<int>("test:%") << endl; 225 cout << conf.Has("test:9") << " " << conf.Get<int>("test:9") << endl; 226 227 /* 228 map<string, int> m = conf.GetMap<int>("test:"); 229 230 cout << m["test:A"] << endl; 231 cout << m["test:%"] << endl; 232 cout << m["test:9"] << endl; 233 */ 234 173 cout << conf.Has("bool") << " " << conf.Get<bool>("bool") << endl; 235 174 236 175 return 0; -
trunk/FACT++/src/logtime.cc
r11982 r11983 6 6 #include <iostream> 7 7 8 #include "DimDescriptionService.h"9 10 8 int main(int, const char **) 11 9 { 12 10 // We could use putenv to make the Configure class change the value... 13 11 setenv("DIM_DNS_NODE", "localhost", 0); 14 12 … … 16 14 DimServer::start("TIME"); 17 15 18 usleep(2000000);19 20 DimServer::stop();21 22 return 0;23 24 16 // Some info on the console 25 17 std::cout << "Offering TIME/MESSAGE...\n" << std::endl; 26 27 short s;28 int i;29 long long ll;30 float f;31 DimDescribedService servt("TIME/TEST", "O:1;I:1;C",32 "This is my test command|Char[c]:This is a char| Int This is an int|String[s]:This is a string");33 34 DimDescribedService servs("TIME/SHORT", s, "[a]");35 DimDescribedService servx("TIME/LONGLONG", ll, "|: This is my long long");36 DimDescribedService servi("TIME/INT", i, "|MyInt [ mi ] ");37 DimDescribedService servf("TIME/FLOAT", f, "| MyFloat : This is my float");38 DimDescribedService servc("TIME/TIME", const_cast<char*>(""), "|MyTime[T]:This is my time");39 40 DimCommand cmd("TIME/CMD", "I:2;F:2");41 42 DimDescriptionService des("TIME/CMD", "|range[addr]:From DAC to DAC|values[DAC]:DAC values to be set");43 44 {45 Time t0;46 18 47 19 // Setup a DimService called TIME/MESSAGE … … 51 23 // Send current time 52 24 msg.Message(Time().GetAsStr()); 53 // servx.Update(); 54 /* 55 servs.updateService(); 56 servi.updateService(); 57 servf.updateService(); 58 servc.updateService(); 59 */ 25 60 26 // wait approximately one second 61 usleep(100000); 62 63 // if (t0.UnixTime()-Time().UnixTime()<-5) 64 // break; 27 usleep(1000000); 65 28 } 66 }67 68 DimDescribedService servxx("TIME/XXX", const_cast<char*>(""), "|MyTime[T]:This is my time");69 usleep(10000000);70 29 71 30 return 0; -
trunk/FACT++/src/mcp.cc
r11982 r11983 55 55 kStateConfiguring2, 56 56 kStateConfiguring3, 57 kStateConfiguring4,58 57 kStateConfigured, 59 58 }; … … 272 271 } 273 272 274 Time fConfigTimer;275 276 273 int Execute() 277 274 { … … 320 317 return GetCurrentState(); 321 318 322 fConfigTimer = Time();323 324 return kStateConfiguring4;325 }326 327 if (GetCurrentState()==kStateConfiguring4)328 {329 // We need some delay to ensure that after sending the330 // "Enable Trigger Line" command to all FADs the really331 // have all already enabled the trigger line332 if (Time()-fConfigTimer<boost::posix_time::milliseconds(100))333 return kStateConfiguring4;334 335 319 Message("Starting Trigger (FTM)"); 336 320 Dim::SendCommand("FTM_CONTROL/START_RUN"); … … 407 391 408 392 AddStateName(kStateConfiguring3, "Configuring3", 409 ".");410 411 AddStateName(kStateConfiguring4, "Configuring4",412 393 "."); 413 394
Note:
See TracChangeset
for help on using the changeset viewer.