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));
void startAutoLoadTimer()
sigc::signal< void()> newEvent_
void partialWriteToConfigFile(const std::string &config)
int m_autoSaveAllViewsHeight
void registerEventItem(const FWEventItem *iItem)
virtual void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t)=0
std::string m_geometryFilename
FWGUIManager * guiManager()
CmsShowCommon * commonPrefs() const
void writeToConfigFile(const std::string &config)
std::unique_ptr< FWModelChangeManager > m_changeManager
std::unique_ptr< FWGUIManager > m_guiManager
virtual void nextEvent()=0
FWEventItemsManager * eiManager()
FWBeamSpot * getBeamSpot() const
unsigned long long EventNumber_t
std::unique_ptr< FWEventItemsManager > m_eiManager
void partialLoadConfiguration(const std::string &config)
std::unique_ptr< SignalTimer > m_autoLoadTimer
void setup(FWNavigatorBase *navigator, fireworks::Context *context, FWJobMetadataManager *metadataManager)
void updateStatus(const char *status)
unsigned int LuminosityBlockNumber_t
void enableActions(bool enable=true)
virtual void checkPosition()=0
void checkBeamSpot(const edm::EventBase *event)
const std::string sNextEvent
virtual ~CmsShowMainBase() noexcept(false)
void setupAutoLoad(float x)
std::unique_ptr< FWColorManager > m_colorManager
FWNavigatorBase * m_navigatorPtr
void newItemSlot(FWEventItem *)
bool m_autoLoadTimerRunning
void reloadConfiguration(const std::string &config)
virtual void stopPlaying()
virtual void firstEvent()=0
void loadMap(const char *fileName)
void setPlayDelay(Float_t val)
virtual void eventChangedImp()
std::unique_ptr< CmsShowTaskExecutor > m_startupTasks
virtual void checkKeyBindingsOnPLayEventsStateChanged()
FWJobMetadataManager * m_metadataManagerPtr
fireworks::Context * context()
void setupConfiguration()
const std::string sGotoLastEvent
void setGeom(FWGeometry *x)
virtual void previousEvent()=0
virtual const edm::EventBase * getCurrentEvent() const =0
void removeAllItems(void)
void eventChangedCallback()
void checkFieldInfo(const edm::EventBase *)
void add(std::shared_ptr< FWViewManagerBase >)
FWViewManagerManager * viewManager()
virtual void autoLoadNewEvent()=0
std::string m_simGeometryFilename
const std::string sGotoFirstEvent
fireworks::Context * m_contextPtr
void add(const std::string &iName, FWConfigurable *)
does not take ownership
std::unique_ptr< FWConfigurationManager > m_configurationManager
const std::string sPreviousEvent
std::unique_ptr< FWViewManagerManager > m_viewManager
FWConfigurationManager * configurationManager()
void writeToCurrentConfigFile()
std::string m_autoSaveAllViewsFormat
dictionary config
Read in AllInOne config in JSON format.
void registerPhysicsObject(const FWPhysicsObjectDesc &iItem)
void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
ESource getSource() const
sigc::signal< void()> goingToClearItems_
FWMagField * getField() const
virtual void lastEvent()=0
std::string m_configFileName