CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
esMonitoring.FDJsonServer Class Reference
Inheritance diagram for esMonitoring.FDJsonServer:

Public Member Functions

def __init__
 
def cleanup
 
def handle_accept
 
def handle_close
 

Public Attributes

 args
 
 es
 
 fn
 

Detailed Description

Definition at line 295 of file esMonitoring.py.

Constructor & Destructor Documentation

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

Definition at line 296 of file esMonitoring.py.

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

Member Function Documentation

def esMonitoring.FDJsonServer.cleanup (   self)

Definition at line 327 of file esMonitoring.py.

References esMonitoring.FDJsonServer.fn.

Referenced by esMonitoring.FDJsonServer.handle_close().

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

Definition at line 332 of file esMonitoring.py.

References fwlite::EventSelector.accept(), DDFilter.accept(), DDNameFilter.accept(), DTNeutronWriter.accept(), CSCNeutronWriter.accept(), RPCNeutronWriter.accept(), ParticleDecayDrawer.accept(), DDPassAllFilter.accept(), fwlite::RunLumiSelector.accept(), ParticleTreeDrawer.accept(), FileReaderDCC.accept(), EcalZeroSuppressor< C >.accept(), EcalZeroSuppressor< EEDataFrame >.accept(), EcalZeroSuppressor< EBDataFrame >.accept(), FileReaderDDU.accept(), DDSpecificsFilter.accept(), BPHHistoSpecificDecay::CandidateSelect.accept(), SubsystemNeutronWriter.accept(), BPHMuonEtaSelect.accept(), BPHParticleEtaSelect.accept(), BPHMuonPtSelect.accept(), BPHParticleNeutralVeto.accept(), BPHParticlePtSelect.accept(), BPHMomentumSelect.accept(), BPHVertexSelect.accept(), BPHChi2Select.accept(), BPHKinFitChi2Select.accept(), BPHMassSelect.accept(), Filter.accept(), BPHFitSelect.accept(), edm::HLTGlobalStatus.accept(), BPHMassSymSelect.accept(), HLTLogMonitorFilter::CategoryEntry.accept(), BPHRecoSelect.accept(), edm::HLTPathStatus.accept(), edm::TriggerResultsByName.accept(), RunBasedHistograms::HLTRatesPlots.accept, DDSpecificsHasNamedValueFilter.accept(), BPHMassFitSelect.accept(), DDSpecificsMatchesValueFilter.accept(), fwlite::ObjectCountSelector< Collection >.accept(), DDAndFilter< F1, F2 >.accept(), TriggerHelper.accept(), TkPixelMeasurementDet.accept(), EcalSelectiveReadoutSuppressor.accept(), BPHRecoBuilder.accept(), FilterOR.accept(), GenericTriggerEventFlag.accept(), BPHSlimSelect< T >.accept(), BPHSoftMuonSelect.accept(), BPHFullSelect< T >.accept(), FilterSelection.accept(), BPHDaughterSelect.accept(), cms::DDFilteredView.accept(), BPHCompositeBasicSelect.accept(), BPHFittedBasicSelect.accept(), TkStripMeasurementDet.accept(), BPHGenericVertexSelect.accept(), esMonitoring.FDJsonHandler.es, and esMonitoring.FDJsonServer.es.

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

Definition at line 337 of file esMonitoring.py.

References DrawPlot.cleanup(), PFCandIsolatorFromDeposits::SingleDeposit.cleanup(), DDI::Finalize< I >.cleanup(), DDI::Finalize< I * >.cleanup(), esMonitoring.FDJsonServer.cleanup(), cmsHarvester.CMSHarvester.cleanup(), edm::storage::RemoteFile.close(), edm::storage::StorageAccount.close, AlignmentCorrelationsIO.close(), TritonMemResource< IO >.close(), AlignmentParametersIO.close(), trklet::HistBase.close(), AlignmentCorrelationsIORoot.close(), l1tpf_impl::COEFile.close(), AlignmentUserVariablesIO.close(), AlignableDataIO.close(), RawFile.close(), evf::EvFOutputEventWriter.close(), AlignableDataIORoot.close(), edm::storage::LStoreFile.close(), binary_ifstream.close(), binary_ofstream.close(), edm::storage::DavixFile.close(), edm::storage::DCacheFile.close(), edm::storage::LocalCacheFile.close(), MuonErrorMatrix.close(), AlignmentParametersIORoot.close(), edm::streamer::OutputFile.close(), HIPUserVariablesIORoot.close(), edm::storage::StorageAccountProxy.close(), ALIFileIn.close(), looper.Setup.close(), edm::storage::XrdFile.close(), cond::persistency::PayloadReader.close(), evf::GlobalEvFOutputEventWriter.close(), edm::storage::File.close(), L1GtVhdlTemplateFile.close(), TritonCpuShmResource< IO >.close(), cond::persistency::SessionImpl.close(), L1GtPatternWriter.close(), StreamerOutputFile.close(), MillePedeVariablesIORoot.close(), DTTPGLutFile.close(), L1TriggerLutFile.close(), edm::storage::Storage.close(), cond::persistency::Session.close(), DQM.DQMReader.close(), edm::RootOutputTree.close(), edm::RootTree.close(), edm::FileBlock.close(), cond::CSScopedSession.close(), edm::RootFile.close(), and cond::persistency::TransactionScope.close().

338  def handle_close(self):
339  self.close()
340  self.cleanup()

Member Data Documentation

esMonitoring.FDJsonServer.args

Definition at line 301 of file esMonitoring.py.

esMonitoring.FDJsonServer.es

Definition at line 300 of file esMonitoring.py.

Referenced by esMonitoring.FDJsonServer.handle_accept().

esMonitoring.FDJsonServer.fn

Definition at line 299 of file esMonitoring.py.

Referenced by esMonitoring.FDJsonServer.cleanup().