Index: /trunk/FACT++/src/dataLogger.cc
===================================================================
--- /trunk/FACT++/src/dataLogger.cc	(revision 10929)
+++ /trunk/FACT++/src/dataLogger.cc	(revision 10930)
@@ -423,7 +423,7 @@
     void AppendYearMonthDaytoPath(string& path);
     ///Form the files path
-    string CompileFileName(const string &path, const Time &time, const string &service, const string & extension);
+    string CompileFileName(const string &path, const string &service, const string & extension, const Time &time=Time());
     ///Form the files path
-    string CompileFileName(const string &path, const Time &time, uint32_t run, const string &service, const string & extension);
+    string CompileFileName(const string &path, uint32_t run, const string &service, const string & extension, const Time &time=Time());
     ///Check whether service is in black and/or white list
     bool ShouldSubscribe(const string& server, const string& service);
@@ -690,5 +690,5 @@
 //! @param extension the extension to add, if any
 //
-string DataLogger::CompileFileName(const string &path, const Time &time, const string &service, const string & extension)
+string DataLogger::CompileFileName(const string &path, const string &service, const string & extension, const Time &time)
 {
        ostringstream str;
@@ -725,5 +725,5 @@
 //! @param extension the extension to add, if any
 //
-string DataLogger::CompileFileName(const string &path, const Time &time, uint32_t run, const string &service, const string & extension)
+string DataLogger::CompileFileName(const string &path, uint32_t run, const string &service, const string & extension, const Time &time)
 {
        ostringstream str;
@@ -1215,5 +1215,5 @@
         return -1;
     }
-    run.logName = CompileFileName(fRunFilePath, Time(), run.runNumber, "", "log");
+    run.logName = CompileFileName(fRunFilePath, run.runNumber, "", "log");
     errno = 0;
     run.logFile->open(run.logName.c_str(), ios_base::out | ios_base::app);
@@ -1226,5 +1226,5 @@
 #endif
     //open report file
-    run.reportName = CompileFileName(fRunFilePath, Time(), run.runNumber, "", "rep");
+    run.reportName = CompileFileName(fRunFilePath, run.runNumber, "", "rep");
     if (run.reportFile->is_open())
     {
@@ -1265,5 +1265,5 @@
 
     //TODO this notification scheme might be messed up now.... fix it !
-    string baseFileName = CompileFileName(fRunFilePath, Time(), run.runNumber, "", "");
+    string baseFileName = CompileFileName(fRunFilePath, run.runNumber, "", "");
     NotifyOpenedFile(baseFileName, 3, fOpenedRunFiles);
     run.openedFits.clear();
@@ -1357,5 +1357,5 @@
     //construct the header
     ostringstream header;
-    Time cTime(I->getTimestamp(), I->getTimestampMillisecs()*1000);
+    const Time cTime(I->getTimestamp(), I->getTimestampMillisecs()*1000);
     fQuality = I->getQuality();
     fMjD = cTime.Mjd();
@@ -1394,4 +1394,5 @@
                 Error(str);
             }
+
         }
     }
@@ -1495,7 +1496,9 @@
     //print active run numbers
     ostringstream str;
-    str << "Active Run Numbers: ";
+    str << "Active Run Numbers:";
     for (list<RunNumberType>::iterator it=fRunNumber.begin(); it!=fRunNumber.end(); it++)
-        str << "\n" << it->runNumber;
+        str << " " << it->runNumber;
+    if (fRunNumber.size()==0)
+        str << " <none>";
     Message(str);
 
@@ -1503,8 +1506,8 @@
     Message("------------ OPENED FILES ----------------");
     if (fNightlyLogFile.is_open())
-        Message("Nightly log-file: "/*+filename+*/" (OPEN)");
+        Message("Nightly log-file: OPEN");
 
     if (fNightlyReportFile.is_open())
-        Message("Nightly report-file: "/*filename+*/" (OPEN)");
+        Message("Nightly report-file: OPEN");
 
     for (list<RunNumberType>::iterator it=fRunNumber.begin(); it!=fRunNumber.end(); it++)
@@ -1758,5 +1761,5 @@
         {
             ostringstream str;
-            str << "Updating files service " << service->getName() << "with code: " << type << " and file: " << name;
+            str << "Updating " << service->getName() << " file '" << name << "' (type=" << type << ")";
             Debug(str);
             str.str("");
@@ -1789,8 +1792,8 @@
         Debug("Starting...");    
     }
-    fFullNightlyLogFileName = CompileFileName(fNightlyFilePath, Time(), "", "log");
+    fFullNightlyLogFileName = CompileFileName(fNightlyFilePath, "", "log");
     OpenTextFilePlease(fNightlyLogFile, fFullNightlyLogFileName);
 
-    fFullNightlyReportFileName = CompileFileName(fNightlyFilePath, Time(), "", "rep");
+    fFullNightlyReportFileName = CompileFileName(fNightlyFilePath, "", "rep");
     OpenTextFilePlease(fNightlyReportFile, fFullNightlyReportFileName);
 
@@ -1810,5 +1813,5 @@
 
     //notify that a new file has been opened.
-    string baseFileName = CompileFileName(fNightlyFilePath, Time(), "", "");
+    string baseFileName = CompileFileName(fNightlyFilePath, "", "");
     NotifyOpenedFile(baseFileName, 3, fOpenedNightlyFiles);
 
@@ -1860,5 +1863,5 @@
     {
         string fileNameOnly, partialName;
-        partialName = CompileFileName(fNightlyFilePath, Time(), serviceName, "fits");
+        partialName = CompileFileName(fNightlyFilePath, serviceName, "fits");
         fileNameOnly = partialName.substr(partialName.find_last_of('/')+1, partialName.size());
         AllocateFITSBuffers(sub);
@@ -1870,5 +1873,5 @@
 
         //notify the opening
-        string baseFileName = CompileFileName(fNightlyFilePath, Time(), "", "");
+        string baseFileName = CompileFileName(fNightlyFilePath, "", "");
         NotifyOpenedFile(baseFileName, 7, fOpenedNightlyFiles);
         if (fNumSubAndFitsIsOn)
@@ -1877,5 +1880,5 @@
         {
             ostringstream str;
-            str << "Opened Nightly FITS: " << partialName << " and table: FACT-" << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits;
+            str << "Opened Nightly FITS: " << partialName << " and table: " << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits;
             Debug(str);
         }
@@ -1888,10 +1891,10 @@
         if (hasGrouping)
         {
-            partialName = CompileFileName(fRunFilePath, Time(), sub.runNumber, "group", "fits");
+            partialName = CompileFileName(fRunFilePath, sub.runNumber, "group", "fits");
             fileNameOnly = partialName.substr(partialName.find_last_of('/')+1, partialName.size());
         }
         else
         {
-            partialName = CompileFileName(fRunFilePath, Time(), sub.runNumber, serviceName, "fits");
+            partialName = CompileFileName(fRunFilePath, sub.runNumber, serviceName, "fits");
             fileNameOnly = partialName.substr(partialName.find_last_of('/')+1, partialName.size());
         }
@@ -1919,5 +1922,5 @@
             }
 
-        string baseFileName = CompileFileName(fRunFilePath, Time(), sub.runNumber, "", "");
+        string baseFileName = CompileFileName(fRunFilePath, sub.runNumber, "", "");
         NotifyOpenedFile(baseFileName, 7, fOpenedRunFiles);// + '_' + serviceName, 4);
         if (hasGrouping)
@@ -1931,5 +1934,5 @@
         {
             ostringstream str;
-            str << "Opened Run FITS: " << partialName << " and table: FACT-" << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits;
+            str << "Opened Run FITS: " << partialName << " and table: " << serviceName << ".current number of opened FITS: " << fNumSubAndFitsData.numOpenFits;
             Debug(str);
         }
@@ -2101,7 +2104,7 @@
     string groupName;
     if (runNumber != 0)
-        groupName = CompileFileName(fRunFilePath, Time(), runNumber, "", "fits");
+        groupName = CompileFileName(fRunFilePath, runNumber, "", "fits");
     else
-        groupName = CompileFileName(fNightlyFilePath, Time(), "", "fits");
+        groupName = CompileFileName(fNightlyFilePath, "", "fits");
 
     CCfits::Table* groupTable;
