CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
esMonitoring.AsyncLineReaderMixin Class Reference
Inheritance diagram for esMonitoring.AsyncLineReaderMixin:
esMonitoring.AsyncLineReaderTimeoutMixin esMonitoring.FDJsonHandler esMonitoring.FDOutputListener

Public Member Functions

def __init__ (self)
 
def handle_close (self)
 
def handle_line (self)
 
def handle_read (self)
 

Public Attributes

 line_buf
 not needed, since asyncore automatically handles close if len(rbuf) == 0: self.handle_close() return More...
 

Detailed Description

Definition at line 208 of file esMonitoring.py.

Constructor & Destructor Documentation

◆ __init__()

def esMonitoring.AsyncLineReaderMixin.__init__ (   self)

Definition at line 209 of file esMonitoring.py.

209  def __init__(self):
210  self.line_buf = []
211 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ handle_close()

def esMonitoring.AsyncLineReaderMixin.handle_close (   self)

Definition at line 212 of file esMonitoring.py.

References AlignmentCorrelationsIO.close(), edm::storage::RemoteFile.close(), edm::storage::StorageAccount.close, TritonMemResource< IO >.close(), AlignmentParametersIO.close(), AlignmentCorrelationsIORoot.close(), trklet::HistBase.close(), AlignmentUserVariablesIO.close(), AlignableDataIO.close(), RawFile.close(), AlignableDataIORoot.close(), edm::storage::LStoreFile.close(), binary_ofstream.close(), edm::storage::DavixFile.close(), edm::storage::DCacheFile.close(), edm::storage::LocalCacheFile.close(), MuonErrorMatrix.close(), AlignmentParametersIORoot.close(), edm::streamer::OutputFile.close(), magneticfield::interpolation::binary_ifstream.close(), edm::storage::StorageAccountProxy.close(), HIPUserVariablesIORoot.close(), ALIFileIn.close(), looper.Setup.close(), edm::storage::XrdFile.close(), L1GtVhdlTemplateFile.close(), cond::persistency::PayloadReader.close(), evf::GlobalEvFOutputEventWriter.close(), edm::storage::File.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(), mkfit::DataFile.close(), edm::FileBlock.close(), cond::CSScopedSession.close(), edm::RootFile.close(), cond::persistency::TransactionScope.close(), esMonitoring.AsyncLineReaderMixin.handle_line(), join(), and esMonitoring.AsyncLineReaderMixin.line_buf.

212  def handle_close(self):
213  # closing fd
214  if len(self.line_buf):
215  self.handle_line("".join(self.line_buf))
216  self.line_buf = []
217 
218  self.close()
219 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

◆ handle_line()

def esMonitoring.AsyncLineReaderMixin.handle_line (   self)

Definition at line 242 of file esMonitoring.py.

Referenced by esMonitoring.AsyncLineReaderMixin.handle_close(), and esMonitoring.AsyncLineReaderMixin.handle_read().

242  def handle_line(self):
243  # override this!
244  pass
245 

◆ handle_read()

def esMonitoring.AsyncLineReaderMixin.handle_read (   self)

Definition at line 220 of file esMonitoring.py.

References mps_setup.append, esMonitoring.AsyncLineReaderMixin.handle_line(), join(), esMonitoring.AsyncLineReaderMixin.line_buf, and submitPVValidationJobs.split().

220  def handle_read(self):
221  rbuf = self.recv(1024*16)
222  rbuf = rbuf.decode('utf-8')
223 
227 
228  self.line_buf.append(rbuf)
229  if "\n" in rbuf:
230  # split whatever we have
231  spl = "".join(self.line_buf).split("\n")
232 
233  while len(spl) > 1:
234  line = spl.pop(0)
235  self.handle_line(line + "\n")
236 
237  if len(spl[0]):
238  self.line_buf = [spl[0]]
239  else:
240  self.line_buf = []
241 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

Member Data Documentation

◆ line_buf

esMonitoring.AsyncLineReaderMixin.line_buf

not needed, since asyncore automatically handles close if len(rbuf) == 0: self.handle_close() return

Definition at line 210 of file esMonitoring.py.

Referenced by esMonitoring.AsyncLineReaderMixin.handle_close(), and esMonitoring.AsyncLineReaderMixin.handle_read().