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...");
385 gEve->DisableRedraw();
392 char* whereConfig = gSystem->Which(TROOT::GetMacroPath(),
m_configFileName.c_str(), kReadPermission);
394 delete [] whereConfig;
397 gEve->EnableRedraw();
408 catch (std::runtime_error &e)
412 <<
"' which was specified on command line. Quitting."
441 m_guiManager->updateStatus(
"Setting up Eve debug window...");
519 catch (
const std::runtime_error& iException)
523 << iException.what() << std::endl;
534 struct hostent*
h = gethostbyname(
"xrootd.t2.ucsd.edu");
538 struct sockaddr_in remoteServAddr;
539 remoteServAddr.sin_family = h->h_addrtype;
540 memcpy((
char *) &remoteServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
541 remoteServAddr.sin_port = htons(9698);
544 int sd = socket(AF_INET,SOCK_DGRAM, 0);
552 struct sockaddr_in cliAddr;
553 cliAddr.sin_family = AF_INET;
554 cliAddr.sin_addr.s_addr = htonl(INADDR_ANY);
555 cliAddr.sin_port = htons(0);
557 int rc = bind(sd, (
struct sockaddr *) &cliAddr,
sizeof(cliAddr));
566 std::ifstream infoFile(
"/System/Library/CoreServices/SystemVersion.plist");
567 osx_version.ReadFile(infoFile);
568 TPMERegexp re(
"ProductVersion\\</key\\>\\n\\t\\<string\\>(10.*)\\</string\\>");
569 re.Match(osx_version);
576 gSystem->GetSysInfo(&sInfo);
579 if (gSystem->Getenv(
"CMSSW_VERSION"))
581 snprintf(msg, 64,
"%s %s %s", gSystem->Getenv(
"CMSSW_VERSION"), sInfo.fOS.Data(), osx_version.Data());
585 TString versionFileName(
"data/version.txt");
587 std::ifstream fs(versionFileName);
589 infoText.ReadLine(fs);
591 snprintf(msg, 64,
"Standalone %s %s %s", infoText.Data(), sInfo.fOS.Data(), osx_version.Data() );
596 sendto(sd, msg, strlen(msg), flags,
597 (
struct sockaddr *) &remoteServAddr,
598 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