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_autoLoadTimerRunning(kFALSE),
211 <<
" 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...");
365 char* whereConfig = gSystem->Which(TROOT::GetMacroPath(),
m_configFileName.c_str(), kReadPermission);
368 whereConfig = gSystem->Which(TROOT::GetMacroPath(),
"default.fwc", kReadPermission);
369 assert(whereConfig &&
"Default configuration cannot be found. Malformed Fireworks installation?");
373 delete [] whereConfig;
376 gEve->DisableRedraw();
378 gEve->EnableRedraw();
389 catch (std::runtime_error &e)
393 <<
"' which was specified on command line. Quitting."
419 m_guiManager->updateStatus(
"Setting up Eve debug window...");
487 catch (
const std::runtime_error& iException)
491 << iException.what() << std::endl;
502 struct hostent*
h = gethostbyname(
"xrootd.t2.ucsd.edu");
506 struct sockaddr_in remoteServAddr;
507 remoteServAddr.sin_family = h->h_addrtype;
508 memcpy((
char *) &remoteServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
509 remoteServAddr.sin_port = htons(9698);
512 int sd = socket(AF_INET,SOCK_DGRAM, 0);
520 struct sockaddr_in cliAddr;
521 cliAddr.sin_family = AF_INET;
522 cliAddr.sin_addr.s_addr = htonl(INADDR_ANY);
523 cliAddr.sin_port = htons(0);
525 int rc = bind(sd, (
struct sockaddr *) &cliAddr,
sizeof(cliAddr));
534 ifstream infoFile(
"/System/Library/CoreServices/SystemVersion.plist");
535 osx_version.ReadFile(infoFile);
536 TPMERegexp re(
"ProductVersion\\</key\\>\\n\\t\\<string\\>(10.*)\\</string\\>");
537 re.Match(osx_version);
544 gSystem->GetSysInfo(&sInfo);
547 if (gSystem->Getenv(
"CMSSW_VERSION"))
549 snprintf(msg, 64,
"%s %s %s", gSystem->Getenv(
"CMSSW_VERSION"), sInfo.fOS.Data(), osx_version.Data());
553 TString versionFileName(
"data/version.txt");
555 ifstream fs(versionFileName);
557 infoText.ReadLine(fs);
559 snprintf(msg, 64,
"Standalone %s %s %s", infoText.Data(), sInfo.fOS.Data(), osx_version.Data() );
564 sendto(sd, msg, strlen(msg), flags,
565 (
struct sockaddr *) &remoteServAddr,
566 sizeof(remoteServAddr));
void startAutoLoadTimer()
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)
unsigned int EventNumber_t
virtual void nextEvent()=0
FWEventItemsManager * eiManager()
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
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()
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
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)
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