ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
han_lark_tester.T Class Reference
Inheritance diagram for han_lark_tester.T:
Collaboration diagram for han_lark_tester.T:

Public Member Functions

def __init__ (self)
 
def __default_token__ (self, tok)
 
def referenceblock (self, tok)
 

Public Attributes

 library_set
 

Detailed Description

Definition at line 10 of file han_lark_tester.py.

Constructor & Destructor Documentation

◆ __init__()

def han_lark_tester.T.__init__ (   self)

Definition at line 11 of file han_lark_tester.py.

11  def __init__(self):
12  super().__init__()
13  self.library_set = set()
14 

Member Function Documentation

◆ __default_token__()

def han_lark_tester.T.__default_token__ (   self,
  tok 
)

Definition at line 15 of file han_lark_tester.py.

15  def __default_token__(self,tok):
16  print(tok)
17  return tok

◆ referenceblock()

def han_lark_tester.T.referenceblock (   self,
  tok 
)

Definition at line 18 of file han_lark_tester.py.

18  def referenceblock(self, tok):
19  locations = [_ for _ in tok if isinstance(_, lark.Tree) and _.data == 'location']
20  if len(locations) > 1:
21  raise ValueError(f'More than one location given for reference {tok[0].children[0]}')
22  if len(locations) > 0:
23  locs = locations[0].children[0].split(',')
24  else:
25  locs = [_.children[0] for _ in tok if isinstance(_, lark.Tree) and _.data == 'file']
26  afspaths = [_ for _ in locs if _.startswith('/afs')]
27  if any(afspaths):
28  raise ValueError('A reference location for a production han configuration is given with an AFS path\n'
29  f'Offending path is {",".join(afspaths)} of reference {tok[0].children[0]}')
30  eospaths = [_ for _ in locs if _.startswith('/eos')]
31  xrootdpaths = [_ for _ in locs if _.startswith('root://')]
32  if len(eospaths) != len(xrootdpaths):
33  raise ValueError(f'Backup xrootd locations must be given for references with EOS paths for reference {tok[0].children[0]}\n'
34  f'Given EOS paths are {",".join(eospaths)}\n'
35  f'Given xrootd paths are {",".join(xrootdpaths)}')
36  return tok
37 
38 

Member Data Documentation

◆ library_set

han_lark_tester.T.library_set

Definition at line 13 of file han_lark_tester.py.


The documentation for this class was generated from the following file:
referenceblock
void referenceblock(const std::string &file)
Definition: hcg.cxx:1059
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
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
Trk::split
@ split
Definition: LayerMaterialProperties.h:38