On Tue, Aug 15, 2000 at 05:35:03PM -0500, hagel@comp.tamu.edu wrote: > 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. I must be missing something- presumably you extract the run information from the RUNDB database created by the DAQ, but in the example below you connect to the BrahmsMain database? So where do you get the run data from? K.O. > 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 > > > -- Konstantin Olchanski Physics Department, Brookhaven National Laboratory, Long Island, New York olchansk@bnl.gov
This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 18:49:50 EDT