Index: trunk/MagicSoft/Mars/datacenter/macros/setupdb.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/setupdb.C	(revision 8404)
+++ trunk/MagicSoft/Mars/datacenter/macros/setupdb.C	(revision 8405)
@@ -686,4 +686,24 @@
         ") MAX_ROWS=256"));
 
+    list.Add(new TObjString(
+        "CREATE TABLE `OpticalData` ("
+        "  `fOpticalDataKEY`     int(11)              NOT NULL auto_increment,"
+        "  `fTimestamp`          datetime             NOT NULL default '0000-00-00 00:00:00',"
+        "  `fExposure`           smallint(5) unsigned NOT NULL default '0',"
+        "  `fFitsFileKEY`        smallint(5) unsigned NOT NULL default '0',"
+        "  `fObjectKEY`          smallint(5) unsigned NOT NULL default '0',"
+        "  `fSkyLevel`           float(6,1)                    default NULL,"
+        "  `fFWHM`               float(4,2)                    default NULL,"
+        "  `fApertureRadius`     float(3,1)                    default NULL,"
+        "  `fInstrumentalMag`    float(7,4)                    default NULL,"
+        "  `fInstrumentalMagErr` float(6,4)                    default NULL,"
+        "  `fStatusKEY`          smallint(5) unsigned NOT NULL default '0',"
+        "  `fZenithDistance`     float(4,1)                    default NULL,"
+        "  `fBandKEY`            smallint(5) unsigned NOT NULL default '0',"
+        "  `fFilterKEY`          smallint(5) unsigned NOT NULL default '0',"
+        "  `fTelescopeKEY`       smallint(5) unsigned NOT NULL default '0',"
+        "  `fCCDKEY`             smallint(5) unsigned NOT NULL default '0',"
+        "  PRIMARY KEY  (`fOpticalDataKEY`)"));
+
     TSQLResult *res;
 
Index: trunk/MagicSoft/Mars/datacenter/tools/fillobjects.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/tools/fillobjects.C	(revision 8404)
+++ trunk/MagicSoft/Mars/datacenter/tools/fillobjects.C	(revision 8405)
@@ -29,5 +29,11 @@
 //
 // read file with magnitudes and colour for the objects
-// File /home/operator/Documents/optical/good_compstars_R.txt
+// File: resources/good_compstars_R.txt
+//
+// In resources also the file compstars_R.txt can be found, which contains
+// more stars. As the value for the magnitude for these stars is not good
+// enough, they are not inserted into the database, as the values there are
+// used for the calculation of the extinction.
+// E.g. resources/good_compstars_R.txt does not contain the blazars itself.
 //
 ///////////////////////////////////////////////////////////////////////////
Index: trunk/MagicSoft/Mars/datacenter/tools/fillobjects2.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/tools/fillobjects2.C	(revision 8404)
+++ trunk/MagicSoft/Mars/datacenter/tools/fillobjects2.C	(revision 8405)
@@ -28,6 +28,6 @@
 // ==============
 //
-// read file with coordinates for the objects
-// File /home/operator/Documents/optical/TeVsources.txt
+// read file with coordinates for the objects (only the blazars)
+// File resources/TeVsources.txt
 //
 ///////////////////////////////////////////////////////////////////////////
@@ -99,5 +99,5 @@
 
         TObjArray *arr = line.Tokenize(" ");
-        if (arr->GetEntries()!=11)
+        if (arr->GetEntries()!=10)
         {
             cout << "WARNING: line with less or more than 11 arguments found " << endl;
@@ -105,7 +105,7 @@
             continue;
         }
-        object=Form("%s_%s", (*arr)[0]->GetName(), (*arr)[1]->GetName());
-        RA=Form("%s:%s:%s", (*arr)[3]->GetName(), (*arr)[4]->GetName(), (*arr)[5]->GetName());
-        DEC=Form("%s:%s:%s", (*arr)[6]->GetName(), (*arr)[7]->GetName(), (*arr)[8]->GetName());
+        object=Form("%s/BL",(*arr)[0]->GetName());
+        RA=Form("%s:%s:%s", (*arr)[2]->GetName(), (*arr)[3]->GetName(), (*arr)[4]->GetName());
+        DEC=Form("%s:%s:%s", (*arr)[5]->GetName(), (*arr)[6]->GetName(), (*arr)[7]->GetName());
         delete arr;
 //        cout << "RA: " << RA << " -  DEC " << DEC << endl;
@@ -113,6 +113,4 @@
         MAstro::Coordinate2Angle(DEC, dec);
 //        cout << "ra: " << ra << " -  dec " << dec << endl;
-        object.ReplaceAll(" ", "_");
-        object=Form("%s/BL", object.Data());
 
         query=Form("fRightAscension=%.7f, fDeclination=%.7f, fEpoche=2000",
