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/filldotrbk.C

    r7112 r7459  
    3232//
    3333// Usage:
    34 //   .x filldotrbk.C("/data/MAGIC/Period014", kTRUE)
    35 //
    36 // While the first argument is the directory in which all subdirectories where
    37 // searches for CC_*.rbk files. All these files were analysed and the runbook
     34//   .x filldotrbk.C("/magic/subsystemdata/cc/", kTRUE)
     35//
     36// The first argument is the directory in which all subdirectories are
     37// searched for CC_*.rbk files. All these files are analysed and the runbook
    3838// entries will be put into the DB, eg:
    39 //   "/data/MAGIC"                              would do it for all data
    40 //   "/data/MAGIC/Period019/ccdata"             would do it for one Period
    41 //   "/data/MAGIC/Period019/ccdata/2004_05_17"  would do it for a single day
    42 //   "/data/MAGIC/Period019/ccdata/file.rbk"    would do it for a single file
     39//  "/magic/subsystemdata/cc"                  would do it for all data
     40//  "/magic/subsystemdata/cc/2005"                  for one year
     41//  "/magic/subsystemdata/cc/2005/11"               for one month
     42//  "/magic/subsystemdata/cc/2005/11/11"            for a single day
     43//  "/magic/subsystemdata/cc/2005/11/11/file.rbk"   for a single file
    4344//
    4445// The second argument is the 'dummy-mode'. If it is kTRUE dummy-mode is
     
    4647// for tests.
    4748//
    48 // Before an antry is added its existance is checked... if it is added already
    49 // it is ignored.
     49// Before an entry is added, its existance is checked... if it is already
     50// in the database, it is ignored.
    5051//
    5152// The macro can also be run without ACLiC but this is a lot slower...
     
    9697        }
    9798    }
    98 
    9999    delete res;
    100 
    101100    return rc;
    102101}
     
    105104{
    106105
     106    //check if entry is already in database
    107107    if (ExistStr(serv, "fRunBookDate", "RunBook", date))
    108108        return 0;
     
    116116            entry.Remove(i--);
    117117
     118    //insert entry into the database
    118119    TString query("INSERT RunBook (fRunBookDate, fRunBookText) VALUES (\"");
    119120    query += date;
     
    178179        }
    179180*/
     181
     182        //skip run statistics from old runbooks
    180183        if (entry.Contains("MAGIC ELECTRONIC RUNBOOK")   ||
    181184            entry.Contains("DATA RUN STATISTICS")        ||
     
    220223    cout << endl;
    221224
     225    //get all runbook files in path
    222226    if (path.EndsWith(".rbk"))
    223227        return process(serv, dummy, path);
    224228
     229    //fill entries for each runbook file
    225230    MDirIter Next(path, "CC_*.rbk", -1);
    226231    while (1)
Note: See TracChangeset for help on using the changeset viewer.