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.AsyncLineReaderMixin Class Reference
Inheritance diagram for esMonitoring.AsyncLineReaderMixin:
esMonitoring.AsyncLineReaderTimeoutMixin esMonitoring.FDJsonHandler esMonitoring.FDOutputListener

Public Member Functions

def __init__
 
def handle_close
 
def handle_line
 
def handle_read
 

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

def esMonitoring.AsyncLineReaderMixin.__init__ (   self)

Definition at line 209 of file esMonitoring.py.

210  def __init__(self):
211  self.line_buf = []
line_buf
not needed, since asyncore automatically handles close if len(rbuf) == 0: self.handle_close() return ...

Member Function Documentation

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(), 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(), edm::storage::StorageAccountProxy.close(), HIPUserVariablesIORoot.close(), ALIFileIn.close(), looper.Setup.close(), edm::storage::XrdFile.close(), cond::persistency::PayloadReader.close(), evf::GlobalEvFOutputEventWriter.close(), edm::storage::File.close(), L1GtVhdlTemplateFile.close(), cond::persistency::SessionImpl.close(), TritonCpuShmResource< IO >.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(), mkfit::DataFile.close(), edm::RootTree.close(), edm::FileBlock.close(), cond::CSScopedSession.close(), edm::RootFile.close(), cond::persistency::TransactionScope.close(), esMonitoring.AsyncLineReaderMixin.handle_line(), join(), and esMonitoring.AsyncLineReaderMixin.line_buf.

213  def handle_close(self):
214  # closing fd
215  if len(self.line_buf):
216  self.handle_line("".join(self.line_buf))
217  self.line_buf = []
218 
219  self.close()
line_buf
not needed, since asyncore automatically handles close if len(rbuf) == 0: self.handle_close() return ...
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
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().

243  def handle_line(self):
244  # override this!
245  pass
def esMonitoring.AsyncLineReaderMixin.handle_read (   self)

Definition at line 220 of file esMonitoring.py.

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

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

Member Data Documentation

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().