BrRun object

From: hagel@comp.tamu.edu
Date: Tue Aug 15 2000 - 18:35:03 EDT

  • Next message: Konstantin Olchanski: "Re: BrRun object"

    Hello,
    The BrRun object has been enhanced to conform to the BRAHMS DB
    convention (almost).  Externally, there is no change to BrRun.  It is
    still basically a data structure which contains all of the information
    about a given run which is extracted from the BRAHMS RUNDB.
    
    The interface to extract this information has changed slightly and is
    now consistent with other BRAHMS Db access in BRAT.  Here are
    instructions for accessing a run.  Also see ROOT HTML documentation in
    the code.
    
    //First, connect to the db and then to the rundb using following two
    lines:
    BrMainDb *mainDb = new BrMainDb("query", passwd,"pii3...","BrahmsMain")
    BrRunsDb *runDb = mainDb->ConnectToDB(passwd);
    
    //Then get an instance of a BrRun for a single run (ie run 1554) using
    eg
    BrRun *run = runDb->GetRun("RunNo = 1554");
    
    //Or, get a list of runs in a time range
    Char_t query[64];
    TDatime time1(2000,6,27,0,0,0);
    TDatime time2(2000,6,28,0,0,0);
    sprintf(query,"StartTime > %d and EndTime <
    %d",time1.Convert(),time2.Convert());
    TObjArray *runList = runDb->GetXRun(query);
    //Then dig the runs out of runList in the typical way of digging things
    out of TObjArray's
    
    Of course, direct any comments to me.
    
    Enjoy.
    
    Kris
    



    This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 18:35:40 EDT