Ignore:
Timestamp:
01/10/06 13:44:29 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/findcacofiles.C

    r7232 r7459  
    2525/////////////////////////////////////////////////////////////////////////////
    2626//
    27 // FindCaCoFiles.C
     27// findcacofiles.C
    2828// ===============
     29//
     30// Macro to get from the database the number of the runs, for which no caco
     31// file is available.
     32//
     33// Sometimes the DAQ aborts a run and starts itself a new one. In this cases
     34// there's the camera controll doesn't start a new file, as the command to
     35// start a new run was not sent by the central control. So the caco
     36// information is stored in the previous caco file, which has a different
     37// runnumber. To be able to merpp the information into the calibrated data
     38// file, the runnumber of the file containing the information has to be found.
     39// This is done by a script.
     40// findcacofiles.C produces the input for this script. It queries from the
     41// database, for which runs no caco file with the same runnumber is available
     42// and writes the runnumbers into an txt file.
     43//
     44// Usage:
     45//   .x findcacofiles.C+("date", "logpath")
     46// date and logpath are needed only for the output file
     47//
     48// Make sure, that database and password are corretly set in a resource
     49// file called sql.rc and the resource file is found.
     50//
     51// Returns 0 in case of failure and 1 in case of success.
    2952//
    3053/////////////////////////////////////////////////////////////////////////////
     
    6083    cout << endl;
    6184
     85    //get runnumbers from database
    6286    TString query="SELECT RunProcessStatus.fRunNumber FROM RunProcessStatus ";
    6387    query+=" LEFT JOIN RunData on RunData.fRunNumber=RunProcessStatus.fRunNumber ";
     
    7296    }
    7397
     98    //create output file
    7499    TString filename(Form("%s/findcacofiles-%s.txt", logpath.Data(), date.Data()));
    75100    ofstream fout(filename, ios::app);
     
    80105    }
    81106
     107    //write runnumbers into output file
    82108    TSQLRow *row=0;
    83109    while ((row = res->Next()))
Note: See TracChangeset for help on using the changeset viewer.