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

Classes

class  LArBlobMergeAlg

Functions

 lenFactor (thelen)
 payload_dict (payload, verbose=True)
 patchChannel (idhelper, channel, patchdet, patchFT, patchChan, verbose=False)

Variables

str __author__ = "Pavol Strizenec <pavol@cern.ch>, based on example from Walter Lampl"
 ================================================================================= Name: LArBlobMergeAlg.py
str __doc__ = " An athena algorithm to merge two LAr blobs"

Function Documentation

◆ lenFactor()

python.LArBlobMergeAlg.lenFactor ( thelen)
Get the length of rows in the db, assuming that the number of entries will be divisible by some number of cells / SCs / other DB objects 

Definition at line 26 of file LArBlobMergeAlg.py.

26def lenFactor(thelen):
27 ''' Get the length of rows in the db, assuming that the number of entries will be divisible by some number of cells / SCs / other DB objects '''
28 factor_cells = thelen/ 195072.
29 factor_SC = thelen/34048.
30 factor_LATOME = thelen/116.
31 factor = None
32 if factor_cells.is_integer():
33 factor = int(factor_cells)
34 if factor_SC.is_integer():
35 factor = int(factor_SC)
36 elif factor_LATOME.is_integer():
37 factor = int(factor_LATOME)
38 return factor
39

◆ patchChannel()

python.LArBlobMergeAlg.patchChannel ( idhelper,
channel,
patchdet,
patchFT,
patchChan,
verbose = False )

Definition at line 54 of file LArBlobMergeAlg.py.

54def patchChannel(idhelper, channel, patchdet, patchFT, patchChan, verbose=False ):
55 chid = idhelper.channel_Id(IdentifierHash(channel))
56 chidval = chid.get_identifier32().get_compact()
57 name = idhelper.channel_name(chid)
58 FT = idhelper.feedthrough_name(chid)
59
60 if len(patchdet) > 0:
61 if 0 in patchdet and idhelper.isEMBchannel(chid):
62 if verbose: print(name, chidval, "is in EMB")
63 return True
64 if 1 in patchdet and idhelper.isEMECOW(chid):
65 if verbose: print(name, chidval, "is in EMECOW")
66 return True
67 if 2 in patchdet and idhelper.isEMECIW(chid):
68 if verbose: print(name, chidval, "is in EMECIW")
69 return True
70 if 3 in patchdet and idhelper.isHECchannel(chid):
71 if verbose: print(name, chidval, "is in HEC")
72 return True
73 if 4 in patchdet and idhelper.isFCALchannel(chid):
74 if verbose: print(name, chidval, "is in FCAL")
75 return True
76 if len(patchFT) > 0:
77 if FT in patchFT:
78 if verbose: print(name, chidval, "is in FT", FT)
79 return True
80 if len(patchChan) > 0:
81 if chidval in patchChan:
82 if verbose: print(name, chidval, "is in list of channels")
83 return True
84
85 return False
86
87
88
void print(char *figname, TCanvas *c1)
This is a "hash" representation of an Identifier.

◆ payload_dict()

python.LArBlobMergeAlg.payload_dict ( payload,
verbose = True )

Definition at line 40 of file LArBlobMergeAlg.py.

40def payload_dict(payload, verbose=True):
41 contents = {}
42 for k in payload.keys():
43 contents[k] = {}
44 if isinstance(payload[k], cppyy.gbl.coral.Blob):
45 factor = lenFactor(len(payload[k])/4)
46 if verbose: print(f"{k} consists of {factor} item(s) per row")
47 contents[k]["payload"] = payload[k]
48 contents[k]["size"] = factor
49 else:
50 contents[k]["payload"] = payload[k]
51 contents[k]["size"] = None
52 return contents
53

Variable Documentation

◆ __author__

str python.LArBlobMergeAlg.__author__ = "Pavol Strizenec <pavol@cern.ch>, based on example from Walter Lampl"
private

================================================================================= Name: LArBlobMergeAlg.py

Description: An athena algorithm to merge two LAr blobs


Definition at line 10 of file LArBlobMergeAlg.py.

◆ __doc__

str python.LArBlobMergeAlg.__doc__ = " An athena algorithm to merge two LAr blobs"
private

Definition at line 11 of file LArBlobMergeAlg.py.