Changeset 7400 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
11/14/05 14:34:24 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7399 r7400  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2005/11/14 Daniela Dorner
     21
     22   * datacenter/macros/insertsequence.C:
     23     - added possibility to set source name in sequence file
     24
     25
    2026
    2127 2005/11/14 Thomas Bretz
  • trunk/MagicSoft/Mars/datacenter/macros/insertsequence.C

    r7370 r7400  
    8484    if (dummy)
    8585    {
    86         cout << query << endl;
     86        cout << "Q:" << query << endl;
    8787        return 0;
    8888    }
     
    9090    res=serv.Query(query);
    9191    if (!res)
     92    {
     93        cout << "Error in query " << query << endl;
    9294        return -1;
     95    }
    9396
    9497    delete res;
     
    122125    cout << endl;
    123126
    124     TString sequnum=filename;
    125     sequnum=sequnum.Remove(0,30);
    126     sequnum=sequnum.Remove(8);
     127    TString sequnum;
     128    sequnum=sequ.GetValue("Sequence", "");
    127129    Int_t seq=atoi(sequnum.Data());
    128130
     
    135137        return 0;
    136138    }
     139
     140    TString sourcename = sequ.GetValue("Source", "");
     141    Int_t sourcekey = QueryNameKEY(serv, dummy, "Source", sourcename.Data());
    137142
    138143    TString query="SELECT max(fRunNumber), min(fRunStart), ";
     
    143148
    144149    cout << "runs: " << runs << endl;
    145     cout << "q: " << query << endl;
     150    cout << "q1: " << query << endl;
    146151
    147152    TSQLResult *res = serv.Query(query);
     
    166171    query +=Form("fL2TriggerTableKEY FROM RunData WHERE fRunNumber=%d", seq);
    167172
    168     cout << "q: " << query << endl;
     173    cout << "q2: " << query << endl;
    169174
    170175    res = serv.Query(query);
     
    185190    delete res;
    186191
    187     cout << "seq: "       << seq       << endl;
    188     cout << " lastrun   " << lastrun   << endl;
    189     cout << " startime  " << starttime << endl;
    190     cout << " uptime    " << uptime    << endl;
    191     cout << " zdmin     " << zdmin     << endl;
    192     cout << " zdmax     " << zdmax     << endl;
    193     cout << " azmin     " << azmin     << endl;
    194     cout << " azmax     " << azmax     << endl;
    195     cout << " numevts   " << numevts   << endl;
    196     cout << " keys:"                   <<  endl;
    197     cout << " project   " << project   << endl;
    198     cout << " source    " << source    << endl;
    199     cout << " hv        " << hv        << endl;
    200     cout << " delay     " << delay     << endl;
    201     cout << " dt        " << dt        << endl;
    202     cout << " testflag  " << testflag  << endl;
    203     cout << " lightcond " << lightcond << endl;
    204     cout << " l1tt      " << l1tt      << endl;
    205     cout << " l2tt      " << l2tt      << endl;
     192    cout << "seq: "       << seq        << endl;
     193    cout << "  lastrun   " << lastrun   << endl;
     194    cout << "  startime  " << starttime << endl;
     195    cout << "  uptime    " << uptime    << endl;
     196    cout << "  zdmin     " << zdmin     << endl;
     197    cout << "  zdmax     " << zdmax     << endl;
     198    cout << "  azmin     " << azmin     << endl;
     199    cout << "  azmax     " << azmax     << endl;
     200    cout << "  numevts   " << numevts   << endl;
     201    cout << " keys:"                    <<  endl;
     202    cout << "  project   " << project   << endl;
     203    cout << "  source1   " << source    << " (from db -> run "  << seq << ") " << endl;
     204    cout << "  source2   " << sourcekey << " (from sequ file) " << endl;
     205    if (!(atoi(source.Data())==sourcekey))
     206    {
     207        cout << "new source name: " << sourcename << " -> inserting..." << endl;
     208        sourcekey = QueryNameKEY(serv, dummy, "Source", sourcename.Data(), kFALSE);
     209        source=Form("%d",sourcekey);
     210    }
     211    cout << "  source    " << source    << endl;
     212    cout << "  hv        " << hv        << endl;
     213    cout << "  delay     " << delay     << endl;
     214    cout << "  dt        " << dt        << endl;
     215    cout << "  testflag  " << testflag  << endl;
     216    cout << "  lightcond " << lightcond << endl;
     217    cout << "  l1tt      " << l1tt      << endl;
     218    cout << "  l2tt      " << l2tt      << endl;
    206219
    207220    TString query1="INSERT Sequences SET fManuallyChangedKEY=2, ";
Note: See TracChangeset for help on using the changeset viewer.