Improved quitting Event Display with close button.
authorjniedzie <jeremi.niedziela@cern.ch>
Fri, 31 Oct 2014 11:15:02 +0000 (12:15 +0100)
committerjniedzie <jeremi.niedziela@cern.ch>
Fri, 31 Oct 2014 11:15:02 +0000 (12:15 +0100)
EVE/EveBase/AliEveEventManager.cxx
EVE/EveBase/AliEveEventManagerEditor.cxx
EVE/alieve_main/alieve_main.cxx
EVE/macros/alieve_online_new.C
MONITOR/alistoragemanager/setupStorageDatabase.sh

index 8a109d4..2f1e305 100644 (file)
@@ -183,34 +183,28 @@ AliEveEventManager::~AliEveEventManager()
     // Destructor.
     
     fFinished = true;
-    
     if(fEventListenerThread)
     {
+//        fEventListenerThread->Join();
         fEventListenerThread->Kill();
         delete fEventListenerThread;
+        cout<<"listener thread killed and deleted"<<endl;
     }
     if(fStorageManagerWatcherThread)
     {
+//        fStorageManagerWatcherThread->Join();
         fStorageManagerWatcherThread->Kill();
         delete fStorageManagerWatcherThread;
+        cout<<"storage watcher thread killed and deleted"<<endl;
     }
     
-    
     fAutoLoadTimer->Stop();
     fAutoLoadTimer->Disconnect("Timeout");
     fAutoLoadTimer->Disconnect("AutoLoadNextEvent");
 
-    AliEveEventManager *manager = AliEveEventManager::GetCurrent();
-    manager->Disconnect("StorageManagerOk");
-    manager->Disconnect("StorageManagerDown");
-
     if(fSubManagers){delete fSubManagers;}
     if(fMutex){delete fMutex;}
-    
-    if (fIsOpen)
-    {
-        Close();
-    }
+    if (fIsOpen){Close();}
 
 //    fTransients->DecDenyDestroy();
 //    fTransients->Destroy();
@@ -264,10 +258,10 @@ void AliEveEventManager::GetNextEvent()
     int iter=0;
     while(!fFinished)
     {
-        if(!fLoopMarked)
+        if(!fLoopMarked || receivedList.size()<=0)
         {
             cout<<"taking event from reco server"<<endl;
-            tmpEvent = eventManager->GetEvent(EVENTS_SERVER_SUB,5);
+            tmpEvent = eventManager->GetEvent(EVENTS_SERVER_SUB,5000);
             if(!tmpEvent){sleep(1);}
         }
         else
@@ -346,6 +340,11 @@ void AliEveEventManager::CheckStorageStatus()
         }
         sleep(1);
     }
+    
+    AliEveEventManager *manager = AliEveEventManager::GetCurrent();
+    manager->Disconnect("StorageManagerOk");
+    manager->Disconnect("StorageManagerDown");
+    
 #endif
 }
 
index 0ed4555..c6f8f97 100644 (file)
@@ -279,14 +279,67 @@ void AliEveEventManagerWindow::DoMarkEvent()
 //______________________________________________________________________________
 void AliEveEventManagerWindow::DoRestartReco()
 {
+    ifstream configFile (GetConfigFilePath());
+    string username,hostname;
+    
+    if (configFile.is_open())
+    {
+        string line;
+        int from,to;
+        while(configFile.good())
+        {
+            getline(configFile,line);
+            from = line.find("\"")+1;
+            to = line.find_last_of("\"");
+            if(line.find("EVENT_SERVER=")==0)
+            {
+                hostname=line.substr(from,to-from);
+            }
+            else if(line.find("EVENT_SERVER_USER=")==0)
+            {
+                username=line.substr(from,to-from);
+            }
+        }
+        if(configFile.eof()){configFile.clear();}
+        configFile.close();
+    }
+    else{cout<<"Event Manager Editor -- Unable to open config file"<<endl;}
+
     // Kill reconstruction server
-    gSystem->Exec("ssh -n -f edis@pcald39fix \"killall alieventserver\"");
+    gSystem->Exec(Form("ssh -n -f %s@%s \"killall alieventserver\"",username.c_str(),hostname.c_str()));
 }
 
 void AliEveEventManagerWindow::DoRestartManager()
 {
+    ifstream configFile (GetConfigFilePath());
+    string username,hostname;
+    
+    if (configFile.is_open())
+    {
+        string line;
+        int from,to;
+        while(configFile.good())
+        {
+            getline(configFile,line);
+            from = line.find("\"")+1;
+            to = line.find_last_of("\"");
+            if(line.find("STORAGE_SERVER=")==0)
+            {
+                hostname=line.substr(from,to-from);
+            }
+            else if(line.find("STORAGE_SERVER_USER=")==0)
+            {
+                username=line.substr(from,to-from);
+            }
+        }
+        if(configFile.eof()){configFile.clear();}
+        configFile.close();
+    }
+    else{cout<<"Event Manager Editor -- Unable to open config file"<<endl;}
+
+    
     // Kill storage manager
-    gSystem->Exec("ssh -n -f edis@pcald39fix \"killall alistorage\"");
+    gSystem->Exec(Form("ssh -n -f %s@%s \"killall alistorage\"",username.c_str(),hostname.c_str()));
 }
 
 //______________________________________________________________________________
index 242d027..4127a7f 100644 (file)
@@ -36,103 +36,60 @@ using namespace std;
 
 int main(int argc, char **argv)
 {
-    static const TEveException kEH("alieve::main");
-       
-    if(argc>1)
-    {
-        if(strcmp(argv[1],"-dev")==0 ){
-
-            AliEveApplication app("AliEve", &argc, argv);
-            AliEveMainWindow alieve("ALICE Event Display");
-
-            app.Connect(&alieve, "CloseWindow()", "TApplication", &app, "Terminate(=0)" );
-            app.Run();
-
-            return 0;
-        }
-    }
-    else
-    {
-           Info(kEH.Data(),"No parameters");
-    }
-    
-    if (gSystem->Getenv("ALICE_ROOT") == 0)
-    {
-        Error(kEH.Data(), "ALICE_ROOT is not defined, aborting.");
+    if (gSystem->Getenv("ALICE_ROOT") == 0){
+        cout<<"ALICE_ROOT is not defined, aborting."<<endl;
         gSystem->Exit(1);
     }
 
     TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
 
-    if (gSystem->AccessPathName(evedir) == kTRUE)
-    {
-        Error(kEH.Data(), "Directory $ALICE_ROOT/EVE does not exist.");
+    if (gSystem->AccessPathName(evedir) == kTRUE){
+        cout<<"Directory $ALICE_ROOT/EVE does not exist."<<endl;
         gSystem->Exit(1);
     }
 
     TString macPath(gROOT->GetMacroPath());
     macPath += Form(":%s/macros", evedir.Data());
     gInterpreter->AddIncludePath(evedir);
-    if (gSystem->Getenv("ALICE_ROOT") != 0)
-    {
-        macPath += Form(":%s/alice-macros", evedir.Data());
-        gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
-        gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT")));
-        gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
-        gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
-    }
-    {
-        // TabCom fails on double-colon in macro-path.
-        // I fixed this in ROOT sometime ago ... could be removed
-        // when we go to 5.26.
-        TPMERegexp doubleColon(":{2,}", "og");
-        doubleColon.Substitute(macPath, ":");
-    }
+    macPath += Form(":%s/alice-macros", evedir.Data());
+    gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
+    gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT")));
+    gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
+    gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
+    
+    // TabCom fails on double-colon in macro-path.
+    // I fixed this in ROOT sometime ago ... could be removed
+    // when we go to 5.26.
+//    TPMERegexp doubleColon(":{2,}", "og");
+//    doubleColon.Substitute(macPath, ":");
+
     gROOT->SetMacroPath(macPath);
 
     // make sure logger is instantiated
     AliLog::GetRootLogger();
-    TApplication  *app = new TRint("App", &argc, argv);
-
-#if ROOT_VERSION_CODE >= ROOT_VERSION(5,25,4) || defined XXX_LATEST_ROOT
-    // Waiting for update by Pawel. Now GED in ROOT is better again :)
-    // Uncomment when fixed in AliEveGedXXX.
-    // TEveGListTreeEditorFrame::SetEditorClass("AliEveGedEditor");
-#endif
+    TRint *app = new TRint("App", &argc, argv);
 
     TEveManager::Create();
     gEve->GetDefaultViewer()->SetElementName("3D View");
     gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound);
     gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound);
-
     gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data()));
 
-    try {AliEveConfigManager::InitializeMaster();}
+    try {
+        AliEveConfigManager::InitializeMaster();
+    }
     catch (TEveException exc) {
+        cout<<"\n\nException while initializing config manager"<<endl;
         AliErrorGeneral("alieve_main",exc.Data());
     }
 
-    app->Connect("TEveBrowser", "CloseWindow()", "TApplication", app, "Kill()");
-    
+    app->Connect("TEveBrowser", "CloseWindow()", "TRint", app, "Terminate()");
     app->Run(kTRUE);
 
-    cout<<"Terminate"<<endl;
-    
-    app->Terminate(0);
-    
-    cout<<"unmap"<<endl;
-    
     if (gEve && gEve->GetBrowser())    gEve->GetBrowser()->UnmapWindow();
-
-    cout<<"teve terminate"<<endl;
-    
     TEveManager::Terminate();
-
-    cout<<"delete"<<endl;
-    
     if(gEve) {delete gEve; gEve = 0;}
-
-    cout<<"return"<<endl;
     
+    app->Terminate(0);
     return 0;
 }
index 4674644..5bafcf4 100644 (file)
@@ -16,152 +16,134 @@ Bool_t gCenterProjectionsAtPrimaryVertex = kFALSE;
 
 void alieve_online_new()
 {
-    printf("alieve_online_init() ...\n");
- if (gSystem->Getenv("ALICE_ROOT") != 0)
- {
-        gInterpreter->AddIncludePath(Form("%s/MUON", gSystem->Getenv("ALICE_ROOT")));
-        gInterpreter->AddIncludePath(Form("%s/MUON/mapping", gSystem->Getenv("ALICE_ROOT")));
- }
-  
-   AliEveEventManager::SetCdbUri("local://$ALICE_ROOT/OCDB");
-  
-  Info("alieve_init", "Adding standard macros.");
-  TString  hack = gSystem->pwd(); // Problem with TGFileBrowser cding
-  alieve_init_import_macros();
-  gSystem->cd(hack);
-  
-  new AliEveEventManager("online", -1);
-  //AliEveEventManager::GetMaster()->AddNewEventCommand("alieve_online_on_new_event()");
-  gEve->AddEvent(AliEveEventManager::GetMaster());
-  
-  
-  TEveUtil::AssertMacro("VizDB_scan.C");
-  
-  gSystem->ProcessEvents();
-   
-  
-  
-  
-  AliEveMacroExecutor *exec  = AliEveEventManager::GetMaster()->GetExecutor();
-  TEveBrowser         *browser = gEve->GetBrowser();
-  browser->ShowCloseTab(kFALSE);
-  
-
-  // Gentle-geom loading changes gGeoManager.
-  //TEveGeoManagerHolder mgrRestore;
-
-  AliEveMultiView *multiView = new AliEveMultiView(kTRUE);
-
-  TEveUtil::LoadMacro("geom_gentle.C");
-  multiView->InitGeomGentle(geom_gentle(),
-                             geom_gentle_rphi(), 
-                             geom_gentle_rhoz(),
-                             geom_gentle_rhoz());
-
+    if (gSystem->Getenv("ALICE_ROOT") != 0)
+    {
+        gInterpreter->AddIncludePath(Form("%s/MUON", gSystem->Getenv("ALICE_ROOT")));
+        gInterpreter->AddIncludePath(Form("%s/MUON/mapping", gSystem->Getenv("ALICE_ROOT")));
+    }
+    
+    AliEveEventManager::SetCdbUri("local://$ALICE_ROOT/OCDB");
+    
+    Info("alieve_init", "Adding standard macros.");
+    TString  hack = gSystem->pwd(); // Problem with TGFileBrowser cding
+    alieve_init_import_macros();
+    gSystem->cd(hack);
+    
+    new AliEveEventManager("online", -1);
+    gEve->AddEvent(AliEveEventManager::GetMaster());
+    
+    TEveUtil::AssertMacro("VizDB_scan.C");
+    gSystem->ProcessEvents();
+    
+    AliEveMacroExecutor *exec  = AliEveEventManager::GetMaster()->GetExecutor();
+    TEveBrowser         *browser = gEve->GetBrowser();
+    browser->ShowCloseTab(kFALSE);
+    
+    AliEveMultiView *multiView = new AliEveMultiView(kTRUE);
+    TEveUtil::LoadMacro("geom_gentle.C");
+    multiView->InitGeomGentle(geom_gentle(),
+                              geom_gentle_rphi(),
+                              geom_gentle_rhoz(),
+                              geom_gentle_rhoz());
+    
     //These macros crashes on mac os. To be checked
     
-  //TEveUtil::LoadMacro("geom_gentle_trd.C");
-  //multiView->InitGeomGentleTrd(geom_gentle_trd());
-
-  //TEveUtil::LoadMacro("geom_gentle_muon.C");
-  //multiView->InitGeomGentleMuon(geom_gentle_muon(), kFALSE, kFALSE, kTRUE);
-
-  //============================================================================
-  // Standard macros to execute -- not all are enabled by default.
-  //============================================================================
-
-  
-   printf("============ Setting macro executor\n");
-
-  AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();
-
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex",             "",                kTRUE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse",     "",                kTRUE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box",         "kFALSE, 3, 3, 3", kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex_spd",         "",                kTRUE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse_spd", "",                kTRUE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box_spd",     "kFALSE, 3, 3, 3", kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex_tpc",         "",                kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse_tpc", "",                kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box_tpc",     "kFALSE, 3, 3, 3", kFALSE));
-
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus ITS",   "its_clusters.C",   "its_clusters"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TPC",   "tpc_clusters.C",   "tpc_clusters"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TRD",   "trd_clusters.C",   "trd_clusters"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TOF",   "tof_clusters.C",   "tof_clusters"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus HMPID", "hmpid_clusters.C", "hmpid_clusters"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus MUON",  "muon_clusters.C",  "muon_clusters"));
-
-  
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG EMCAL",   "emcal_digits.C",   "emcal_digits"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ITS",     "its_raw.C",     "its_raw"));
-  //  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TPC",     "tpc_raw.C",     "tpc_raw"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TOF",     "tof_raw.C",     "tof_raw"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW VZERO",   "vzero_raw.C",   "vzero_raw", "", kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ACORDE",  "acorde_raw.C",  "acorde_raw", "", kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW MUON",    "muon_raw.C",  "muon_raw"));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW FMD",     "fmd_raw.C",     "fmd_raw"));
-
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track",      "esd_tracks.C",        "esd_tracks",             "", kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track",      "esd_tracks.C",        "esd_tracks_MI",          "", kFALSE));
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track MUON", "esd_muon_tracks.C", "esd_muon_tracks",        "kTRUE,kFALSE", kTRUE));
-
+    //TEveUtil::LoadMacro("geom_gentle_trd.C");
+    //multiView->InitGeomGentleTrd(geom_gentle_trd());
+    
+    //TEveUtil::LoadMacro("geom_gentle_muon.C");
+    //multiView->InitGeomGentleMuon(geom_gentle_muon(), kFALSE, kFALSE, kTRUE);
+    
+    //============================================================================
+    // Standard macros to execute -- not all are enabled by default.
+    //============================================================================
+    
+    printf("============ Setting macro executor\n");
+    
+    AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();
+    
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex",             "",                kTRUE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse",     "",                kTRUE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box",         "kFALSE, 3, 3, 3", kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex_spd",         "",                kTRUE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse_spd", "",                kTRUE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box_spd",     "kFALSE, 3, 3, 3", kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex_tpc",         "",                kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse_tpc", "",                kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box_tpc",     "kFALSE, 3, 3, 3", kFALSE));
+    
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus ITS",   "its_clusters.C",   "its_clusters"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TPC",   "tpc_clusters.C",   "tpc_clusters"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TRD",   "trd_clusters.C",   "trd_clusters"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TOF",   "tof_clusters.C",   "tof_clusters"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus HMPID", "hmpid_clusters.C", "hmpid_clusters"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus MUON",  "muon_clusters.C",  "muon_clusters"));
+    
+    
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG EMCAL",   "emcal_digits.C",   "emcal_digits"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ITS",     "its_raw.C",     "its_raw"));
+    //  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TPC",     "tpc_raw.C",     "tpc_raw"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TOF",     "tof_raw.C",     "tof_raw"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW VZERO",   "vzero_raw.C",   "vzero_raw", "", kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ACORDE",  "acorde_raw.C",  "acorde_raw", "", kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW MUON",    "muon_raw.C",  "muon_raw"));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW FMD",     "fmd_raw.C",     "fmd_raw"));
+    
+    
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track",      "esd_tracks.C",        "esd_tracks",             "", kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track",      "esd_tracks.C",        "esd_tracks_MI",          "", kFALSE));
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track MUON", "esd_muon_tracks.C", "esd_muon_tracks",        "kTRUE,kFALSE", kTRUE));
+    
     
     // these macros were leaking:
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track",      "esd_tracks.C",        "esd_tracks_by_category", "", kTRUE));// just a little
-  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC FMD",        "fmd_esd.C",           "fmd_esd",                "", kTRUE));//huge leak
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track",      "esd_tracks.C",        "esd_tracks_by_category", "", kTRUE));// just a little
+    exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC FMD",        "fmd_esd.C",           "fmd_esd",                "", kTRUE));//huge leak
     //
     
+    // ???
+    // exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC TRD", "trd_detectors.C", "trd_detectors",         "", kFALSE));
+    // trd_tracks disabled due to memory leaks
     
+    //----------------------------------------------------------------------------
+    
+    slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
+    slot->StartEmbedding();
+    AliEveMacroExecutorWindow* exewin = new AliEveMacroExecutorWindow(exec);
+    slot->StopEmbedding("DataSelection");
+    exewin->PopulateMacros();
+    
+    //============================================================================
+    // Final GUI setup
+    //============================================================================
+    
+    //
+    browser->GetTabRight()->SetTab(1);
+    browser->StartEmbedding(TRootBrowser::kBottom);
+    new AliEveEventManagerWindow(AliEveEventManager::GetMaster());
+    browser->StopEmbedding("EventCtrl");
+//    browser->MoveResize(0, 0, gClient->GetDisplayWidth(),gClient->GetDisplayHeight() - 32);
+    
+    browser->MoveResize(0, 0, gClient->GetDisplayHeight()*1.6,gClient->GetDisplayHeight()-32);
+    
+    gEve->FullRedraw3D(kTRUE);
+    gSystem->ProcessEvents();
+    
+    TGLViewer *glv1 = multiView->Get3DView()->GetGLViewer();
+    TGLViewer *glv2 = multiView->GetRPhiView()->GetGLViewer();
+    TGLViewer *glv3 = multiView->GetRhoZView()->GetGLViewer();
+    
+    glv1->CurrentCamera().RotateRad(-0.4, -1.8);
+    glv2->CurrentCamera().Dolly(450, kFALSE, kFALSE);
+    glv3->CurrentCamera().Dolly(1500, kFALSE, kFALSE);
+    
+    AliEveEventManager::GetMaster()->AddNewEventCommand("alieve_online_on_new_event();");
+    gEve->FullRedraw3D();
+    gSystem->ProcessEvents();
+    gEve->Redraw3D(kTRUE);
+    
+    AliEveEventManager::GetMaster()->SetAutoLoad(true);
     
-  // ???
-  // exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC TRD", "trd_detectors.C", "trd_detectors",         "", kFALSE));
-  // trd_tracks disabled due to memory leaks
-
-  //----------------------------------------------------------------------------
-
-  slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
-  slot->StartEmbedding();
-  AliEveMacroExecutorWindow* exewin = new AliEveMacroExecutorWindow(exec);
-  slot->StopEmbedding("DataSelection");
-  exewin->PopulateMacros();
-
-  //============================================================================
-  // Final GUI setup
-  //============================================================================
-
-  browser->GetTabRight()->SetTab(1);
-
-  browser->StartEmbedding(TRootBrowser::kBottom);
-  new AliEveEventManagerWindow(AliEveEventManager::GetMaster());
-  browser->StopEmbedding("EventCtrl");
-
-  browser->MoveResize(0, 0, gClient->GetDisplayWidth(),
-                     gClient->GetDisplayHeight() - 32);
-
-  gEve->GetViewers()->SwitchColorSet();
-  gEve->FullRedraw3D(kTRUE);
-       gSystem->ProcessEvents();
-
-  TGLViewer *glv1 = multiView->Get3DView()->GetGLViewer();
-  TGLViewer *glv2 = multiView->GetRPhiView()->GetGLViewer();
-  TGLViewer *glv3 = multiView->GetRhoZView()->GetGLViewer();
-
-  glv1->CurrentCamera().RotateRad(-0.4, -1.8);
-  glv2->CurrentCamera().Dolly(450, kFALSE, kFALSE);
-  glv3->CurrentCamera().Dolly(1500, kFALSE, kFALSE);
-
-//////
-  AliEveEventManager::GetMaster()->AddNewEventCommand("alieve_online_on_new_event();");
-   ///////
-  gEve->FullRedraw3D();
-  gSystem->ProcessEvents();
-  gEve->Redraw3D(kTRUE);
-
-  AliEveEventManager::GetMaster()->SetAutoLoad(true);
 }
 
 
@@ -171,129 +153,129 @@ TTimeStamp g_pic_prev(0, 0);
 
 void alieve_online_on_new_event()
 {
-       AliSysInfo::AddStamp("on_new_event_start");
-
-       Double_t x[3] = { 0, 0, 0 };
-
-       if (AliEveEventManager::HasESD())
-       {
-               AliESDEvent* esd = AliEveEventManager::AssertESD();
-               esd->GetPrimaryVertex()->GetXYZ(x);
-
-               TTimeStamp ts(esd->GetTimeStamp());
-               TString win_title("Eve Main Window -- Timestamp: ");
-               win_title += ts.AsString("s");
-               win_title += "; Event # in ESD file: ";
-               win_title += esd->GetEventNumberInFile();
-               gEve->GetBrowser()->SetWindowName(win_title);
-       }
-
-       TEveElement* top = gEve->GetCurrentEvent();
-
-       AliEveMultiView *mv = AliEveMultiView::Instance();
-
-       //mv->DestroyEventRPhi();
-       if (gCenterProjectionsAtPrimaryVertex)
-               mv->SetCenterRPhi(x[0], x[1], x[2]);
-       mv->ImportEventRPhi(top);
-
-       //mv->DestroyEventRhoZ();
-       if (gCenterProjectionsAtPrimaryVertex)
-               mv->SetCenterRhoZ(x[0], x[1], x[2]);
-       mv->ImportEventRhoZ(top);
-
-       if (gCenterProjectionsAtPrimaryVertex)
-               mv->SetCenterMuon(x[0], x[1], x[2]);
-       mv->ImportEventMuon(top);
+    AliSysInfo::AddStamp("on_new_event_start");
+    
+    Double_t x[3] = { 0, 0, 0 };
+    
+    if (AliEveEventManager::HasESD())
+    {
+        AliESDEvent* esd = AliEveEventManager::AssertESD();
+        esd->GetPrimaryVertex()->GetXYZ(x);
+        
+        TTimeStamp ts(esd->GetTimeStamp());
+        TString win_title("Eve Main Window -- Timestamp: ");
+        win_title += ts.AsString("s");
+        win_title += "; Event # in ESD file: ";
+        win_title += esd->GetEventNumberInFile();
+        gEve->GetBrowser()->SetWindowName(win_title);
+    }
+    
+    TEveElement* top = gEve->GetCurrentEvent();
+    
+    AliEveMultiView *mv = AliEveMultiView::Instance();
+    
+    //mv->DestroyEventRPhi();
+    if (gCenterProjectionsAtPrimaryVertex)
+        mv->SetCenterRPhi(x[0], x[1], x[2]);
+    mv->ImportEventRPhi(top);
+    
+    //mv->DestroyEventRhoZ();
+    if (gCenterProjectionsAtPrimaryVertex)
+        mv->SetCenterRhoZ(x[0], x[1], x[2]);
+    mv->ImportEventRhoZ(top);
+    
+    if (gCenterProjectionsAtPrimaryVertex)
+        mv->SetCenterMuon(x[0], x[1], x[2]);
+    mv->ImportEventMuon(top);
+    
     /*
-    // Register image to amore.
-  // const TString pichost("aldaqacrs3");
-  const TString pichost(gEnv->GetValue("AliEve.imageDumpHost", "localhost"));
-  TTimeStamp now;
-  Double_t delta = now.AsDouble() - g_pic_prev.AsDouble();
-
-  printf("Pre image dump: host='%s', delta=%f.\n",
-        gSystem->HostName(), delta);
-
-  AliSysInfo::AddStamp("on_new_event_pic");
-  if (pichost == gSystem->HostName() && delta >= 30)
-  {
-    TString id;      id.Form("online-viz-%03d", g_pic_id);
-    TString pic(id); pic += ".png";
-
-    printf("In image dump: file='%s'.\n", pic.Data());
-
-    gEve->GetBrowser()->RaiseWindow();
-    gEve->FullRedraw3D();
-    gSystem->ProcessEvents();
-
-    Int_t status;
-
-    // create screenshots from OpenGL views
-    TEveUtil::LoadMacro("saveViews.C");
-    saveViews(pic.Data()); 
-
-    // send screenshot to AMORE
-    status = gSystem->Exec(TString::Format("SendImageToAmore %s %s %d",
-                         id.Data(), pic.Data(),
-                         AliEveEventManager::AssertESD()->GetRunNumber()));
-
-    printf("Post AMORE reg -- status=%d, run=%d.\n", status,
-          AliEveEventManager::AssertESD()->GetRunNumber());
-
-    if (++g_pic_id >= g_pic_max)
-      g_pic_id = 0;
-    g_pic_prev.Set();
-  }*/
-  AliSysInfo::AddStamp("on_new_event_end");
+     // Register image to amore.
+     // const TString pichost("aldaqacrs3");
+     const TString pichost(gEnv->GetValue("AliEve.imageDumpHost", "localhost"));
+     TTimeStamp now;
+     Double_t delta = now.AsDouble() - g_pic_prev.AsDouble();
+     
+     printf("Pre image dump: host='%s', delta=%f.\n",
+     gSystem->HostName(), delta);
+     
+     AliSysInfo::AddStamp("on_new_event_pic");
+     if (pichost == gSystem->HostName() && delta >= 30)
+     {
+     TString id;      id.Form("online-viz-%03d", g_pic_id);
+     TString pic(id); pic += ".png";
+     
+     printf("In image dump: file='%s'.\n", pic.Data());
+     
+     gEve->GetBrowser()->RaiseWindow();
+     gEve->FullRedraw3D();
+     gSystem->ProcessEvents();
+     
+     Int_t status;
+     
+     // create screenshots from OpenGL views
+     TEveUtil::LoadMacro("saveViews.C");
+     saveViews(pic.Data());
+     
+     // send screenshot to AMORE
+     status = gSystem->Exec(TString::Format("SendImageToAmore %s %s %d",
+     id.Data(), pic.Data(),
+     AliEveEventManager::AssertESD()->GetRunNumber()));
+     
+     printf("Post AMORE reg -- status=%d, run=%d.\n", status,
+     AliEveEventManager::AssertESD()->GetRunNumber());
+     
+     if (++g_pic_id >= g_pic_max)
+     g_pic_id = 0;
+     g_pic_prev.Set();
+     }*/
+    AliSysInfo::AddStamp("on_new_event_end");
 }
 
 void alieve_init_import_macros()
 {
-  // Put macros in the list of browsables, add a macro browser to
-  // top-level GUI.
-
-  TString macdir("$(ALICE_ROOT)/EVE/alice-macros");
-  gSystem->ExpandPathName(macdir);
-
-  TFolder* f = gEve->GetMacroFolder();
-  void* dirhandle = gSystem->OpenDirectory(macdir.Data());
-  if (dirhandle != 0)
-  {
-    char* filename;
-    TPMERegexp re("\\.C$");
-    TObjArray names;
-    while ((filename = gSystem->GetDirEntry(dirhandle)) != 0)
-    {
-      if (re.Match(filename))
-       names.AddLast(new TObjString(filename));
-    }
-    names.Sort();
-
-    for (Int_t ii=0; ii<names.GetEntries(); ++ii)
+    // Put macros in the list of browsables, add a macro browser to
+    // top-level GUI.
+    
+    TString macdir("$(ALICE_ROOT)/EVE/alice-macros");
+    gSystem->ExpandPathName(macdir);
+    
+    TFolder* f = gEve->GetMacroFolder();
+    void* dirhandle = gSystem->OpenDirectory(macdir.Data());
+    if (dirhandle != 0)
     {
-      TObjString * si = (TObjString*) names.At(ii);
-       f->Add(new TEveMacro(Form("%s/%s", macdir.Data(), (si->GetString()).Data())));
+        char* filename;
+        TPMERegexp re("\\.C$");
+        TObjArray names;
+        while ((filename = gSystem->GetDirEntry(dirhandle)) != 0)
+        {
+            if (re.Match(filename))
+                names.AddLast(new TObjString(filename));
+        }
+        names.Sort();
+        
+        for (Int_t ii=0; ii<names.GetEntries(); ++ii)
+        {
+            TObjString * si = (TObjString*) names.At(ii);
+            f->Add(new TEveMacro(Form("%s/%s", macdir.Data(), (si->GetString()).Data())));
+        }
     }
-  }
-  gSystem->FreeDirectory(dirhandle);
-
-  gROOT->GetListOfBrowsables()->Add(new TSystemDirectory(macdir.Data(), macdir.Data()));
-
-  {
-    TEveBrowser   *br = gEve->GetBrowser();
-    TGFileBrowser *fb = 0;
-    fb = br->GetFileBrowser();
-    fb->GotoDir(macdir);
+    gSystem->FreeDirectory(dirhandle);
+    
+    gROOT->GetListOfBrowsables()->Add(new TSystemDirectory(macdir.Data(), macdir.Data()));
+    
     {
-      br->StartEmbedding(0);
-      fb = br->MakeFileBrowser();
-      fb->BrowseObj(f);
-      fb->Show();
-      br->StopEmbedding();
-      br->SetTabTitle("Macros", 0);
-      br->SetTab(0, 0);
+        TEveBrowser   *br = gEve->GetBrowser();
+        TGFileBrowser *fb = 0;
+        fb = br->GetFileBrowser();
+        fb->GotoDir(macdir);
+        {
+            br->StartEmbedding(0);
+            fb = br->MakeFileBrowser();
+            fb->BrowseObj(f);
+            fb->Show();
+            br->StopEmbedding();
+            br->SetTabTitle("Macros", 0);
+            br->SetTab(0, 0);
+        }
     }
-  }
 }
index 29c4ffd..3a0c1f3 100644 (file)
@@ -11,8 +11,10 @@ MAX_OCCUPATION="100"
 REMOVE_PERCENT="50"
 EVENTS_IN_FILE="20"
 EVENT_SERVER="pcald39fix"   # IP of machine running alieventserver
+EVENT_SERVER_USER="edis"
 EVENT_SERVER_PORT="5024"
 STORAGE_SERVER="localhost"      # IP of machine running alistorage
+STORAGE_SERVER_USER="edis"
 STORAGE_SERVER_PORT="5066"      # server thread communication port
 STORAGE_CLIENT_PORT="5088"      # client thread communication port
 XML_SERVER_PORT="5099"          # server of xml files