3 #include <sys/socket.h>
4 #include <netinet/in.h>
8 #include <boost/bind.hpp>
10 #include "TGLWidget.h"
14 #include "TStopwatch.h"
16 #include "TEveManager.h"
54 m_guiManager(nullptr),
59 m_navigatorPtr(nullptr),
60 m_metadataManagerPtr(nullptr),
61 m_contextPtr(nullptr),
62 m_autoSaveAllViewsHeight(-1),
63 m_autoLoadTimerRunning(kFALSE),
110 std::shared_ptr<FWViewManagerBase> eveViewManager = std::make_shared<FWEveViewManager>(
guiManager());
114 auto tableViewManager = std::make_shared<FWTableViewManager>(
guiManager());
119 auto triggerTableViewManager = std::make_shared<FWTriggerTableViewManager>(
guiManager());
122 triggerTableViewManager.get());
126 auto geoTableViewManager =
186 fwLog(
fwlog::kDebug) <<
"CmsShowMainBase::draw CpuTime " << sw.CpuTime() <<
" RealTime " << sw.RealTime()
220 m_guiManager->loadPartialFromConfigurationFile_.connect(
226 std::string macPath(gSystem->Getenv(
"CMSSW_BASE"));
227 macPath +=
"/src/Fireworks/Core/macros";
228 const char *
base = gSystem->Getenv(
"CMSSW_RELEASE_BASE");
229 if (
nullptr !=
base) {
232 macPath +=
"/src/Fireworks/Core/macros";
234 gROOT->SetMacroPath((
std::string(
"./:") + macPath).c_str());
264 gEve->DisableRedraw();
266 gEve->EnableRedraw();
269 new TGMsgBox(gClient->GetDefaultRoot(),
270 gClient->GetDefaultRoot(),
272 (
"Configuration " +
config +
" cannot be parsed: " +
e.error()).c_str(),
278 new TGMsgBox(gClient->GetDefaultRoot(),
279 gClient->GetDefaultRoot(),
281 (
"Configuration " +
config +
" cannot be parsed.").c_str(),
316 m_guiManager->updateStatus(
"Setting up configuration...");
319 gEve->DisableRedraw();
323 char *whereConfig = gSystem->Which(TROOT::GetMacroPath(),
m_configFileName.c_str(), kReadPermission);
325 delete[] whereConfig;
328 gEve->EnableRedraw();
333 }
catch (std::runtime_error &
e) {
335 <<
"' which was specified on command line. Quitting." << std::endl;
343 m_guiManager->updateStatus(
"Setting up Eve debug window...");
393 }
catch (
const std::runtime_error &iException) {
404 struct hostent *
h = gethostbyname(
"xrootd.t2.ucsd.edu");
408 struct sockaddr_in remoteServAddr;
409 remoteServAddr.sin_family =
h->h_addrtype;
410 memcpy((
char *)&remoteServAddr.sin_addr.s_addr,
h->h_addr_list[0],
h->h_length);
411 remoteServAddr.sin_port = htons(9698);
414 int sd = socket(AF_INET, SOCK_DGRAM, 0);
421 struct sockaddr_in cliAddr;
422 cliAddr.sin_family = AF_INET;
423 cliAddr.sin_addr.s_addr = htonl(INADDR_ANY);
424 cliAddr.sin_port = htons(0);
426 int rc = bind(
sd, (
struct sockaddr *)&cliAddr,
sizeof(cliAddr));
435 std::ifstream infoFile(
"/System/Library/CoreServices/SystemVersion.plist");
436 osx_version.ReadFile(infoFile);
437 TPMERegexp re(
"ProductVersion\\</key\\>\\n\\t\\<string\\>(10.*)\\</string\\>");
438 re.Match(osx_version);
445 gSystem->GetSysInfo(&sInfo);
448 if (gSystem->Getenv(
"CMSSW_VERSION")) {
449 snprintf(
msg, 64,
"%s %s %s", gSystem->Getenv(
"CMSSW_VERSION"), sInfo.fOS.Data(), osx_version.Data());
451 TString versionFileName(
"data/version.txt");
453 std::ifstream fs(versionFileName);
455 infoText.ReadLine(fs);
457 snprintf(
msg, 64,
"Standalone %s %s %s", infoText.Data(), sInfo.fOS.Data(), osx_version.Data());
461 sendto(
sd,
msg, strlen(
msg),
flags, (
struct sockaddr *)&remoteServAddr,
sizeof(remoteServAddr));