source: trunk/Monitoring/smon/types.py @ 840

Last change on this file since 840 was 840, checked in by jripsl, 11 years ago
  • SMON project bootstrap.
File size: 1.3 KB
Line 
1# -*- coding: ISO-8859-1 -*-
2
3##################################
4#  @program        smon
5#  @description    simulation monitor
6#  @copyright      Copyright “(c)2009 Centre National de la Recherche Scientifique CNRS.
7#                             All Rights Reserved”
8#  @svn_file       $Id: types.py 2599 2013-03-24 19:01:23Z jripsl $
9#  @version        $Rev: 2599 $
10#  @lastrevision   $Date: 2013-03-24 20:01:23 +0100 (Sun, 24 Mar 2013) $
11#  @license        CeCILL (http://dods.ipsl.jussieu.fr/jripsl/smon/LICENSE)
12##################################
13
14CSTE_SAMPLE="2.2"
15
16class SMONException(Exception):
17        code=None
18        msg=None
19
20        def __init__(self, code=None,msg=None):
21                self.code=code
22                self.msg=msg
23
24    def __str__(self):
25        return ",".join(['%s=%s'%(k,str(v)) for (k,v) in self.__dict__.iteritems()])
26
27class Tree():
28
29    def __init__(self,**kw):
30                pass
31
32    def __str__(self):
33        return ",".join(['%s=%s'%(k,str(v)) for (k,v) in self.__dict__.iteritems()])
34
35class SimulationTree(Tree):
36
37    def __init__(self,**kw):
38                pass
39
40    def __str__(self):
41        return ",".join(['%s=%s'%(k,str(v)) for (k,v) in self.__dict__.iteritems()])
42
43class SimulationTrees():
44
45    def __init__(self,**kw):
46        self.sample=kw.get("sample",[])
47
48    def __str__(self):
49        return ",".join(['%s=%s'%(k,str(v)) for (k,v) in self.__dict__.iteritems()])
Note: See TracBrowser for help on using the repository browser.