ATLAS Offline Software
Functions
python.checkScenarioPresence Namespace Reference

Functions

def checkScenarioPresence (chain_parts, chain_name)
 

Function Documentation

◆ checkScenarioPresence()

def python.checkScenarioPresence.checkScenarioPresence (   chain_parts,
  chain_name 
)

Definition at line 16 of file checkScenarioPresence.py.

16 def checkScenarioPresence(chain_parts, chain_name):
17  full_scenarios = JetChainParts['hypoScenario']
18  headers = set([s.split('XX')[0] for s in full_scenarios])
19 
20  headers_in_chain_name = {h: chain_name.count(h) for h in headers}
21 
22  cp_scenarios = set([cp['hypoScenario'] for cp in chain_parts])
23 
24  headers_in_cp = {h: 0 for h in headers}
25 
26  for cps in cp_scenarios:
27  if cps == 'simple': continue # 'simple' not in chain name
28  for h in headers:
29  if cps.startswith(h):
30  headers_in_cp[h] += 1
31 
32  bad_headers = [h for h in headers_in_chain_name.keys() if
33  headers_in_chain_name[h] != headers_in_cp[h]]
34 
35  return bad_headers
36 
python.checkScenarioPresence.checkScenarioPresence
def checkScenarioPresence(chain_parts, chain_name)
Definition: checkScenarioPresence.py:16
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232