Changeset 7629


Ignore:
Timestamp:
04/07/06 14:10:53 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7628 r7629  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2006/04/07 Daniel Hoehne, Daniela Dorner
     22
     23   * datacenter/macros/filldotrun.C, buildsequenceentries.C, setupdb.C:
     24     - implemented new arehucas version
     25
     26
    2027
    2128 2006/04/06 Daniela Dorner
  • trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C

    r7528 r7629  
    463463                 " fL1TriggerTableKEY, fL2TriggerTableKEY,"
    464464                 " fHvSettingsKEY, fDiscriminatorThresholdTableKEY,"
    465                  " fTriggerDelayTableKEY, fLightConditionsKEY, fTestFlagKEY"
     465                 " fTriggerDelayTableKEY, fLightConditionsKEY, "
     466                 " fTestFlagKEY, fObservationModeKEY "
    466467                 " FROM RunData"
    467468                 " WHERE fRunTypeKEY=2 AND fExcludedFDAKEY=1 AND (fRunNumber BETWEEN %d AND %d)"
     
    496497    query1+=Form(" fTriggerDelayTableKEY=%s,", (*row)[6]);
    497498    query1+=Form(" fLightConditionsKEY=%s,", (*row)[7]);
    498     query1+=Form(" fTestFlagKEY=%s, fManuallyChangedKEY=1", (*row)[8]);
     499    query1+=Form(" fTestFlagKEY=%s, ", (*row)[8]);
     500    query1+=Form(" fObservationModeKEY=%s, fManuallyChangedKEY=1", (*row)[9]);
    499501
    500502
     
    810812
    811813    //get all values from the database, that are relevant for building sequences
    812     TString query(Form("SELECT fRunNumber, fSourceKEY, fProjectKEY, fHvSettingsKEY,  fLightConditionsKEY, fDiscriminatorThresholdTableKEY, fTriggerDelayTableKEY FROM RunData WHERE %s AND fExcludedFDAKEY=1 order by fRunNumber", cond.Data()));
     814    TString query(Form("SELECT fRunNumber, fSourceKEY, fProjectKEY, fHvSettingsKEY,  fLightConditionsKEY, fDiscriminatorThresholdTableKEY, fTriggerDelayTableKEY, fObservationModeKEY FROM RunData WHERE %s AND fExcludedFDAKEY=1 order by fRunNumber", cond.Data()));
    813815
    814816    TSQLResult *res = serv.Query(query);
     
    819821    //for each block the first and the last run are stored in a TExMap
    820822    //the values are checked with the help of an array of TStrings
    821     TString keys[6]= { "NULL", "NULL", "NULL", "NULL", "NULL", "NULL" };
     823    TString keys[7]= { "NULL", "NULL", "NULL", "NULL", "NULL", "NULL" , "NULL" };
    822824    TString stop     = "NULL";
    823825    TString runstart = "NULL";
     
    833835        if (count==0)
    834836        {
    835             for (Int_t i=1 ; i<7 ; i++)
     837            for (Int_t i=1 ; i<8 ; i++)
    836838                keys[i-1]=(*row)[i];
    837839            runstart=(*row)[0];
    838840        }
    839841
    840         for (Int_t i=1 ; i<7 ; i++)
     842        for (Int_t i=1 ; i<8 ; i++)
    841843        {
    842844            runbegin=atoi(runstart.Data());
     
    854856            blocks.Add((ULong_t)blocks.GetSize(), (Long_t)runbegin, (Long_t)runend);
    855857            runstart=(*row)[0];
    856             for (Int_t i=1 ; i<7 ; i++)
     858            for (Int_t i=1 ; i<8 ; i++)
    857859                keys[i-1]=(*row)[i];
    858860            break;
  • trunk/MagicSoft/Mars/datacenter/macros/filldotrun.C

    r7460 r7629  
    3838//   041113-0, 041209-0, 041221-0
    3939//   050224-0, 050317-0, 050322-0, 050401-0, 050413-0, 050415-0, 050714-0,
    40 //     050719-0, 050829-0, 051025-0
     40//     050719-0, 050829-0, 051025-0,
     41//   060330-0
    4142//
    4243// Usage:
     
    187188        version!=200504010 && version!=200504130 && version!=200504150 &&
    188189        version!=200507140 && version!=200507190 && version!=200508290 &&
    189         version!=200510250)
     190        version!=200510250 &&
     191        version!=200603300)
    190192    {
    191193        cout << filename << ": File Version unknown - please update the macro!" << endl;
     
    406408            default:
    407409                {
    408                     cout << "WARNING: neiter L1 nor L2 Trigger table - please check what is happening." << strng << endl;
     410                    cout << "WARNING: neither L1 nor L2 Trigger table - please check what is happening." << strng << endl;
    409411                    break;
    410412                }
     
    456458            || version==200504010 || version==200504130 || version==200504150
    457459            || version==200507140 || version==200507190 || version==200508290
    458             || version==200510250)
     460            || version==200510250 || version==200603300)
    459461        {
    460462            // ========== Col 19-35: DC and HV-values, mjd =========
     
    512514            }
    513515
    514             // ========== Col 40,41: RA and Dec sent to drive =========
     516            // ========== Col 40,41: Telescope RA and Dec sent to drive =========
    515517            strng.ReadToDelim(fin, ' ');
    516518            strng.ReadToDelim(fin, ' ');
    517519
    518520            // ========== Col 42: Calibration Script =========
    519             strng.ReadToDelim(fin, '\n');
     521            if (version==200411130 || version==200412090 || version==200412210
     522                || version==200502240 || version==200503170 || version==200503220
     523                || version==200504010 || version==200504130 || version==200504150
     524                || version==200507140 || version==200507190 || version==200508290
     525                || version==200510250)
     526                strng.ReadToDelim(fin, '\n');
     527            else
     528                strng.ReadToDelim(fin, ' ');
    520529            if (strng.Contains("???"))
    521530                strng="n/a";
     
    528537            }
    529538
     539        }
     540
     541        Int_t observationmodekey=1;
     542        if (version==200603300)
     543        {
     544            // ========== Col 43: Observation Mode =========
     545            strng.ReadToDelim(fin, ' ');
     546            if (strng.Contains("???"))
     547                strng="n/a";
     548
     549            observationmodekey = QueryNameKEY(serv, dummy, "ObservationMode", strng.Data());
     550            if (observationmodekey<0)
     551            {
     552                strng.ReadLine(fin);
     553                continue;
     554            }
     555
     556            // ========== Col 44-51: Source RA and Dec, DT's and IPR =========
     557            for (int i=0 ; i<7 ; i++)
     558            {
     559                strng.ReadToDelim(fin, ' ');
     560            }
     561            strng.ReadToDelim(fin, '\n');
    530562        }
    531563
     
    554586        query += Form("fLightConditionsKEY=%d, ", lightcondkey);
    555587        query += Form("fHvSettingsKEY=%d, ", hvkey);
     588        query += Form("fObservationModeKEY=%d, ", observationmodekey);
    556589        if (!TMath::IsNaN(zd) && TMath::Finite(zd))
    557590            query += Form("fZenithDistance=%d, ", TMath::Nint(zd));
  • trunk/MagicSoft/Mars/datacenter/macros/setupdb.C

    r7482 r7629  
    254254        "INSERT MyMagic.DiscriminatorThresholdTable (fDiscriminatorThresholdTableKEY, fDiscriminatorThresholdTableName, fDiscriminatorThresholdTable) VALUES "
    255255        "  (1, 'n/a', 'Discriminator threshold table is not available')"));
     256
     257    // Observation Mode
     258    list.Add(new TObjString(
     259        "INSERT MyMagic.ObservationMode (fObservationModeKEY, fObservationModeName, fObservationMode) VALUES "
     260        "  (1, 'n/a', 'Not available')"));
    256261
    257262
     
    330335        "  fDiscriminatorThresholdTableKEY  SMALLINT  UNSIGNED   NOT NULL,"
    331336        "  fTriggerDelayTableKEY            SMALLINT  UNSIGNED   NOT NULL,"
     337        "  fObservationModeKEY              SMALLINT  UNSIGNED   NOT NULL,"
    332338        ")";
    333339
     
    419425    list.Add(CreateKeyTable("DiscriminatorThresholdTable"));
    420426    list.Add(CreateKeyTable("TriggerDelayTable"));
     427    list.Add(CreateKeyTable("ObservationMode"));
    421428
    422429    list.Add(new TObjString(
     
    530537         "  fDiscriminatorThresholdTableKEY  SMALLINT  UNSIGNED   NOT NULL,"
    531538         "  fTriggerDelayTableKEY            SMALLINT  UNSIGNED   NOT NULL,"
     539         "  fObservationModeKEY              SMALLINT  UNSIGNED   NOT NULL,"
    532540         ")";
    533541
Note: See TracChangeset for help on using the changeset viewer.