6 |
|
import ROOT |
7 |
|
from array import array |
8 |
|
from BetterConfigParser import BetterConfigParser |
9 |
< |
import sys |
9 |
> |
import sys,os |
10 |
|
|
11 |
|
class HistoMaker: |
12 |
|
def __init__(self, path, config, region, optionsList,rescale=1,which_weightF='weightF'): |
57 |
|
plot_path = self.config.get('Directories','plotpath') |
58 |
|
addOverFlow=eval(self.config.get('Plot_general','addOverFlow')) |
59 |
|
|
60 |
+ |
scratchDir = os.environ["TMPDIR"] |
61 |
+ |
#scratchDir = '/shome/peller/' |
62 |
|
# define treeCut |
63 |
|
if job.type != 'DATA': |
64 |
|
if type(self.region)==str: |
77 |
|
treeCut='%s'%(cutcut) |
78 |
|
|
79 |
|
# get and skim the Trees |
80 |
< |
output=TFile.Open(plot_path+'/tmp_plotCache_%s_%s.root'%(self.region,job.identifier),'recreate') |
80 |
> |
output=TFile.Open(scratchDir+'/tmp_plotCache_%s_%s.root'%(self.region,job.identifier),'recreate') |
81 |
|
input = TFile.Open(self.path+'/'+job.getpath(),'read') |
82 |
|
Tree = input.Get(job.tree) |
83 |
|
output.cd() |