Changeset 12243
- Timestamp:
- 10/23/11 15:06:51 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/mcp.cc
r12218 r12243 194 194 { 195 195 fRunType = ""; 196 Message("Reseti ing configuration states of FAD and FTM");196 Message("Reseting configuration states of FAD and FTM"); 197 197 Dim::SendCommand("FTM_CONTROL/RESET_CONFIGURE"); 198 198 Dim::SendCommand("FAD_CONTROL/RESET_CONFIGURE"); … … 292 292 { 293 293 Message("Starting datalogger"); 294 Dim::SendCommand("DATA_LOGGER/WAIT_FOR_RUN_NUMBER");294 Dim::SendCommand("DATA_LOGGER/START_RUN_LOGGING"); 295 295 } 296 296 Message("Configuring Trigger (FTM)"); … … 388 388 389 389 AddStateName(kStateConfiguring2, "Configuring2", 390 " .");390 "Waiting for FTM and Datalogger to get ready"); 391 391 392 392 AddStateName(kStateConfiguring3, "Configuring3", 393 " .");393 "Waiting for FAD to get ready"); 394 394 395 395 AddStateName(kStateConfigured, "Configured", -
trunk/FACT++/src/ratescan.cc
r12242 r12243 502 502 control.add_options() 503 503 ("max-wait", var<uint16_t>(150), "The maximum number of seconds to wait to get the anticipated resolution for a point.") 504 ("resolution", var<double>(0.05) ,"The minimum resolution required for a single data point.")504 ("resolution", var<double>(0.05) , "The minimum resolution required for a single data point.") 505 505 ; 506 506 … … 529 529 void PrintHelp() 530 530 { 531 Main::PrintHelp<StateMachineRateScan>(); 532 531 533 /* Additional help text which is printed after the configuration 532 534 options goes here */ -
trunk/FACT++/src/tools.cc
r12161 r12243 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
r12161 r12243 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.