def SetupOutputDPDs(runArgs, flagContainerList): DPDMakerScripts = [] for flagContainer in flagContainerList: for flagName in flagContainer.__dict__.keys(): flag = getattr(flagContainer, flagName) if hasattr(flag, "StreamName"): dpdName = flag.StreamName.lstrip("Stream") argName = 'output' + dpdName + 'File' if hasattr(runArgs, argName): if hasattr(flag, "FileName"): flag.FileName = getattr(runArgs, argName) flag.set_Value_and_Lock(True) if hasattr(flag, "DPDMakerScript"): AddValidItemToList(flag.DPDMakerScript, DPDMakerScripts) elif hasattr(flag, 'configure'): DPDMakerScripts.append(flag.configure) else: raise RuntimeError( "No athena script attached to argument '%s'" % argName) else: raise RuntimeError( "%s is not conform with the job transform convention, hence unusable. Please fix this." % dpdName) return DPDMakerScripts
pass except ImportError: # This is here for backwards compatibility from RecExCommon.RecoFunctions import AddValidItemToList pass #Add D2PDMakers too #try: # from D2PDMaker.D2PDFlags import listAODtoD2PD,listESDtoD2PD # AddValidItemToList(listAODtoD2PD,listAODtoDPD) # AddValidItemToList(listESDtoD2PD,listESDtoDPD) #except: # print "Unable to import listAODtoD2PD. This requires D2PDMaker-00-00-55-08 or D2PDMaker-00-00-62" #Now build the list of all known DPDs AddValidItemToList(listRAWtoDPD, listAllKnownDPD) AddValidItemToList(listESDtoDPD, listAllKnownDPD) AddValidItemToList(listAODtoDPD, listAllKnownDPD) # The lists below are only for RecExCommon's auto-configuration backward compatibility when reading old DPDs. # Please don't use these obsolete names to write new DPDs! listBackwardCompatibleAODtoDPD = [ 'D1PD_SGLEL', 'D1PD_SGLPH', 'D1PD_SGLMU', 'D1PD_SGLTAU', 'D1PD_ELEL', 'D1PD_MUMU', 'D1PD_ELMU', 'D1PD_ELTAU', 'D1PD_MUTAU', 'D1PD_ELMET', 'D1PD_MUMET', 'D1PD_JETMET', 'D1PD_JETEL', 'D1PD_JETMU', 'D1PD_JETTAU', 'AOD_SKIMEL', 'DAODM_SGLEL', 'DAODM_SGLPH', 'DAODM_SGLMU', 'DAODM_SGLTAU', 'DAOD_2EL', 'DAOD_2PH', 'DAOD_2MU', 'DAOD_ELMU', 'DAOD_ELTAU', 'DAOD_MUTAU', 'DAOD_ELMET', 'DAOD_MUMET', 'DAOD_JETMET', 'DAOD_ELJET', 'DAOD_MUJET', 'DAOD_TAUJET', 'DAOD_SKIMEL', 'DAOD_EGLOOSE', 'DAOD_MU', 'DAOD_ELLOOSE', 'DAOD_ONIAMUMU', 'StreamDAODM_SGLEL', 'StreamDAOD_2EL', 'StreamDAOD_ELMU', 'StreamDAOD_ELTAU', 'StreamDAOD_ELMET',
def append(self,item): if self.is_locked(): self._log.info('The JobProperty %s is blocked' % self.__name__) else: AddValidItemToList(item,self.StoredValue) return