Ignore:
Timestamp:
11/01/06 08:54:04 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/plotoptical.C

    r8185 r8186  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: plotoptical.C,v 1.3 2006-11-01 08:29:45 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: plotoptical.C,v 1.4 2006-11-01 08:53:26 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    9999    MDataSet *fDataSet;
    100100
    101     TString   fPrimary;
     101    TString   fPrimaryDate;
     102    TString   fPrimaryNumber;
    102103    TString   fSecondary;
    103104
     
    352353    void SetDescription(const char *d, const char *t=0) { fDescription = d; fNameTab = t; }
    353354    void SetGroupBy(GroupBy_t b=kGroupByWeek) { fGroupBy=b; }
    354     void SetPrimary(const char *ts) { fPrimary=ts; }
     355    void SetPrimaryDate(const char *ts) { fPrimaryDate=ts; }
     356    void SetPrimaryNumber(const char *ts) { fPrimaryNumber=ts; }
    355357    void SetSecondary(const char *ts) { fSecondary=ts; }
    356358
     
    362364    Bool_t Plot(const char *value, Float_t min=0, Float_t max=-1, Float_t resolution=0)
    363365    {
    364         TString named  = fPrimary;
     366        TString named  = fPrimaryDate;
    365367        TString named2 = fSecondary;
    366368        TString namev  = value;
    367         TString join   = "fSequenceFirst";
    368369
    369370        TString tablev = namev(0, namev.First('.'));
     
    381382            query += ", ";
    382383            query += value;
    383             query += ", 0 ";
     384            query += ", ";
     385            query += fPrimaryNumber;
     386            query += " ";
    384387        }
    385388        else
     
    389392            query += "), AVG(";
    390393            query += value;
    391             query += "), COUNT(*), STD(";
     394            query += "), ";
     395            query += fPrimaryNumber;
     396            query += ", STD(";
    392397            query += fSecondary;
    393398            query += "), STD(";
     
    443448            //query += Form(" HAVING COUNT(%s)=(COUNT(*)+1)/2 ", valuev.Data());
    444449        }
    445         query += Form("ORDER BY %s ", fPrimary.Data());
     450        query += Form("ORDER BY %s ", fPrimaryDate.Data());
    446451
    447452
     
    464469void plotall(MPlot &plot, TString source)
    465470{
    466     plot.SetPrimary("OpticalData.fTimeStamp");
    467     plot.SetSecondary("fZenithDistance");
    468 
    469 
     471    plot.SetPrimaryDate("OpticalData.fTimestamp");
     472    plot.SetPrimaryNumber("OpticalData.fTimestamp");
     473    plot.SetSecondary("OpticalData.fZenithDistance");
    470474
    471475    TString cond = "fStatusKEY=13";
Note: See TracChangeset for help on using the changeset viewer.