ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/updateinfo.py
Revision: 1.8
Committed: Wed Jan 16 16:22:47 2013 UTC (12 years, 3 months ago) by peller
Content type: text/x-python
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +0 -0 lines
State: FILE REMOVED
Log Message:
reorganized the whole repository. Macros im myutils, config files in subdirectories. Config file split in parts. Path config file restructured. Moved all path options to the path config. Changed the code accordingly.

File Contents

# User Rev Content
1 peller 1.1 #!/usr/bin/env python
2 peller 1.2 from samplesclass import sample
3 peller 1.1 import pickle
4     import sys
5    
6     path=sys.argv[1]
7     #path='/scratch/nov10_inclusive/Z'
8 peller 1.2 name=sys.argv[2]
9 peller 1.1 #type='BKG'
10     attribute=sys.argv[3]
11     #attribute='split'
12 peller 1.6 newvalue=eval(sys.argv[4])
13 peller 1.1 #newvalue=0.5
14    
15    
16     infofile = open(path+'/samples.info','r')
17     info = pickle.load(infofile)
18     infofile.close()
19    
20     for job in info:
21 peller 1.7 if (name in job.name) or (name == "all"):
22 peller 1.1 print '\t - %s' %(job.name)
23     setattr(job,attribute,newvalue)
24    
25     infofile = open(path+'/samples.info','w')
26     pickle.dump(info,infofile)
27     infofile.close()