3 #include <sys/socket.h>
4 #include <netinet/in.h>
11 #include "TGLWidget.h"
15 #include "TStopwatch.h"
17 #include "TEveManager.h"
55 m_guiManager(nullptr),
60 m_navigatorPtr(nullptr),
61 m_metadataManagerPtr(nullptr),
62 m_contextPtr(nullptr),
63 m_autoSaveAllViewsHeight(-1),
64 m_autoLoadTimerRunning(kFALSE),
113 std::shared_ptr<FWViewManagerBase> eveViewManager = std::make_shared<FWEveViewManager>(
guiManager());
117 auto tableViewManager = std::make_shared<FWTableViewManager>(
guiManager());
122 auto triggerTableViewManager = std::make_shared<FWTriggerTableViewManager>(
guiManager());
125 triggerTableViewManager.get());
129 auto geoTableViewManager =
189 fwLog(
fwlog::kDebug) <<
"CmsShowMainBase::draw CpuTime " << sw.CpuTime() <<
" RealTime " << sw.RealTime()
227 m_guiManager->loadPartialFromConfigurationFile_.connect(
233 std::string macPath(gSystem->Getenv(
"CMSSW_BASE"));
234 macPath +=
"/src/Fireworks/Core/macros";
235 const char *
base = gSystem->Getenv(
"CMSSW_RELEASE_BASE");
236 if (
nullptr !=
base) {
239 macPath +=
"/src/Fireworks/Core/macros";
241 gROOT->SetMacroPath((
std::string(
"./:") + macPath).c_str());
271 gEve->DisableRedraw();
273 gEve->EnableRedraw();
276 new TGMsgBox(gClient->GetDefaultRoot(),
277 gClient->GetDefaultRoot(),
279 (
"Configuration " +
config +
" cannot be parsed: " +
e.error()).c_str(),
285 new TGMsgBox(gClient->GetDefaultRoot(),
286 gClient->GetDefaultRoot(),
288 (
"Configuration " +
config +
" cannot be parsed.").c_str(),
323 m_guiManager->updateStatus(
"Setting up configuration...");
326 gEve->DisableRedraw();
330 char *whereConfig = gSystem->Which(TROOT::GetMacroPath(),
m_configFileName.c_str(), kReadPermission);
332 delete[] whereConfig;
335 gEve->EnableRedraw();
340 }
catch (std::runtime_error &
e) {
342 <<
"' which was specified on command line. Quitting." << std::endl;
350 m_guiManager->updateStatus(
"Setting up Eve debug window...");
400 }
catch (
const std::runtime_error &iException) {
411 struct hostent *
h = gethostbyname(
"xrootd.t2.ucsd.edu");
415 struct sockaddr_in remoteServAddr;
416 remoteServAddr.sin_family =
h->h_addrtype;
417 memcpy((
char *)&remoteServAddr.sin_addr.s_addr,
h->h_addr_list[0],
h->h_length);
418 remoteServAddr.sin_port = htons(9698);
421 int sd = socket(AF_INET, SOCK_DGRAM, 0);
428 struct sockaddr_in cliAddr;
429 cliAddr.sin_family = AF_INET;
430 cliAddr.sin_addr.s_addr = htonl(INADDR_ANY);
431 cliAddr.sin_port = htons(0);
433 int rc = bind(
sd, (
struct sockaddr *)&cliAddr,
sizeof(cliAddr));
442 std::ifstream infoFile(
"/System/Library/CoreServices/SystemVersion.plist");
443 osx_version.ReadFile(infoFile);
444 TPMERegexp re(
"ProductVersion\\</key\\>\\n\\t\\<string\\>(10.*)\\</string\\>");
445 re.Match(osx_version);
452 gSystem->GetSysInfo(&sInfo);
455 if (gSystem->Getenv(
"CMSSW_VERSION")) {
456 snprintf(
msg, 64,
"%s %s %s", gSystem->Getenv(
"CMSSW_VERSION"), sInfo.fOS.Data(), osx_version.Data());
458 TString versionFileName(
"data/version.txt");
460 std::ifstream fs(versionFileName);
462 infoText.ReadLine(fs);
464 snprintf(
msg, 64,
"Standalone %s %s %s", infoText.Data(), sInfo.fOS.Data(), osx_version.Data());
468 sendto(
sd,
msg, strlen(
msg),
flags, (
struct sockaddr *)&remoteServAddr,
sizeof(remoteServAddr));