CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 Vispa.Plugins.EventBrowser.EventFileAccessor.EventFileAccessor.close(), StorageAccount.close, RemoteFile.close(), csvReporter.csvReporter.close(), AlignmentCorrelationsIO.close(), cond::DbConnection::ConnectionImpl.close(), AlignmentParametersIO.close(), AlignmentCorrelationsIORoot.close(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController.close(), AlignableDataIO.close(), AlignableDataIORoot.close(), ora::SharedSession.close(), AlignmentUserVariablesIO.close(), PhysicsTools::TrainerMonitoring.close(), IOChannel.close(), LocalCacheFile.close(), binary_ifstream.close(), binary_ofstream.close(), AlignmentParametersIORoot.close(), StorageAccountProxy.close(), MuonErrorMatrix.close(), LStoreFile.close(), RFIOFile.close(), DCacheFile.close(), looper.Setup.close(), HIPUserVariablesIORoot.close(), ThePEG::LesHouchesInterface.close(), ALIFileIn.close(), cond::DbConnection.close(), Storage.close(), L1GtVhdlTemplateFile.close(), cond::persistency::PayloadReader.close(), cond::persistency::SessionImpl.close(), XrdFile.close(), L1GtPatternWriter.close(), MillePedeVariablesIORoot.close(), File.close(), cond::DbSession.close(), DTTPGLutFile.close(), L1TriggerLutFile.close(), cond::persistency::Session.close(), edm::RootTree.close(), edm::RootFile.close(), edm::RootOutputTree.close(), edm::FileBlock.close(), cond::SessionImpl.close(), cond::CSScopedSession.close(), cond::persistency::TransactionScope.close(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.close(), Vispa.Main.TabController.TabController.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:18
def esMonitoring.AsyncLineReaderMixin.handle_line (   self)

Definition at line 241 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
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 split.

221  def handle_read(self):
222  rbuf = self.recv(1024*16)
223  ## not needed, since asyncore automatically handles close
224  #if len(rbuf) == 0:
225  # self.handle_close()
226  # return
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 = []
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:18
double split
Definition: MVATrainer.cc:139

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