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;
250 std::string macPath(gSystem->Getenv(
"CMSSW_BASE"));
251 macPath +=
"/src/Fireworks/Core/macros";
252 const char*
base = gSystem->Getenv(
"CMSSW_RELEASE_BASE");
256 macPath +=
"/src/Fireworks/Core/macros";
258 gROOT->SetMacroPath((
std::string(
"./:")+macPath).c_str());
294 gEve->DisableRedraw();
296 gEve->EnableRedraw();
301 new TGMsgBox(gClient->GetDefaultRoot(),
302 gClient->GetDefaultRoot(),
304 (
"Configuration " + config +
" cannot be parsed: " + e.
error()).c_str(),
312 new TGMsgBox(gClient->GetDefaultRoot(),
313 gClient->GetDefaultRoot(),
315 (
"Configuration " + config +
" cannot be parsed.").c_str(),
354 m_guiManager->updateStatus(
"Setting up configuration...");
367 gEve->DisableRedraw();
374 char* whereConfig = gSystem->Which(TROOT::GetMacroPath(),
m_configFileName.c_str(), kReadPermission);
376 delete [] whereConfig;
379 gEve->EnableRedraw();
390 catch (std::runtime_error &e)
394 <<
"' which was specified on command line. Quitting."
420 m_guiManager->updateStatus(
"Setting up Eve debug window...");
488 catch (
const std::runtime_error& iException)
492 << iException.what() << std::endl;
503 struct hostent*
h = gethostbyname(
"xrootd.t2.ucsd.edu");
507 struct sockaddr_in remoteServAddr;
508 remoteServAddr.sin_family = h->h_addrtype;
509 memcpy((
char *) &remoteServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
510 remoteServAddr.sin_port = htons(9698);
513 int sd = socket(AF_INET,SOCK_DGRAM, 0);
521 struct sockaddr_in cliAddr;
522 cliAddr.sin_family = AF_INET;
523 cliAddr.sin_addr.s_addr = htonl(INADDR_ANY);
524 cliAddr.sin_port = htons(0);
526 int rc = bind(sd, (
struct sockaddr *) &cliAddr,
sizeof(cliAddr));
535 std::ifstream infoFile(
"/System/Library/CoreServices/SystemVersion.plist");
536 osx_version.ReadFile(infoFile);
537 TPMERegexp re(
"ProductVersion\\</key\\>\\n\\t\\<string\\>(10.*)\\</string\\>");
538 re.Match(osx_version);
545 gSystem->GetSysInfo(&sInfo);
548 if (gSystem->Getenv(
"CMSSW_VERSION"))
550 snprintf(msg, 64,
"%s %s %s", gSystem->Getenv(
"CMSSW_VERSION"), sInfo.fOS.Data(), osx_version.Data());
554 TString versionFileName(
"data/version.txt");
556 std::ifstream fs(versionFileName);
558 infoText.ReadLine(fs);
560 snprintf(msg, 64,
"Standalone %s %s %s", infoText.Data(), sInfo.fOS.Data(), osx_version.Data() );
565 sendto(sd, msg, strlen(msg), flags,
566 (
struct sockaddr *) &remoteServAddr,
567 sizeof(remoteServAddr));
void startAutoLoadTimer()
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
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)
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()
FWJobMetadataManager * m_metadataManagerPtr
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
virtual void stopPlaying()=0
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