Index: /trunk/FACT++/src/dataLogger.cc
===================================================================
--- /trunk/FACT++/src/dataLogger.cc	(revision 10574)
+++ /trunk/FACT++/src/dataLogger.cc	(revision 10575)
@@ -481,61 +481,68 @@
 #endif
 
-		//Give a name to this machine's specific states
-		AddStateName(kSM_NightlyOpen,      "NightlyFileOpen",  "Add description here");
-		AddStateName(kSM_WaitingRun,     "WaitForRun",     "Add description here");
-		AddStateName(kSM_Logging,        "Logging",        "Add description here");
-		AddStateName(kSM_BadNightlyConfig, "ErrNightlyFolder", "Add description here");
-		AddStateName(kSM_BadRunConfig,   "ErrRunFolder",   "Add description here");
-
-        /*Add the possible transitions for this machine*/
-        AddTransition(kSM_NightlyOpen, fTransStart, kSM_Ready, kSM_BadNightlyConfig)
+                //Give a name to this machine's specific states
+                AddStateName(kSM_NightlyOpen,      "NightlyFileOpen",  "The summary files for the night are open.");
+                AddStateName(kSM_WaitingRun,       "WaitForRun",       "The summary files for the night are open and we wait for a run to be started.");
+                AddStateName(kSM_Logging,          "Logging",          "The summary files for the night and the files for a single run are open.");
+                AddStateName(kSM_BadNightlyConfig, "ErrNightlyFolder", "The folder for the nighly summary files is invalid.");
+                AddStateName(kSM_BadRunConfig,     "ErrRunFolder",     "The folder for the run files is invalid.");
+
+                /*Add the possible transitions for this machine*/
+                AddTransition(kSM_NightlyOpen, fTransStart, kSM_Ready, kSM_BadNightlyConfig)
                     (boost::bind(&DataLogger::StartPlease, this))
-                    ("start the Nightly logging. Nightly file location must be specified already");
-
-		AddTransition(kSM_Ready, fTransStop, kSM_NightlyOpen, kSM_WaitingRun, kSM_Logging)
-                   (boost::bind(&DataLogger::GoToReadyPlease, this))
-                   ("stop the data logging");
-
-        AddTransition(kSM_Logging, fTransStartRun, kSM_WaitingRun, kSM_BadRunConfig)
-                   (boost::bind(&DataLogger::StartRunPlease, this))
-                   ("start the run logging. run file location must be specified already.");
-
-        AddTransition(kSM_WaitingRun, fTransStopRun, kSM_Logging)
-                   (boost::bind(&DataLogger::StopRunPlease, this))
-                   ("");
-
-        AddTransition(kSM_Ready, fTransReset, kSM_Error, kSM_BadNightlyConfig, kSM_BadRunConfig, kSM_Error)
-                   (boost::bind(&DataLogger::GoToReadyPlease, this))
-                   ("transition to exit error states. dunno if required or not, would close the Nightly file if already openned.");
-
-        AddTransition(kSM_WaitingRun, fTransWait, kSM_NightlyOpen)
-                   (boost::bind(&DataLogger::NightlyToWaitRunPlease, this));
-
-        /*Add the possible configurations for this machine*/       
-        AddConfiguration(fConfigDay, "C", kSM_Ready, kSM_BadNightlyConfig)
-                   (boost::bind(&DataLogger::ConfigureNightlyFileName, this, _1))
-                   ("configure the Nightly file location. cannot be done before the file is actually opened");
-
-        AddConfiguration(fConfigRun, "C", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig)
-                   (boost::bind(&DataLogger::ConfigureRunFileName, this, _1))
-                   ("configure the run file location. cannot be done before the file is actually opened, and not in a dailly related error.");
-		AddConfiguration(fConfigRunNumber, "I", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig)
-				   (boost::bind(&DataLogger::ConfigureRunNumber, this, _1))
-				   ("configure the run number. cannot be done in logging state");
-		//Provide a logging command
-		//I get the feeling that I should be going through the EventImp 
-        //instead of DimCommand directly, mainly because the commandHandler
-        //is already done in StateMachineImp.cc
-        //Thus I'll simply add a configuration, which I will treat as the logging command
-        AddConfiguration(fConfigLog, "C", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadRunConfig)
-                   (boost::bind(&DataLogger::LogMessagePlease, this, _1));
+                    ("Start the nightly logging. Nightly file location must be specified already");
+
+                AddTransition(kSM_Ready, fTransStop, kSM_NightlyOpen, kSM_WaitingRun, kSM_Logging)
+                    (boost::bind(&DataLogger::GoToReadyPlease, this))
+                    ("Stop all data logging, close all files.");
+
+                AddTransition(kSM_Logging, fTransStartRun, kSM_WaitingRun, kSM_BadRunConfig)
+                    (boost::bind(&DataLogger::StartRunPlease, this))
+                    ("Start the run logging. Run file location must be specified already.");
+
+                AddTransition(kSM_WaitingRun, fTransStopRun, kSM_Logging)
+                    (boost::bind(&DataLogger::StopRunPlease, this))
+                    ("Wait for a run to be started, open run-files as soon as a run number arrives.");
+
+                AddTransition(kSM_Ready, fTransReset, kSM_Error, kSM_BadNightlyConfig, kSM_BadRunConfig, kSM_Error)
+                    (boost::bind(&DataLogger::GoToReadyPlease, this))
+                    ("Transition to exit error states. Closes the nightly file if already opened.");
+
+                AddTransition(kSM_WaitingRun, fTransWait, kSM_NightlyOpen)
+                    (boost::bind(&DataLogger::NightlyToWaitRunPlease, this));
+
+                /*Add the possible configurations for this machine*/
+                AddConfiguration(fConfigDay, "C", kSM_Ready, kSM_BadNightlyConfig)
+                    (boost::bind(&DataLogger::ConfigureNightlyFileName, this, _1))
+                    ("Configure the folder for the nightly files."
+                     "|Path[string]:Absolute or relative path name where the nightly files should be stored.");
+
+                AddConfiguration(fConfigRun, "C", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig)
+                    (boost::bind(&DataLogger::ConfigureRunFileName, this, _1))
+                    ("Configure the folder for the run files."
+                     "|Path[string]:Absolute or relative path name where the run files should be stored.");
+
+                AddConfiguration(fConfigRunNumber, "I", kSM_Ready, kSM_BadNightlyConfig, kSM_NightlyOpen, kSM_WaitingRun, kSM_BadRunConfig)
+                    (boost::bind(&DataLogger::ConfigureRunNumber, this, _1))
+                    ("configure the run number. cannot be done in logging state");
+
+                //Provide a logging command
+                //I get the feeling that I should be going through the EventImp
+                //instead of DimCommand directly, mainly because the commandHandler
+                //is already done in StateMachineImp.cc
+                //Thus I'll simply add a configuration, which I will treat as the logging command
+                AddConfiguration(fConfigLog, "C", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadRunConfig)
+                    (boost::bind(&DataLogger::LogMessagePlease, this, _1))
+                    ("Log a single message to the log-files."
+                     "|Message[string]:Message to be logged.");
 		
 		//Provide a print command
-		AddConfiguration(fPrintCommand, "", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadNightlyConfig, kSM_BadRunConfig)
-				  (boost::bind(&DataLogger::PrintStatePlease, this, _1));
-		
+                AddConfiguration(fPrintCommand, kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadNightlyConfig, kSM_BadRunConfig)
+                    (boost::bind(&DataLogger::PrintStatePlease, this, _1))
+                    ("Print information about the internal status of the data logger.");
+
  		fServiceList.SetHandler(this);
 		CheckForServicesUpdate();
-		
+
 		//start the monitoring service
 		fContinueMonitoring = true;
@@ -546,10 +553,23 @@
 		fToDim.code = 0;
 		fToDim.fileName[0] = '\0';
-		fOpenedNightlyFiles = new DimDescribedService((GetName() + "/FILENAME_NIGHTLY").c_str(), "I:1;C", &fToDim, sizeof(int)+1, "Add description here");//"i:1;C", static_cast<void*>(fDimBuffer), 256);
-		fOpenedRunFiles = new DimDescribedService((GetName() + "/FILENAME_RUN").c_str(), "I:1;C", &fToDim, sizeof(int)+1, "Add description here");
-		fNumSubAndFitsData.numSubscriptions = 0;
+
+                fOpenedNightlyFiles = new DimDescribedService((GetName() + "/FILENAME_NIGHTLY").c_str(), "I:1;C", &fToDim, sizeof(int)+1,
+                                                              "Path and base name which is used to compile the filenames for the nightly files."
+                                                              "|Type[int]:type of open files (1=log, 2=rep, 4=fits)"
+                                                              "|Name[string]:path and base file name");
+
+                fOpenedRunFiles = new DimDescribedService((GetName() + "/FILENAME_RUN").c_str(), "I:1;C", &fToDim, sizeof(int)+1,
+                                                              "Path and base name which is used to compile the filenames for the run files."
+                                                              "|Type[int]:type of open files (1=log, 2=rep, 4=fits)"
+                                                              "|Name[string]:path and base file name");
+
+                fNumSubAndFitsData.numSubscriptions = 0;
 		fNumSubAndFitsData.numOpenFits = 0;
-		fNumSubAndFits = new DimDescribedService((GetName() + "/NUM_SUBS").c_str(), "I:2", &fNumSubAndFitsData, sizeof(NumSubAndFitsType), "Add description here");
-		//black/white list
+                fNumSubAndFits = new DimDescribedService((GetName() + "/NUM_SUBS").c_str(), "I:2", &fNumSubAndFitsData, sizeof(NumSubAndFitsType),
+                                                         "Shows number of services to which the data logger is currently subscribed and the total number of open files."
+                                                         "|Scubscriptions[int]:number of dim services to which the data logger is currently subscribed."
+                                                         "|NumOpenFiles[int]:number of files currently open by the data logger");
+
+                //black/white list
 		fIsBlackList = true;
 		fGreyList.clear();
@@ -560,18 +580,29 @@
 		fOpenedFilesIsOn = true;
 		fNumSubAndFitsIsOn = true;
-		//provide services control commands
+
+                //provide services control commands
                 AddConfiguration(fDebugOnOff, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)
-				(boost::bind(&DataLogger::SetDebugOnOff, this, _1));
-		AddConfiguration(fStatsPeriod, "F", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)
-				(boost::bind(&DataLogger::SetStatsPeriod, this, _1));
+                    (boost::bind(&DataLogger::SetDebugOnOff, this, _1))
+                    ("Switch debug mode on off. Debug mode prints ifnormation about every service written to a file."
+                     "|Enable[bool]:Enable of disable debuig mode (yes/no).");
+
+                AddConfiguration(fStatsPeriod, "F", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)
+                    (boost::bind(&DataLogger::SetStatsPeriod, this, _1))
+                    ("Interval in which the data-logger statitistics service (STATS) is updated."
+                     "Interval[s]:Floating point value in seconds.");
+
                 AddConfiguration(fStartStopOpenedFiles, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)
-				(boost::bind(&DataLogger::SetOpenedFilesOnOff ,this, _1));
+                    (boost::bind(&DataLogger::SetOpenedFilesOnOff ,this, _1))
+                    ("Can be used to switch the service off which distributes information about the open files.");
+
                 AddConfiguration(fStartStopNumSubsAndFits, "B:1", kSM_NightlyOpen, kSM_Logging, kSM_WaitingRun, kSM_Ready)
-				(boost::bind(&DataLogger::SetNumSubsAndFitsOnOff, this, _1));
+                    (boost::bind(&DataLogger::SetNumSubsAndFitsOnOff, this, _1))
+                    ("Can be used to switch the service off which distributes information about the number of subscriptions and open files.");
+
 		fDestructing = false;
 		if(fDebugIsOn)
 		{
-			Debug("DataLogger Init Done.");	
-		}
+                    Debug("DataLogger Init Done.");
+                }
 }
 // --------------------------------------------------------------------------
