63 |
|
# FUTURE: Can drop cfg mode for CMSSW < 2_1_x |
64 |
|
outFile = open(common.work_space.jobDir()+name,"w") |
65 |
|
if name.endswith('py'): |
66 |
< |
outFile.write("import FWCore.ParameterSet.Config as cms\n") |
67 |
< |
outFile.write(self.cmsProcess.dumpPython()) |
66 |
> |
outFile.write("import FWCore.ParameterSet.Config as cms\n") |
67 |
> |
outFile.write(self.cmsProcess.dumpPython()) |
68 |
|
else: |
69 |
< |
outFile.write(str(self.cfg)) |
69 |
> |
outFile.write(str(self.cfg)) |
70 |
|
outFile.close() |
71 |
|
|
72 |
|
return |
97 |
|
messageLogger.fwkJobReports.append(name) |
98 |
|
|
99 |
|
return |
100 |
+ |
|
101 |
+ |
def getTFileService(self): |
102 |
+ |
""" Get Output filename from TFileService and return it. If not existing, return None """ |
103 |
+ |
if not self.cfg.data.services.has_key('TFileService'): |
104 |
+ |
return None |
105 |
+ |
tFileService = self.cfg.data.services['TFileService'] |
106 |
+ |
if "fileName" in tFileService.parameterNames_(): |
107 |
+ |
fileName = getattr(tFileService,'fileName',None).value() |
108 |
+ |
return fileName |
109 |
+ |
return None |
110 |
+ |
|
111 |
+ |
def getPoolOutputModule(self): |
112 |
+ |
""" Get Output filename from PoolOutputModule and return it. If not existing, return None """ |
113 |
+ |
return None |
114 |
+ |
# if not self.cfg.data.outputModules: |
115 |
+ |
# return None |
116 |
+ |
# poolOutputModule = self.cfg.data.outputModules |
117 |
+ |
# for out in poolOutputModule: |
118 |
+ |
# print out |
119 |
+ |
# fileName = poolOutputModule.getattr(poolOutputModule.values()[0],'fileName', None) |
120 |
+ |
# return fileName |
121 |
+ |
|