|
BrRdbmRunsDbclass description - source file - inheritance tree class BrRdbmRunsDb : public BrRunsDbpublic: Data MembersClass 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 . . . } BrRdbmRunsDb(const Char_t* name, const Char_t* title) Normal constructor. Singleton. ~BrRdbmRunsDb() Empty DTOR BrRunsDb* Instance(void) TObjArray* GetXRun(const Char_t* condition) Find Runs that matches condition <condition> BrDbRun* GetRun(const Char_t* condition) Find a parameter that matches condition <condition> BrDbRun* GetRun(Int_t runNo) Find a parameter with name <name> belonging to detector <detectorId> TObjArray* GetXFile(const Char_t* condition) Find Files that matches condition <condition> BrDbFile* GetFile(const Char_t* condition) Find a file that matches condition <condition> BrDbFile* GetFile(Int_t runNo, Int_t sequnce) Find a file with name <name> belonging to detector <detectorId> TObjArray* GetXFile(Int_t runno) Find Files that belongs to a given run BrDbFile* GetFileByTime(Int_t start, Int_t stop) Find a file with name <name> belonging to detector <detectorId> TObjArray* GetXMagnet(const Char_t* condition) Find Magnets that matches condition <condition> BrDbMagnet* GetMagnet(const Char_t* condition) Find a magnet that matches condition <condition> BrDbMagnet* GetMagnet(Int_t magnet, Int_t start, Int_t stop) Find a magnet with name <name> belonging to detector <detectorId> TObjArray* GetXConditionsKeithley(const Char_t* condition) Find Files that matches condition <condition> BrDbConditionsKeithley* GetConditionsKeithley(const Char_t* condition) Find a Keithley condition that matches condition <condition> TObjArray* GetXConditionsKeithley(Int_t unit, Int_t chan, Int_t start, Int_t end) Find a Keithley condition for unit, channel between times of start and end TObjArray* GetXShiftReport(const Char_t* condition) Find ShiftReports that matches condition <condition> BrDbShiftReport* GetShiftReport(const Char_t* condition) Find a shift report that matches condition <condition> BrDbShiftReport* GetShiftReport(Int_t start, Int_t stop) Find a shift report with name <name> belonging to detector <detectorId> Inline FunctionsTClass* Class() TClass* IsA() const void ShowMembers(TMemberInspector& insp, char* parent) void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) BrRdbmRunsDb BrRdbmRunsDb(BrRdbmRunsDb&) |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|