Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7083)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7084)
@@ -21,4 +21,14 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2005/05/23 Daniela Dorner
+
+   * datacenter/scripts/fillstar:
+     - fixed bug in path
+
+   * datacenter/macros/fillstar.C, fillcalib.C, fillsignal.C:
+     - added check
+
+
+
  2005/05/20 Thomas Bretz
 
Index: /trunk/MagicSoft/Mars/datacenter/macros/fillcalib.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/fillcalib.C	(revision 7083)
+++ /trunk/MagicSoft/Mars/datacenter/macros/fillcalib.C	(revision 7084)
@@ -109,4 +109,10 @@
 
     TFile file(fname, "READ");
+    if (!file.IsOpen())
+    {
+        cout << "ERROR - Could not find file " << fname << endl;
+        return 0;
+    }
+
     if (badpix.Read("MBadPixelsCam")<=0)
     {
@@ -239,5 +245,5 @@
                      " fIsolatedInner=%d, "
                      " fIsolatedOuter=%d, "
-                     " fIsolatedMaxCluster=%d, ",
+                     " fIsolatedMaxCluster=%d, "
                      " fArrTimeMeanInner=%s, "
                      " fArrTimeRmsInner=%s, "
Index: /trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C	(revision 7083)
+++ /trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C	(revision 7084)
@@ -70,4 +70,10 @@
 {
     TFile file(fname, "READ");
+    if (!file.IsOpen())
+    {
+        cout << "ERROR - Could not find file " << fname << endl;
+        return 0;
+    }
+
     MStatusArray *arr = (MStatusArray*)file.Get("MStatusDisplay");
     if (!arr)
Index: /trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 7083)
+++ /trunk/MagicSoft/Mars/datacenter/macros/fillstar.C	(revision 7084)
@@ -89,4 +89,10 @@
 {
     TFile file(fname, "READ");
+    if (!file.IsOpen())
+    {
+        cout << "ERROR - Could not find file " << fname << endl;
+        return 0;
+    }
+
 
     MStatusArray arr;
Index: /trunk/MagicSoft/Mars/datacenter/scripts/fillstar
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/scripts/fillstar	(revision 7083)
+++ /trunk/MagicSoft/Mars/datacenter/scripts/fillstar	(revision 7084)
@@ -104,5 +104,5 @@
 for sequence in ${sequences[@]}
 do 
-   no=`printf %08d $sequence | cut -c 4`
+   no=`printf %08d $sequence | cut -c 0-4`
    no2=`printf %08d $sequence`
    path="/magic/data/star/$no/$no2"
@@ -136,6 +136,6 @@
              fi
            fi
-           setstatuslog=$setstatuslogpath/setstatus-fillstar
-           check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog-$sequence.log | grep int | sed -e 's/(int)//'`
+           setstatuslog=$setstatuslogpath/setstatus-fillstar-$no2.log
+           check4=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
            case $check4 in
    	     1)   echo "check4=$check4 -> everthing ok, status has been set" >> $scriptlog 2>&1;;
