Changeset 10688 for trunk/FACT++/src/dataLogger.cc
- Timestamp:
- 05/12/11 21:52:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/dataLogger.cc
r10676 r10688 590 590 591 591 /*Add the possible transitions for this machine*/ 592 Add Transition(kSM_NightlyOpen, fTransStart, kSM_Ready, kSM_BadNightlyConfig)592 AddEvent(kSM_NightlyOpen, fTransStart, kSM_Ready, kSM_BadNightlyConfig) 593 593 (boost::bind(&DataLogger::StartPlease, this)) 594 594 ("Start the nightly logging. Nightly file location must be specified already"); 595 595 596 Add Transition(kSM_Ready, fTransStop, kSM_NightlyOpen, kSM_WaitingRun, kSM_Logging)596 AddEvent(kSM_Ready, fTransStop, kSM_NightlyOpen, kSM_WaitingRun, kSM_Logging) 597 597 (boost::bind(&DataLogger::GoToReadyPlease, this)) 598 598 ("Stop all data logging, close all files."); 599 599 600 Add Transition(kSM_Logging, fTransStartRun, kSM_WaitingRun, kSM_BadRunConfig)600 AddEvent(kSM_Logging, fTransStartRun, kSM_WaitingRun, kSM_BadRunConfig) 601 601 (boost::bind(&DataLogger::StartRunPlease, this)) 602 602 ("Start the run logging. Run file location must be specified already."); 603 603 604 Add Transition(kSM_WaitingRun, fTransStopRun, kSM_Logging)604 AddEvent(kSM_WaitingRun, fTransStopRun, kSM_Logging) 605 605 (boost::bind(&DataLogger::StopRunPlease, this)) 606 606 ("Wait for a run to be started, open run-files as soon as a run number arrives."); 607 607 608 Add Transition(kSM_Ready, fTransReset, kSM_Error, kSM_BadNightlyConfig, kSM_BadRunConfig, kSM_Error)608 AddEvent(kSM_Ready, fTransReset, kSM_Error, kSM_BadNightlyConfig, kSM_BadRunConfig, kSM_Error) 609 609 (boost::bind(&DataLogger::GoToReadyPlease, this)) 610 610 ("Transition to exit error states. Closes the nightly file if already opened."); 611 611 612 Add Transition(kSM_WaitingRun, fTransWait, kSM_NightlyOpen)612 AddEvent(kSM_WaitingRun, fTransWait, kSM_NightlyOpen) 613 613 (boost::bind(&DataLogger::NightlyToWaitRunPlease, this)); 614 614 615 615 /*Add the possible configurations for this machine*/ 616 Add Configuration(fConfigDay, "C", kSM_Ready, kSM_BadNightlyConfig)616 AddEvent(fConfigDay, "C", kSM_Ready, kSM_BadNightlyConfig) 617 617 (boost::bind(&DataLogger::ConfigureNightlyFileName, this, _1)) 618 618 ("Configure the folder for the nightly files." 619 619 "|Path[string]:Absolute or relative path name where the nightly files should be stored."); 620 620 621 Add Configuration(fConfigRun, "C", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig)621 AddEvent(fConfigRun, "C", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig) 622 622 (boost::bind(&DataLogger::ConfigureRunFileName, this, _1)) 623 623 ("Configure the folder for the run files." 624 624 "|Path[string]:Absolute or relative path name where the run files should be stored."); 625 625 626 Add Configuration(fConfigRunNumber, "I", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig)626 AddEvent(fConfigRunNumber, "I", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig) 627 627 (boost::bind(&DataLogger::ConfigureRunNumber, this, _1)) 628 628 ("configure the run number. cannot be done in logging state"); … … 633 633 //is already done in StateMachineImp.cc 634 634 //Thus I'll simply add a configuration, which I will treat as the logging command 635 Add Configuration(fConfigLog, "C", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadRunConfig)635 AddEvent(fConfigLog, "C", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadRunConfig) 636 636 (boost::bind(&DataLogger::LogMessagePlease, this, _1)) 637 637 ("Log a single message to the log-files." … … 643 643 str << " " << kSM_BadRunConfig; 644 644 645 Add Configuration(fPrintCommand, str.str().c_str(), "")646 // Add Configuration(fPrintCommand, kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadNightlyConfig, kSM_BadRunConfig)645 AddEvent(fPrintCommand, str.str().c_str(), "") 646 // AddEvent(fPrintCommand, kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadNightlyConfig, kSM_BadRunConfig) 647 647 (boost::bind(&DataLogger::PrintStatePlease, this, _1)) 648 648 ("Print information about the internal status of the data logger."); … … 688 688 689 689 //provide services control commands 690 Add Configuration(fDebugOnOff, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)690 AddEvent(fDebugOnOff, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready) 691 691 (boost::bind(&DataLogger::SetDebugOnOff, this, _1)) 692 692 ("Switch debug mode on off. Debug mode prints ifnormation about every service written to a file." 693 693 "|Enable[bool]:Enable of disable debuig mode (yes/no)."); 694 694 695 Add Configuration(fStatsPeriod, "F", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)695 AddEvent(fStatsPeriod, "F", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready) 696 696 (boost::bind(&DataLogger::SetStatsPeriod, this, _1)) 697 697 ("Interval in which the data-logger statitistics service (STATS) is updated." 698 698 "Interval[s]:Floating point value in seconds."); 699 699 700 Add Configuration(fStartStopOpenedFiles, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)700 AddEvent(fStartStopOpenedFiles, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready) 701 701 (boost::bind(&DataLogger::SetOpenedFilesOnOff ,this, _1)) 702 702 ("Can be used to switch the service off which distributes information about the open files."); 703 703 704 Add Configuration(fStartStopNumSubsAndFits, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)704 AddEvent(fStartStopNumSubsAndFits, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready) 705 705 (boost::bind(&DataLogger::SetNumSubsAndFitsOnOff, this, _1)) 706 706 ("Can be used to switch the service off which distributes information about the number of subscriptions and open files.");
Note:
See TracChangeset
for help on using the changeset viewer.