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

◆ __init__()

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 

Member Function Documentation

◆ cleanup()

def esMonitoring.FDJsonServer.cleanup (   self)

Definition at line 326 of file esMonitoring.py.

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

References esMonitoring.FDJsonServer.fn.

Referenced by esMonitoring.FDJsonServer.handle_close().

◆ handle_accept()

def esMonitoring.FDJsonServer.handle_accept (   self)

Definition at line 331 of file esMonitoring.py.

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

References fwlite::EventSelector.accept(), DDFilter.accept(), DDNameFilter.accept(), DTNeutronWriter.accept(), CSCNeutronWriter.accept(), RPCNeutronWriter.accept(), ParticleDecayDrawer.accept(), DDPassAllFilter.accept(), smartSelector.accept(), fwlite::RunLumiSelector.accept(), ParticleTreeDrawer.accept(), EcalZeroSuppressor< EBDataFrame >.accept(), EcalZeroSuppressor< C >.accept(), EcalZeroSuppressor< EEDataFrame >.accept(), DDSpecificsFilter.accept(), BPHHistoSpecificDecay::CandidateSelect.accept(), SubsystemNeutronWriter.accept(), BPHParticleEtaSelect.accept(), BPHParticleNeutralVeto.accept(), BPHParticlePtSelect.accept(), BPHMuonEtaSelect.accept(), BPHMuonChargeSelect.accept(), BPHMuonPtSelect.accept(), BPHParticleChargeSelect.accept(), BPHFitSelect.accept(), BPHMomentumSelect.accept(), BPHVertexSelect.accept(), BPHChi2Select.accept(), Filter.accept(), BPHMassSelect.accept(), BPHKinFitChi2Select.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.

◆ handle_close()

def esMonitoring.FDJsonServer.handle_close (   self)

Definition at line 336 of file esMonitoring.py.

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

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

Member Data Documentation

◆ args

esMonitoring.FDJsonServer.args

Definition at line 300 of file esMonitoring.py.

◆ es

esMonitoring.FDJsonServer.es

◆ fn

esMonitoring.FDJsonServer.fn

Definition at line 298 of file esMonitoring.py.

Referenced by esMonitoring.FDJsonServer.cleanup().

esMonitoring.log
def log(s)
Definition: esMonitoring.py:11
edm::cleanup
static void cleanup(const Factory::MakerMap::value_type &v)
Definition: Factory.cc:12