Example #1
0
 def __init__(self, name="datasvc"):
     """ Store data into a dictionary
     """
     ISvc.__init__(self, name)
     self.imports += ["msg"]
     self.store = {}
     return
Example #2
0
 def __init__(self,name='msg',level=Message.Info,fname=''):
     """ Messanger constructor with Message.level and the possibility to
     log into a file with name (fname)
     """
     ISvc.__init__(self,name)
     self.level = level
     self.file = None
     if (fname != '') :
         self.file = open(fname,'a')
         self.cinfo(self.name,' file open ',fname)
     return
Example #3
0
 def __init__(self,name='root',fname=''):
     """ ROOTSvc class.
     To book, fill and manage ROOT histograms and trees
     """
     ISvc.__init__(self,name)
     self.imports+=['msg']
     self.fname = fname
     self.tstore = {}
     self.tfills = [(TH1F,h1fill,True),(TH2F,h2fill,True),
                    (TProfile,hprfill,True),(Tree,treefill,False)]
     self.ttypes = map(lambda x: x[0],self.tfills)
     self.tfile = None
     return
Example #4
0
    def __init__(self, name="req", al=None):
        """ constructor with the name.
        if (al) is <<alex>> application, EndJob and Abort request are associated to the application finalize 
        One can set a function to any Status request.
        """
        ISvc.__init__(self, name)
        self.imports += ["msg"]
        self.freq = {}
        if al:

            def ff():
                al.finalize()

            self.setrequest(Request.Abort, ff)
            self.setrequest(Request.EndJob, ff)
        return