Changeset 9191 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
12/09/08 15:47:31 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9187 r9191  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2008/12/09 Thomas Bretz
     22
     23   * datacenter/macros/buildsequenceentries.C:
     24     - propagate the condition to get the sequences of one day
     25       to the subsequent splitting of the block to decreasde
     26       strange results in case of incosistency in the db (for example
     27       if Arehucas write nonsense run numbers)
     28
     29
    2030
    2131 2008/12/02 Daniela Dorner
  • trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C

    r9108 r9191  
    890890    }
    891891
    892     Int_t SplitBlock(Int_t runstart, Int_t runstop)
     892    Int_t SplitBlock(Int_t runstart, Int_t runstop, const TString &cond)
    893893    {
    894894        // Request data necessary to split block into sequences
    895         const TString query=
     895        /*const*/ TString query=
    896896            Form("SELECT fRunNumber*1000+fFileNumber AS Id, fRunTypeKEY, fRunStart, fRunStop"
    897897                 " FROM RunData "
    898898                 " WHERE fRunNumber*1000+fFileNumber BETWEEN %d AND %d AND "
    899                  " fExcludedFDAKEY=1 AND (fRunTypeKEY BETWEEN 2 AND 4)"
    900                  " ORDER BY Id", runstart, runstop);
     899                 /*" fExcludedFDAKEY=1 AND (fRunTypeKEY BETWEEN 2 AND 4)"
     900                  " ORDER BY Id"*/, runstart, runstop);
     901
     902        query += cond;
     903        query += " ORDER BY Id";
     904
    901905
    902906        // Send query
     
    10011005    }
    10021006
    1003     Int_t BuildBlocks(TSQLResult *res, TExMap &blocks)
     1007    Int_t BuildBlocks(TSQLResult *res, TExMap &blocks, const TString &cond)
    10041008    {
    10051009        // col key content
     
    10721076                cout << " - Identical conditions from " << runstart << " to " << runstop << endl;
    10731077                blocks.Add((ULong_t)blocks.GetSize(), runstart, runstop);
    1074                 if (SplitBlock(runstart, runstop)==2)
     1078                if (SplitBlock(runstart, runstop, cond)==2)
    10751079                    return 2;
    10761080                cout << " - Transition from " << RunType(keys[1]) << ":";
     
    11051109            //fill values into TExMap (last value)
    11061110            blocks.Add((ULong_t)blocks.GetSize(), runstart, runstop);
    1107             if (SplitBlock(runstart, runstop)==2)
     1111            if (SplitBlock(runstart, runstop, cond)==2)
    11081112                return 2;
    11091113        }
     
    11841188
    11851189        TExMap blocks;
    1186         const Int_t rc = BuildBlocks(res, blocks);
     1190        const Int_t rc = BuildBlocks(res, blocks, cond);
    11871191        delete res;
    11881192
Note: See TracChangeset for help on using the changeset viewer.