24void SQLitePlatformDistribution(){
28 const char *rootPlatform =
"SELECT Platform FROM accesslog;";
32 TH1F *hrootPlatform =
new TH1F(
"hrootPlatform",
"Platform Distribution", 7, 0, -1);
33 TH1F *shorthrootPlatform =
new TH1F(
"shorthrootPlatform",
"Short Platform Distribution", 7, 0, -1);
36 TString rowPlatform(row->GetField(0));
38 TString Platform_0(rowPlatform(0,5));
39 TString Platform_1(rowPlatform(0,6));
40 TString Platform_2(rowPlatform(0,8));
41 if ( rowPlatform.Contains(
"win32") ){
42 shorthrootPlatform->
Fill(Platform_0,1);
43 }
else if ( rowPlatform.Contains(
"Linux") ){
44 shorthrootPlatform->
Fill(Platform_0,1);
45 }
else if ( rowPlatform.Contains(
"source") ){
46 shorthrootPlatform->
Fill(Platform_1,1);
47 }
else if ( rowPlatform.Contains(
"macosx64") ){
48 shorthrootPlatform->
Fill(Platform_2,1);
49 }
else if ( rowPlatform.Contains(
"IRIX64") ){
50 shorthrootPlatform->
Fill(Platform_1,1);
53 hrootPlatform->
Fill(Platform,1);
62 hrootPlatform->
Draw();
68 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)
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Draw(Option_t *option="") override
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....