25void SQLitePlatformDistribution(){
29 const char *rootPlatform =
"SELECT Platform FROM accesslog;";
33 TH1F *hrootPlatform =
new TH1F(
"hrootPlatform",
"Platform Distribution", 7, 0, -1);
34 TH1F *shorthrootPlatform =
new TH1F(
"shorthrootPlatform",
"Short Platform Distribution", 7, 0, -1);
37 TString rowPlatform(row->GetField(0));
39 TString Platform_0(rowPlatform(0,5));
40 TString Platform_1(rowPlatform(0,6));
41 TString Platform_2(rowPlatform(0,8));
42 if ( rowPlatform.Contains(
"win32") ){
43 shorthrootPlatform->
Fill(Platform_0,1);
44 }
else if ( rowPlatform.Contains(
"Linux") ){
45 shorthrootPlatform->
Fill(Platform_0,1);
46 }
else if ( rowPlatform.Contains(
"source") ){
47 shorthrootPlatform->
Fill(Platform_1,1);
48 }
else if ( rowPlatform.Contains(
"macosx64") ){
49 shorthrootPlatform->
Fill(Platform_2,1);
50 }
else if ( rowPlatform.Contains(
"IRIX64") ){
51 shorthrootPlatform->
Fill(Platform_1,1);
54 hrootPlatform->
Fill(Platform,1);
63 hrootPlatform->
Draw();
69 shorthrootPlatform->
Draw();
virtual void LabelsOption(Option_t *option="h")
Set option(s) to draw axis with labels option can be:
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 void LabelsDeflate(Option_t *axis="X")
Reduce the number of bins for the axis passed in the option to the number of bins having a label.
virtual TSQLRow * Next()=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....