Exemplo n.º 1
0
    def __init__(self,useLogger=True):
        self.f = None
        self.writer = writer.writer()
        self.P = process.process(makeDirs=False)
        self.gU= graphUtils.graphUtils()
        self.pip= pipath.pipath()

        self.requestedRuns = 'ALL'

        self.now = now = datetime.datetime.now()
        self.start_time = now
        fmt = '%Y%m%d_%H%M%S_%f'
        cnow = now.strftime(fmt)
        self.parentDir = 'Second/'+cnow+'/'
        self.logdir = self.parentDir + 'Log/'
        self.figdir = self.parentDir + 'Figures/'
        dirs = self.pip.fix( [self.parentDir, self.logdir, self.figdir] ) # make paths platform indepedent
        for d in dirs:
            if os.path.isdir(d):
                pass
            else:
                try:
                    os.mkdir(d)
                except IOError,e:
                    print 'second__init__',e
                else:
                    print 'second__init__ created',d
Exemplo n.º 2
0
 def __init__(self):
     # use in color()
     self.goodColors = [1, 2, 3, 4, 6, 7, 8, 9]  # no yellow(5) or white (0,10)
     self.goodColors.extend([11, 12, 18])
     self.goodColors.extend([x for x in range(28, 50)])
     self.goodMarkers = [x for x in range(20, 31)]
     self.pip = pipath.pipath()
     return
Exemplo n.º 3
0
    def __init__(self,makeDirs=True):
        self.R = reader.reader()
        self.W = wfanal.wfanal()
        self.writer = writer.writer()
        self.cT = calibThermocouple.calibThermocouple()
        self.gU= graphUtils.graphUtils()
        self.pip= pipath.pipath()

        self.writeRecon = None
        self.overlaps = 0
        self.lastEventDumped = None
        
        self.Hists = {}
        self.TDChistnames = {}
        self.refTDCs = ['S2','H0']
        self.WFHists = []
        self.Times = []
        self.rawTemps = []
        self.calTemps = []
        self.AllTrigsfname = None
        self.rootpyEvts = None
        self.NoHists = False

        if makeDirs:
            now = datetime.datetime.now()
            self.start_time = now
            fmt = '%Y%m%d_%H%M%S_%f'
            cnow = now.strftime(fmt)
            parentDir = 'Results/'+cnow+'/'
            self.logdir = parentDir + 'Log/'
            self.figdir = parentDir + 'Figures/'
            self.WFfigdir = self.figdir + 'WF/'
            self.TDCfigdir= self.figdir + 'TDC/'
            self.outputdir= parentDir + 'Output/'
            # create list of platform-independent path
            dirs = self.pip.fix( [parentDir, self.logdir, self.figdir, self.WFfigdir, self.TDCfigdir, self.outputdir] )
            parentDir, self.logdir, self.figdir, self.WFfigdir, self.TDCfigdir, self.outputdir = dirs
            for d in dirs:
                if os.path.isdir(d):
                    pass
                else:
                    try:
                        os.makedirs(d)
                    except IOError,e:
                        print 'process__init__',e
                    else:
                        print 'process__init__ created',d
Exemplo n.º 4
0
    def __init__(self,inputRFN=None):
        if inputRFN is None:
            sys.exit( 'spe_calc.__init__ NO INPUT ROOT FILE SPECIFIED')
        inputRootFileName = inputRFN
        self.GFIT = gfit.gfit()
        self.pip  = pipath.pipath()
        self.gU   = graphUtils.graphUtils()

        fmt = '%Y%m%d_%H%M%S_%f'
        cnow = datetime.datetime.now().strftime(fmt)
        d = outdir = os.path.join( 'FitResults', cnow )

        if os.path.isdir(d):
            pass
        else:
            try:
                os.mkdir(d)
            except IOError,e:
                print 'spe_calc__init__',e
            else:
Exemplo n.º 5
0
    def __init__(self,defMarkerSize=1):
        '''
        initialize colors and markers in order preferred by Danielle Berish 20170226
        set default marker size for graphs
        '''
        self.defaultMarkerSize = defMarkerSize
        # use in color()
        self.goodColors = [ROOT.kBlack, ROOT.kBlue, ROOT.kMagenta, ROOT.kGreen, ROOT.kOrange+7, ROOT.kCyan, ROOT.kViolet-1]
        clist = [1,2,3,4, 6,7,8,9, 11,12, 18] # no yellow(5) or white (0,10)
        clist.extend( [x for x in range(28,50)] )
        for c in clist:
            if c not in self.goodColors: self.goodColors.append( c )

        self.goodMarkers = [29, 20, 21, 22, 23, 33, 34]
        for m in range(20,31):
            if m not in self.goodMarkers: self.goodMarkers.append( m )

                
                
        self.pip = pipath.pipath()
        return