fEntryLogbookPass = new TGTextEntry(cfLogbook, "dqm123");
fEntryLogbookPass->SetEchoMode(TGTextEntry::kPassword);
fEntryLogbookPass->Resize(150,0);
+
+ // data source
+ TGLabel* lbDataSource = new TGLabel(cfLogbook, "Data source:");
+ fEntryDataSource = new TGTextEntry(cfLogbook, "local");
+ fEntryDataSource->Resize(150,0);
cfLogbook->AddFrame(lbLogbookHost, new TGLayoutHints(kLHintsCenterY));
cfLogbook->AddFrame(fEntryLogbookHost, new TGLayoutHints(kLHintsNormal | kLHintsExpandX));
cfLogbook->AddFrame(fEntryLogbookUser, new TGLayoutHints(kLHintsNormal));
cfLogbook->AddFrame(lbLogbookPass, new TGLayoutHints(kLHintsCenterY));
cfLogbook->AddFrame(fEntryLogbookPass, new TGLayoutHints(kLHintsNormal));
+ cfLogbook->AddFrame(lbDataSource, new TGLayoutHints(kLHintsCenterY));
+ cfLogbook->AddFrame(fEntryDataSource, new TGLayoutHints(kLHintsNormal));
tab->AddFrame(cfLogbook, new TGLayoutHints(kLHintsNormal));
}
fEntryLogbookDB->SetText( settings.GetValue("logbook.db", DEFAULT_LOGBOOK_DB), kFALSE);
fEntryLogbookUser->SetText( settings.GetValue("logbook.user", DEFAULT_LOGBOOK_USER), kFALSE);
fEntryLogbookPass->SetText( settings.GetValue("logbook.pass", DEFAULT_LOGBOOK_PASS), kFALSE);
+ fEntryDataSource->SetText( settings.GetValue("data.source", DEFAULT_LOGBOOK_PASS), kFALSE);
return readStatus;
}
settings.SetValue("logbook.db", fEntryLogbookDB->GetText());
settings.SetValue("logbook.user", fEntryLogbookUser->GetText());
settings.SetValue("logbook.pass", fEntryLogbookPass->GetText());
+ settings.SetValue("data.source", fEntryDataSource->GetText());
printf("Writting settings to file: %s\n", Form("%s/MONITOR/%s", gSystem->Getenv("ALICE_ROOT"), ALIEVENTSERVER_CONF) );
fEntryLogbookDB->SetText( DEFAULT_LOGBOOK_DB, kFALSE);
fEntryLogbookUser->SetText( DEFAULT_LOGBOOK_USER, kFALSE);
fEntryLogbookPass->SetText( DEFAULT_LOGBOOK_PASS, kFALSE);
+ fEntryDataSource->SetText( DEFAULT_DATA_SOURCE, kFALSE);
}
TGTextEntry* fEntryLogbookDB;
TGTextEntry* fEntryLogbookUser;
TGTextEntry* fEntryLogbookPass;
+ TGTextEntry* fEntryDataSource;
private:
void SetupServerTab(TGCompositeFrame* tab);
#define DEFAULT_LOGBOOK_DB "logbook"
#define DEFAULT_LOGBOOK_USER "dqm"
#define DEFAULT_LOGBOOK_PASS "dqm123"
+#define DEFAULT_DATA_SOURCE "local"
#include <TSystem.h>
#include <TString.h>
mToolBar->AddButton(this, new TGPictureButton(mToolBar, Form("%s/MONITOR/icons/stop.png", gSystem->Getenv("ALICE_ROOT")), TOOLBUTTON_STOP) );
mToolBar->AddButton(this, new TGPictureButton(mToolBar, Form("%s/MONITOR/icons/preferences.png", gSystem->Getenv("ALICE_ROOT")), TOOLBUTTON_PREFERENCES) );
mToolBar->AddButton(this, new TGPictureButton(mToolBar, Form("%s/MONITOR/icons/exit.png", gSystem->Getenv("ALICE_ROOT")), TOOLBUTTON_EXIT) );
+
+ TGTextButton *fakeButton= new TGTextButton(this,"Fake",TOOLBUTTON_FAKE);
+ fakeButton->Connect("Clicked()", "AliEventServerWindow", this, "onFake()");
mToolBar->Connect("Clicked(Int_t)", "AliEventServerWindow", this, "HandleToolBarAction(Int_t)");
AddFrame(mToolBar, new TGLayoutHints(kLHintsNormal | kLHintsExpandX));
AddFrame(new TGHorizontal3DLine(this), new TGLayoutHints(kLHintsNormal | kLHintsExpandX));
+ AddFrame(fakeButton,new TGLayoutHints(kLHintsNormal));
}
void AliEventServerWindow::HandleToolBarAction(Int_t id)
void AliEventServerWindow::StartReco(Int_t run)
{
- AliInfo(Form("Starting Reco for run %d", run));
-
- TString eventSource = Form("mem://%s/run%d", gSystem->Getenv("ONLINERECO_RAWFILES_DIR"), run);
-
+ TEnv settings;
+ settings.ReadFile(AliEventServerUtil::GetPathToServerConf(), kEnvUser);
+
+ TString dataSource = settings.GetValue("data.source", DEFAULT_DATA_SOURCE);
+ TString eventSource;
+
+ if(dataSource=="local")
+ {
+ AliInfo(Form("Starting Reco for run %d", run));
+ eventSource = Form("mem://%s/run%d", gSystem->Getenv("ONLINERECO_RAWFILES_DIR"), run);
+ }
+ else if(dataSource=="run")
+ {
+ AliInfo("Starting Reco for GDCs active in current run");
+ eventSource = "mem://@*:";
+ }
+
if(!fRecoServer) LaunchRecoServer();
fRecoServer->StartReconstruction(run, eventSource.Data());
gSystem->ExitLoop();
}
+void AliEventServerWindow::onFake()
+{
+ AliInfo("Faking Dim signal: starting reco for run 197669");
+ StartOfRun(197669);
+}
+
void AliEventServerWindow::LaunchRecoServer()
{
fRecoServer = new AliEventServerReconstruction();
TOOLBUTTON_START=1,
TOOLBUTTON_STOP,
TOOLBUTTON_PREFERENCES,
- TOOLBUTTON_EXIT
+ TOOLBUTTON_EXIT,
+ TOOLBUTTON_FAKE
};
AliEventServerWindow();
void onStartServer();
void onStopServer();
void onExit();
+ void onFake();
void HandleToolBarAction(Int_t id=-1);
logbook.db: logbook
logbook.user: dqm
logbook.pass: dqm123
+
+//data source (local, run)
+data.source local