ATLAS Offline Software
Classes | Functions
python.TriggerAnalysisSFConfig Namespace Reference

Classes

class  TriggerAnalysisSFBlock
 

Functions

bool is_mc_from (ConfigAccumulator config, Union[Campaign, Iterable[Campaign]] campaign_list)
 
bool is_data_from (config, Union[int, Iterable[int]] data_year_list)
 

Function Documentation

◆ is_data_from()

bool python.TriggerAnalysisSFConfig.is_data_from (   config,
Union[int, Iterable[int]]  data_year_list 
)
Utility function to check whether the data type is data and whether the year is in desired list of years

Definition at line 20 of file TriggerAnalysisSFConfig.py.

20 def is_data_from(config, data_year_list: Union[int, Iterable[int]]) -> bool:
21  """
22  Utility function to check whether the data type is data and whether the year is in desired list of years
23  """
24  data_year_list = [data_year_list] if isinstance(data_year_list, int) else data_year_list
25  return config.dataType() is DataType.Data and config.dataYear() in data_year_list
26 
27 

◆ is_mc_from()

bool python.TriggerAnalysisSFConfig.is_mc_from ( ConfigAccumulator  config,
Union[Campaign, Iterable[Campaign]]  campaign_list 
)
Utility function to check whether the data type is mc and whether the campaign is in desired list of campaigns
without causing an invalid FlugEnum comparison

Definition at line 11 of file TriggerAnalysisSFConfig.py.

11 def is_mc_from(config: ConfigAccumulator, campaign_list: Union[Campaign, Iterable[Campaign]]) -> bool:
12  """
13  Utility function to check whether the data type is mc and whether the campaign is in desired list of campaigns
14  without causing an invalid FlugEnum comparison
15  """
16  campaign_list = [campaign_list] if isinstance(campaign_list, Campaign) else campaign_list
17  return config.dataType() is not DataType.Data and config.campaign() in campaign_list
18 
19 
python.TriggerAnalysisSFConfig.is_mc_from
bool is_mc_from(ConfigAccumulator config, Union[Campaign, Iterable[Campaign]] campaign_list)
Definition: TriggerAnalysisSFConfig.py:11
python.TriggerAnalysisSFConfig.is_data_from
bool is_data_from(config, Union[int, Iterable[int]] data_year_list)
Definition: TriggerAnalysisSFConfig.py:20