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"
61 m_metadataManagerPtr(0),
63 m_autoSaveAllViewsHeight(-1),
64 m_autoLoadTimerRunning(kFALSE),
212 <<
" RealTime " << sw.RealTime() << std::endl;
256 std::string macPath(gSystem->Getenv(
"CMSSW_BASE"));
257 macPath +=
"/src/Fireworks/Core/macros";
258 const char*
base = gSystem->Getenv(
"CMSSW_RELEASE_BASE");
262 macPath +=
"/src/Fireworks/Core/macros";
264 gROOT->SetMacroPath((
std::string(
"./:")+macPath).c_str());
309 gEve->DisableRedraw();
311 gEve->EnableRedraw();
316 new TGMsgBox(gClient->GetDefaultRoot(),
317 gClient->GetDefaultRoot(),
319 (
"Configuration " + config +
" cannot be parsed: " + e.
error()).c_str(),
327 new TGMsgBox(gClient->GetDefaultRoot(),
328 gClient->GetDefaultRoot(),
330 (
"Configuration " + config +
" cannot be parsed.").c_str(),
376 m_guiManager->updateStatus(
"Setting up configuration...");
380 gEve->DisableRedraw();
387 char* whereConfig = gSystem->Which(TROOT::GetMacroPath(),
m_configFileName.c_str(), kReadPermission);
389 delete [] whereConfig;
392 gEve->EnableRedraw();
403 catch (std::runtime_error &e)
407 <<
"' which was specified on command line. Quitting."
423 m_guiManager->updateStatus(
"Setting up Eve debug window...");
501 catch (
const std::runtime_error& iException)
505 << iException.what() << std::endl;
516 struct hostent*
h = gethostbyname(
"xrootd.t2.ucsd.edu");
520 struct sockaddr_in remoteServAddr;
521 remoteServAddr.sin_family = h->h_addrtype;
522 memcpy((
char *) &remoteServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
523 remoteServAddr.sin_port = htons(9698);
526 int sd = socket(AF_INET,SOCK_DGRAM, 0);
534 struct sockaddr_in cliAddr;
535 cliAddr.sin_family = AF_INET;
536 cliAddr.sin_addr.s_addr = htonl(INADDR_ANY);
537 cliAddr.sin_port = htons(0);
539 int rc = bind(sd, (
struct sockaddr *) &cliAddr,
sizeof(cliAddr));
548 std::ifstream infoFile(
"/System/Library/CoreServices/SystemVersion.plist");
549 osx_version.ReadFile(infoFile);
550 TPMERegexp re(
"ProductVersion\\</key\\>\\n\\t\\<string\\>(10.*)\\</string\\>");
551 re.Match(osx_version);
558 gSystem->GetSysInfo(&sInfo);
561 if (gSystem->Getenv(
"CMSSW_VERSION"))
563 snprintf(msg, 64,
"%s %s %s", gSystem->Getenv(
"CMSSW_VERSION"), sInfo.fOS.Data(), osx_version.Data());
567 TString versionFileName(
"data/version.txt");
569 std::ifstream fs(versionFileName);
571 infoText.ReadLine(fs);
573 snprintf(msg, 64,
"Standalone %s %s %s", infoText.Data(), sInfo.fOS.Data(), osx_version.Data() );
578 sendto(sd, msg, strlen(msg), flags,
579 (
struct sockaddr *) &remoteServAddr,
580 sizeof(remoteServAddr));
void startAutoLoadTimer()
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::auto_ptr< FWConfigurationManager > m_configurationManager
std::string m_geometryFilename
FWGUIManager * guiManager()
void setGeom(const FWGeometry *x)
void writeToConfigFile(const std::string &config)
virtual void nextEvent()=0
FWEventItemsManager * eiManager()
unsigned long long EventNumber_t
std::vector< Variable::Flags > flags
void partialLoadConfiguration(const std::string &config)
std::auto_ptr< FWEventItemsManager > m_eiManager
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()
void setupAutoLoad(float x)
FWNavigatorBase * m_navigatorPtr
void newItemSlot(FWEventItem *)
bool m_autoLoadTimerRunning
FWBeamSpot * getBeamSpot() const
void reloadConfiguration(const std::string &config)
virtual void stopPlaying()
FWMagField * getField() const
virtual void firstEvent()=0
std::auto_ptr< SignalTimer > m_autoLoadTimer
void loadMap(const char *fileName)
void setPlayDelay(Float_t val)
virtual void eventChangedImp()
virtual void checkKeyBindingsOnPLayEventsStateChanged()
FWJobMetadataManager * m_metadataManagerPtr
fireworks::Context * context()
void setupConfiguration()
const std::string sGotoLastEvent
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
ESource getSource() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void previousEvent()=0
virtual const edm::EventBase * getCurrentEvent() const =0
void removeAllItems(void)
std::auto_ptr< CmsShowTaskExecutor > m_startupTasks
void eventChangedCallback()
void checkFieldInfo(const edm::EventBase *)
FWViewManagerManager * viewManager()
virtual void autoLoadNewEvent()=0
std::string m_simGeometryFilename
void add(boost::shared_ptr< FWViewManagerBase >)
const std::string sGotoFirstEvent
fireworks::Context * m_contextPtr
CmsShowCommon * commonPrefs() const
void add(const std::string &iName, FWConfigurable *)
does not take ownership
const std::string sPreviousEvent
FWConfigurationManager * configurationManager()
void writeToCurrentConfigFile()
std::string m_autoSaveAllViewsFormat
std::auto_ptr< FWModelChangeManager > m_changeManager
void registerPhysicsObject(const FWPhysicsObjectDesc &iItem)
volatile std::atomic< bool > shutdown_flag false
void goToRunEvent(edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t)
std::auto_ptr< FWViewManagerManager > m_viewManager
std::auto_ptr< FWColorManager > m_colorManager
sigc::signal< void > goingToClearItems_
std::auto_ptr< FWGUIManager > m_guiManager
T get(const Candidate &c)
virtual void lastEvent()=0
sigc::signal< void > newEvent_
std::string m_configFileName