def __init__(self, cfg_ana, cfg_comp, looperName): super(JSONAnalyzer, self).__init__(cfg_ana, cfg_comp, looperName) if not cfg_comp.isMC: if self.cfg_comp.json is None: raise ValueError('component {cname} is not MC, and contains no JSON file. Either remove the JSONAnalyzer for your path or set the "json" attribute of this component'.format(cname=cfg_comp.name)) self.lumiList = LumiList(os.path.expandvars(self.cfg_comp.json)) else: self.lumiList = None self.rltInfo = RLTInfo()
def __init__(self, cfg_ana, cfg_comp, looperName): super(JSONAnalyzer, self).__init__(cfg_ana, cfg_comp, looperName) if not cfg_comp.isMC: if self.cfg_comp.json is None and hasattr(self.cfg_ana, "json") == False: raise ValueError( 'component {cname} is not MC, and contains no JSON file. Either remove the JSONAnalyzer for your path or set the "json" attribute of this component' .format(cname=cfg_comp.name)) #use json from this analyzer if given, otherwise use the component json self.lumiList = LumiList( os.path.expandvars( getattr(self.cfg_ana, "json", self.cfg_comp.json))) else: self.lumiList = None self.passAll = getattr(self.cfg_ana, 'passAll', False) self.useLumiBlocks = self.cfg_ana.useLumiBlocks if (hasattr( self.cfg_ana, 'useLumiBlocks')) else False self.rltInfo = RLTInfo()
def __init__(self, cfg_ana, cfg_comp, looperName): super(JSONAnalyzer, self).__init__(cfg_ana, cfg_comp, looperName) if not cfg_comp.isMC: if self.cfg_comp.json is None: raise ValueError( 'component {cname} is not MC, and contains no JSON file. Either remove the JSONAnalyzer for your path or set the "json" attribute of this component' .format(cname=cfg_comp.name)) self.lumiList = LumiList(os.path.expandvars(self.cfg_comp.json)) else: self.lumiList = None if hasattr(self.cfg_comp, 'additionaljson'): self.additionalLumiList = LumiList( os.path.expandvars(self.cfg_comp.additionaljson)) self.twojson = True else: self.twojson = False self.useLumiBlocks = self.cfg_ana.useLumiBlocks if (hasattr( self.cfg_ana, 'useLumiBlocks')) else False self.rltInfo = RLTInfo()