|
BrRunsDbclass description - source file - inheritance tree class BrRunsDb : public BrDbpublic: Data Membersprotected: See alsoClass DescriptionBrRunsDb is a Db class which manages BrRun's with information extracted from the BRAHMS run database. It connects to the BRAHMS run database via the TSQLServer. There are several ways for runs to be selected. A single run can be selected using BrRunsDb::SelectRun(irun) where irun is the run to be selected. Another way to select a group of runs is to use BrRunsDb::SelectRuns(time1,time2) where time1,2 are TDatime objects specifying time intervals for a list of runs to be selected. To get the runs, use BrRunsDb::GetRun(isel) which returns a BrRun object which was built in the SelectRun or SelectRuns methods. Example: BrRunsDb *runDb = new BrRunsDb("mysql://pii3.brahms.bnl.gov/RUNDB", "query","query-only"); BrDbRun *run = runDb->GetRun("1554"); run now contains all of the information in the run DB extracted from run 1554. Alternatively, one can use: TDatime time1(2000,6,27,0,0,0); TDatime time2(2000,6,28,0,0,0); TObjArray *runList = runDb->SelectRuns(Form("StartTime > %d and EndTime < %d",time1.Convert(),time2.Convert())); //select all runs of 6/27/00 Then to use them, use: Int_t numruns = runList->GetEntries(); for(isel=0;isel<numruns;isel++) { BrRun *run = (BrRun*)runList->At(isel); . . . process this run . . . } ~BrRunsDb() Empty DTOR BrRunsDb* Instance(void) Inline FunctionsTObjArray* GetXRun(const Char_t* condition) BrDbRun* GetRun(const Char_t* condition) TObjArray* GetXFile(const Char_t* condition) BrDbFile* GetFile(const Char_t* condition) TObjArray* GetXMagnet(const Char_t* condition) BrDbMagnet* GetMagnet(const Char_t* condition) TObjArray* GetXConditionsKeithley(const Char_t* cond) BrDbConditionsKeithley* GetConditionsKeithley(const Char_t* cond) TObjArray* GetXShiftReport(const Char_t* condition) BrDbShiftReport* GetShiftReport(const Char_t* condition) BrDbRun* GetRun(Int_t runno) BrDbFile* GetFile(Int_t runno, Int_t sequence) BrDbFile* GetFileByTime(Int_t start, Int_t stop = -1) BrDbMagnet* GetMagnet(Int_t magnet, Int_t start, Int_t stop = -1) BrDbShiftReport* GetShiftReport(Int_t start, Int_t stop = -1) TObjArray* GetXFile(Int_t runno) TObjArray* GetXConditionsKeithley(Int_t unit, Int_t chan, Int_t start, Int_t end) TClass* Class() TClass* IsA() const void ShowMembers(TMemberInspector& insp, char* parent) void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|