ATLAS Offline Software
Loading...
Searching...
No Matches
python.NodeUtils Namespace Reference

Functions

 timerwrapper (thefunction)
 timer (thefunction, *args, **kwargs)
 decodeFlags (flags, domain=None)
 updateFlags (flags, node, domain=None)

Function Documentation

◆ decodeFlags()

decodeFlags ( flags,
domain = None )

Definition at line 40 of file NodeUtils.py.

40def decodeFlags( flags, domain=None ) :
41 return decode_flags( flags, domain )
42
43@timerwrapper

◆ timer()

timer ( thefunction,
* args,
** kwargs )

Definition at line 35 of file NodeUtils.py.

35def timer( thefunction, *args, **kwargs):
36 return timerwrapper(thefunction)(*args,**kwargs)
37
38
39@timerwrapper

◆ timerwrapper()

timerwrapper ( thefunction)

Definition at line 22 of file NodeUtils.py.

22def timerwrapper(thefunction):
23 @wraps(thefunction)
24 def wrapper(*args, **kwargs):
25 """ timer wrapper around function """
26 t = dt.datetime.now()
27 result = thefunction( *args, **kwargs )
28 t2 = dt.datetime.now()
29 duration = str( round((t2 - t).total_seconds()*1000, 4))
30 print( f"{thefunction.__name__} timer: elapsed time: {duration} ms")
31 return result
32 return wrapper
33
34
void print(char *figname, TCanvas *c1)

◆ updateFlags()

updateFlags ( flags,
node,
domain = None )

Definition at line 44 of file NodeUtils.py.

44def updateFlags( flags, node, domain=None ) :
45 return update_flags( flags, node, domain )
46
47
48