CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
esMonitoring.FDJsonServer Class Reference
Inheritance diagram for esMonitoring.FDJsonServer:

Public Member Functions

def __init__ (self, es, args)
 
def cleanup (self)
 
def handle_accept (self)
 
def handle_close (self)
 

Public Attributes

 args
 
 es
 
 fn
 

Detailed Description

Definition at line 294 of file esMonitoring.py.

Constructor & Destructor Documentation

def esMonitoring.FDJsonServer.__init__ (   self,
  es,
  args 
)

Definition at line 295 of file esMonitoring.py.

295  def __init__(self, es, args):
296  asyncore.dispatcher.__init__(self)
297 
298  self.fn = None
299  self.es = es
300  self.args = args
301 
302  prefix = "/tmp"
303  if os.path.isdir(self.args.path):
304  prefix = self.args.path
305 
306  base = ".es_monitoring_pid%08d" % os.getpid()
307  self.fn = os.path.join(prefix, base)
308 
309  if self.args.debug:
310  log("Socket path: %s" % self.fn)
311 
312  if os.path.exists(self.fn):
313  os.unlink(self.fn)
314 
315  self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
316  oldmask = os.umask(0o077)
317  try:
318  self.bind(self.fn)
319  self.listen(5)
320  finally:
321  os.umask(oldmask)
322  pass
323 
324  atexit.register(self.cleanup)
325 
def __init__(self, es, args)

Member Function Documentation

def esMonitoring.FDJsonServer.cleanup (   self)

Definition at line 326 of file esMonitoring.py.

References esMonitoring.FDJsonServer.fn.

Referenced by esMonitoring.FDJsonServer.handle_close().

326  def cleanup(self):
327  if self.fn is not None:
328  if os.path.exists(self.fn):
329  os.unlink(self.fn)
330 
def esMonitoring.FDJsonServer.handle_accept (   self)

Definition at line 331 of file esMonitoring.py.

References fwlite::EventSelector.accept(), DDFilter.accept(), ParticleDecayDrawer.accept(), DTNeutronWriter.accept(), CSCNeutronWriter.accept(), RPCNeutronWriter.accept(), fwlite::RunLumiSelector.accept(), smartSelector.accept(), DDPassAllFilter.accept(), ParticleTreeDrawer.accept(), EcalZeroSuppressor< C >.accept(), EcalZeroSuppressor< EEDataFrame >.accept(), EcalZeroSuppressor< EBDataFrame >.accept(), Filter.accept(), BPHHistoSpecificDecay::CandidateSelect.accept(), DDSpecificsFilter.accept(), BPHVertexSelect.accept(), BPHParticleChargeSelect.accept(), BPHMuonChargeSelect.accept(), BPHMuonEtaSelect.accept(), BPHParticleEtaSelect.accept(), BPHMuonPtSelect.accept(), BPHFitSelect.accept(), BPHParticleNeutralVeto.accept(), BPHMomentumSelect.accept(), BPHParticlePtSelect.accept(), BPHChi2Select.accept(), BPHMassSelect.accept(), SubsystemNeutronWriter.accept(), BPHMassSymSelect.accept(), edm::HLTGlobalStatus.accept(), BPHRecoSelect.accept(), HLTLogMonitorFilter::CategoryEntry.accept(), edm::HLTPathStatus.accept(), edm::TriggerResultsByName.accept(), BPHMassFitSelect.accept(), fwlite::ObjectCountSelector< Collection >.accept(), DDSpecificsHasNamedValueFilter.accept(), BPHMultiSelect< T >.accept(), DDSpecificsMatchesValueFilter.accept(), TriggerHelper.accept(), BPHSoftMuonSelect.accept(), TkPixelMeasurementDet.accept(), DDAndFilter< DDSpecificsMatchesValueFilter, DDSpecificsMatchesValueFilter >.accept(), DDAndFilter< F1, F2 >.accept(), EcalSelectiveReadoutSuppressor.accept(), GenericTriggerEventFlag.accept(), FilterOR.accept(), TriggerRatesMonitor::HLTRatesPlots.accept, BPHRecoBuilder.accept(), BPHDaughterSelect.accept(), Selection< C, Selector, StoreContainer >.accept(), BPHCompositeBasicSelect.accept(), BPHFittedBasicSelect.accept(), BPHCompositeVertexSelect.accept(), TkStripMeasurementDet.accept(), BPHFittedVertexSelect.accept(), esMonitoring.FDJsonHandler.es, and esMonitoring.FDJsonServer.es.

331  def handle_accept(self):
332  pair = self.accept()
333  if pair is not None:
334  handler = FDJsonHandler(pair[0], self.es)
335 
def esMonitoring.FDJsonServer.handle_close (   self)

Definition at line 336 of file esMonitoring.py.

References ESDataCertificationTask.cleanup(), PFCandIsolatorFromDeposits::SingleDeposit.cleanup(), DrawPlot.cleanup(), ESDaqInfoTask.cleanup(), ESDcsInfoTask.cleanup(), esMonitoring.FDJsonServer.cleanup(), cmsHarvester.CMSHarvester.cleanup(), Vispa.Plugins.EventBrowser.EventFileAccessor.EventFileAccessor.close(), StorageAccount.close, RemoteFile.close(), csvReporter.csvReporter.close(), AlignmentCorrelationsIO.close(), AlignmentCorrelationsIORoot.close(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController.close(), AlignmentParametersIO.close(), AlignableDataIO.close(), AlignableDataIORoot.close(), RawFile.close(), PhysicsTools::TrainerMonitoring.close(), AlignmentUserVariablesIO.close(), IOChannel.close(), LocalCacheFile.close(), binary_ifstream.close(), binary_ofstream.close(), AlignmentParametersIORoot.close(), DavixFile.close(), MuonErrorMatrix.close(), LStoreFile.close(), StorageAccountProxy.close(), DCacheFile.close(), HIPUserVariablesIORoot.close(), looper.Setup.close(), ALIFileIn.close(), cond::persistency::SessionImpl.close(), Storage.close(), cond::persistency::PayloadReader.close(), L1GtVhdlTemplateFile.close(), L1GtPatternWriter.close(), XrdFile.close(), File.close(), MillePedeVariablesIORoot.close(), DTTPGLutFile.close(), L1TriggerLutFile.close(), cond::persistency::Session.close(), edm::RootTree.close(), edm::RootOutputTree.close(), edm::FileBlock.close(), edm::RootFile.close(), cond::CSScopedSession.close(), cond::persistency::TransactionScope.close(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.close(), and Vispa.Main.TabController.TabController.close().

336  def handle_close(self):
337  self.close()
338  self.cleanup()
339 

Member Data Documentation

esMonitoring.FDJsonServer.args

Definition at line 300 of file esMonitoring.py.

esMonitoring.FDJsonServer.es

Definition at line 299 of file esMonitoring.py.

Referenced by esMonitoring.FDJsonServer.handle_accept().

esMonitoring.FDJsonServer.fn

Definition at line 298 of file esMonitoring.py.

Referenced by esMonitoring.FDJsonServer.cleanup().