Functions | |
def | pathToList |
def | readPicFiles |
def | splitToPackages |
Variables | |
string | __author__ = "Aurelija" |
string | __date__ = "$2010-08-13 14.28.08$" |
list | rulesNames = [] |
string | slash = "\\" |
def cmsCodeRules::pickleFileParser::pathToList | ( | path | ) |
Definition at line 66 of file pickleFileParser.py.
def cmsCodeRules::pickleFileParser::readPicFiles | ( | directory, | |
toSplit = False |
|||
) |
Definition at line 16 of file pickleFileParser.py.
00017 : 00018 00019 ruleResult = {} 00020 rulesResults = {} 00021 picFiles = glob.glob(join(directory, "cmsCodeRule*.dat")) 00022 picFiles.sort() 00023 00024 for file in picFiles: 00025 head, fileName = split(file) 00026 ruleName = fileName[11:-4] 00027 rulesNames.append(ruleName) 00028 00029 file = open(file) 00030 ruleResult = pickle.load(file) 00031 if toSplit: 00032 ruleResult = splitToPackages(ruleResult) 00033 00034 rulesResults[ruleName] = ruleResult 00035 00036 return rulesResults 00037
def cmsCodeRules::pickleFileParser::splitToPackages | ( | ruleResult | ) |
Definition at line 38 of file pickleFileParser.py.
00039 : 00040 00041 packageResult = [] 00042 info = [] 00043 00044 if not ruleResult: return info 00045 00046 ruleResult = ruleResult.items() 00047 ruleResult.sort() 00048 file, lines = ruleResult.pop(0) 00049 pathList = pathToList(file) 00050 package = slash.join(pathList[:2]) 00051 packageResult.append((slash.join(pathList[2:]), lines)) 00052 00053 for file, lines in ruleResult: 00054 pathList = pathToList(file) 00055 head = slash.join(pathList[:2]) 00056 tail = slash.join(pathList[2:]) 00057 if package == head: 00058 packageResult.append((tail, lines)) 00059 else: 00060 info.append((package, packageResult)) 00061 packageResult = [] 00062 package = head 00063 packageResult.append((tail, lines)) 00064 info.append((package, packageResult)) 00065 return info #list of (package, packageResult)
string cmsCodeRules::pickleFileParser::__author__ = "Aurelija" |
Definition at line 1 of file pickleFileParser.py.
string cmsCodeRules::pickleFileParser::__date__ = "$2010-08-13 14.28.08$" |
Definition at line 2 of file pickleFileParser.py.
Definition at line 9 of file pickleFileParser.py.
string cmsCodeRules::pickleFileParser::slash = "\\" |
Definition at line 12 of file pickleFileParser.py.
Referenced by FittedEntry::BuildName(), SummaryPlot::check(), CommissioningHistograms::copyCustomInformation(), FittedEntriesManager::createFileName(), PFRootEventManager::expand(), CommissioningHistograms::extractHistograms(), DQMImplNet< DQMNet::Object >::findObject(), DQMStore::makeDirectory(), DQMImplNet< DQMNet::Object >::makeObject(), EcalTrigPrimESProducer::parseTextFile(), DQMStore::readDirectory(), CommissioningHistograms::runNumber(), CommissioningHistograms::runType(), splitPath(), Measurement::Substitute2p(), and SiStripConfigDb::usingDatabase().