24void SQLiteTimeVersionOfRoot(){
28 const char *minTime =
"SELECT min(Time) FROM accesslog;";
31 std::string strMinTimeField = minTimeRes->
Next()->
GetField(0);
32 TDatime minTimeFormat(strMinTimeField.c_str());
35 TH1F *hTime =
new TH1F(
"hTime",
"Duration of ROOT dependency over version 6.14", 10, minTimeFormat.Convert(), now.
Convert());
37 const char *time =
"SELECT Time, Version FROM accesslog;";
41 TDatime rowTime(row->GetField(0));
42 TString rowVersion(row->GetField(1));
43 TString shortVersion(rowVersion(0,4));
44 if ( shortVersion ==
"6.14" ) {
45 hTime->
Fill(rowTime.Convert());
R__EXTERN TStyle * gStyle
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
virtual void SetTimeDisplay(Int_t value)
virtual void SetTimeFormat(const char *format="")
Change the format used for time plotting.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
UInt_t Convert(Bool_t toGMT=kFALSE) const
Convert fDatime from TDatime format to the standard time_t format.
1-D histogram with a float per channel (see TH1 documentation)}
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual TSQLRow * Next()=0
virtual const char * GetField(Int_t field)=0
virtual TSQLResult * Query(const char *sql)=0
static TSQLServer * Connect(const char *db, const char *uid, const char *pw)
The db should be of the form: <dbms>://<host>[:<port>][/<database>], e.g.: mysql://pcroot....
void SetTimeOffset(Double_t toffset)
Change the time offset for time plotting.