Go to the documentation of this file.00001 import sys
00002 import ConfigParser
00003
00004 class HDQMDatabaseProducerConfiguration:
00005
00006 def __init__(self, configFileName):
00007 config = ConfigParser.ConfigParser()
00008
00009 config.read(configFileName)
00010
00011
00012
00013
00014 self.FirstRun = config.get('Config', 'FirstRun')
00015 self.LastRun = config.get('Config', 'LastRun')
00016 self.RunType = config.get('Config', 'RunType')
00017
00018 if config.get('Config', 'DiscoverRecoTypes') == "True":
00019 self.RecoTypes = ""
00020 else:
00021 self.RecoTypes = config.get('Config', 'RecoTypes').split(",")
00022
00023 self.RunsToSkip = config.get('Config', 'RunsToSkip')
00024
00025
00026 self.Group = config.get('Config', 'Group')
00027
00028
00029
00030
00031
00032 self.TagName = config.get('Config', 'TagName')
00033
00034
00035 class SubDetInfo:
00036 def __init__(self, subDet, tag, qualityFlag):
00037 self.SubDet = subDet
00038 self.Tag = tag
00039 self.QualityFlag = qualityFlag
00040
00041 self.SubDetsAndTags = list()
00042 fullList = config.get('Config', 'SubDetsAndTags')
00043 for item in fullList.split(";"):
00044 itemList = item.split(",")
00045 if len(itemList) != 3:
00046 print "Error: incorrect configuration of subDetsAndTags"
00047 sys.exit()
00048 self.SubDetsAndTags.append(SubDetInfo(itemList[0].strip(), itemList[1].strip(), itemList[2].strip()))
00049
00050
00051
00052
00053
00054 self.AuthenticationPath = config.get('Config', 'AuthenticationPath')
00055 self.Database = config.get('Config', 'Database')
00056
00057
00058
00059
00060
00061 self.BaseDir = config.get('Config', 'BaseDir')
00062
00063
00064 self.CMS_PATH = config.get('Config', 'CMS_PATH')
00065 self.CMSSW_Version = config.get('Config', 'CMSSW_Version')
00066
00067
00068 self.TemplatesDir = config.get('Config', 'TemplatesDir')
00069
00070
00071 self.SourceDir = config.get('Config', 'SourceDir')
00072
00073
00074 self.StorageDir = config.get('Config', 'StorageDir')