1 #include "AliDimIntNotifier.h"
2 #include "AliOnlineReco.h"
6 #include <TSQLServer.h>
7 #include <TSQLResult.h>
10 #include <TTimeStamp.h>
12 int main(int argc, char **argv)
14 AliDimIntNotifier::SetMainThreadId();
16 Bool_t test = argc > 1 && strcmp("-test", argv[1]) == 0;
18 TRint app("App", &argc, argv);
20 AliOnlineReco *win = new AliOnlineReco;
27 win->GetSOR()->infoHandlerTest(2214);
28 win->GetSOR()->infoHandlerTest(2215);
29 win->GetSOR()->infoHandlerTest(2224);
30 win->GetSOR()->infoHandlerTest(2244);
32 printf("win = (AliOnlineReco*) 0x%lx\n", (unsigned long)win);
36 const char *dbHost = "aldaqdb";
38 const char *dbName = "LOGBOOK";
39 const char *user = "logbook";
40 const char *password = "alice";
42 TSQLServer* server = TSQLServer::Connect(Form("mysql://%s:%d/%s", dbHost, dbPort, dbName), user, password);
44 printf("ERROR: Could not connect to DAQ Logbook");
49 sqlQuery.Form("SELECT run FROM logbook WHERE DAQ_time_start > %u AND DAQ_time_end IS NULL AND partition = 'PHYSICS'",
51 TSQLResult* result = server->Query(sqlQuery);
53 printf("ERROR: Can't execute query <%s>!", sqlQuery.Data());
56 if (result->GetRowCount() == 0) {
57 printf("No active physics runs found");
60 for (Int_t iRow = 0; iRow < result->GetRowCount(); iRow++) {
61 TSQLRow* row = result->Next();
62 TString runStr = row->GetField(0);
64 win->StartOfRun(runStr.Atoi());