Changeset 9402 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 03/16/09 15:13:43 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
r9385 r9402 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.5 5 2009-03-04 18:45:26tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.56 2009-03-16 15:13:43 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 379 379 delete fDataSet; 380 380 } 381 void SetDataSet(const TString filename )381 void SetDataSet(const TString filename, UInt_t num=(UInt_t)-1) 382 382 { 383 383 if (fDataSet) … … 392 392 return; 393 393 394 fDataSet = new MDataSet(filename );394 fDataSet = new MDataSet(filename, num); 395 395 fPrimaryNumber="Sequences.fSequenceFirst"; 396 396 } … … 427 427 case kNone: 428 428 case kGroupByPrimary: 429 query += Form("%s AS %s", valued.Data(), valued.Data()+1);429 query += Form("%s AS %s", named.Data(), valued.Data()+1); 430 430 break; 431 431 case kGroupByHour: … … 701 701 } 702 702 703 int plotdb(TString from, TString to, const char *dataset=0 )703 int plotdb(TString from, TString to, const char *dataset=0, UInt_t num=(UInt_t)-1) 704 704 { 705 705 MSQLMagic serv("sql.rc"); … … 721 721 722 722 MPlot plot(serv); 723 plot.SetDataSet(dataset );723 plot.SetDataSet(dataset, num); 724 724 plot.SetDisplay(d); 725 725 plot.SetRequestRange(from, to); … … 731 731 } 732 732 733 int plotdb(const char *ds, TString path)733 int plotdb(const char *ds, UInt_t num, TString path="/magic/sequences") 734 734 { 735 735 MSQLMagic serv("sql.rc"); … … 751 751 752 752 MPlot plot(serv); 753 plot.SetDataSet(ds );753 plot.SetDataSet(ds, num); 754 754 plot.SetDisplay(d); 755 755 plot.SetRequestRange("", ""); … … 759 759 760 760 return 1; 761 } 762 763 int plotdb(const char *ds, TString path="/magic/sequences") 764 { 765 return plotdb(ds, (UInt_t)-1, path); 761 766 } 762 767 -
trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C
r9389 r9402 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1. 8 2009-03-06 20:36:20tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.9 2009-03-16 15:13:43 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 78 78 cond += tel; 79 79 } 80 81 //cond +=" AND (RunData.fSourceKEY=403 OR RunData.fSourceKEY=871) "; 82 80 83 plot.SetCondition(cond); 81 84 … … 94 97 95 98 plot.SetDescription("L1 trigger rate after cleaning;R_{L1}", "CleanL1"); 96 plot.Plot("RunDataCheck.fRateCleanedTrig", -0 , 400, 1);99 plot.Plot("RunDataCheck.fRateCleanedTrig", -0.5, 399.5, 1); 97 100 plot.SetDescription("Sum trigger rate after cleaning;R_{sum}", "CleanSum"); 98 plot.Plot("RunDataCheck.fRateCleanedSum", -0 , 400, 1);101 plot.Plot("RunDataCheck.fRateCleanedSum", -0.5, 399.5, 1); 99 102 plot.SetDescription("Unknown events trigger rate after cleaning;R_{0}", "Clean0"); 100 plot.Plot("RunDataCheck.fRateCleanedNull", -0 , 400, 1);103 plot.Plot("RunDataCheck.fRateCleanedNull", -0.5, 399.5, 1); 101 104 102 105 /* … … 122 125 } 123 126 124 int plotrundb(TString from, TString to, const char *dataset=0 )127 int plotrundb(TString from, TString to, const char *dataset=0, UInt_t num=(UInt_t)-1) 125 128 { 126 129 MSQLMagic serv("sql.rc"); … … 142 145 143 146 MPlot plot(serv); 144 plot.SetDataSet(dataset );147 plot.SetDataSet(dataset, num); 145 148 plot.SetDisplay(d); 146 149 plot.SetRequestRange(from, to); … … 152 155 } 153 156 154 int plotrundb(const char *ds )157 int plotrundb(const char *ds, UInt_t num=(UInt_t)-1) 155 158 { 156 159 MSQLMagic serv("sql.rc"); … … 172 175 173 176 MPlot plot(serv); 174 plot.SetDataSet(ds );177 plot.SetDataSet(ds, num); 175 178 plot.SetDisplay(d); 176 179 plot.SetRequestRange("", "");
Note:
See TracChangeset
for help on using the changeset viewer.