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

def esMonitoring.AsyncLineReaderMixin.__init__ (   self)

Definition at line 209 of file esMonitoring.py.

209  def __init__(self):
210  self.line_buf = []
211 
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(), AlignmentCorrelationsIORoot.close(), AlignmentParametersIO.close(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController.close(), AlignableDataIO.close(), AlignableDataIORoot.close(), RawFile.close(), PhysicsTools::TrainerMonitoring.close(), AlignmentUserVariablesIO.close(), IOChannel.close(), binary_ifstream.close(), binary_ofstream.close(), LocalCacheFile.close(), HIPUserVariablesIORoot.close(), AlignmentParametersIORoot.close(), DavixFile.close(), StorageAccountProxy.close(), MuonErrorMatrix.close(), LStoreFile.close(), DCacheFile.close(), looper.Setup.close(), ThePEG::LesHouchesInterface.close(), ALIFileIn.close(), cond::persistency::SessionImpl.close(), Storage.close(), cond::persistency::PayloadReader.close(), L1GtVhdlTemplateFile.close(), XrdFile.close(), L1GtPatternWriter.close(), File.close(), MillePedeVariablesIORoot.close(), DTTPGLutFile.close(), L1TriggerLutFile.close(), cond::persistency::Session.close(), edm::RootTree.close(), edm::RootOutputTree.close(), edm::FileBlock.close(), edm::RootFile.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.

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

241  def handle_line(self):
242  # override this!
243  pass
244 
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.

220  def handle_read(self):
221  rbuf = self.recv(1024*16)
222  ## not needed, since asyncore automatically handles close
223  #if len(rbuf) == 0:
224  # self.handle_close()
225  # return
226 
227  self.line_buf.append(rbuf)
228  if "\n" in rbuf:
229  # split whatever we have
230  spl = "".join(self.line_buf).split("\n")
231 
232  while len(spl) > 1:
233  line = spl.pop(0)
234  self.handle_line(line + "\n")
235 
236  if len(spl[0]):
237  self.line_buf = [spl[0]]
238  else:
239  self.line_buf = []
240 
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().