ATLAS Offline Software
Classes | Functions | Variables
python.LArBlobMergeAlg Namespace Reference

Classes

class  LArBlobMergeAlg
 

Functions

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

Variables

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

Function Documentation

◆ lenFactor()

def 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.

26 def 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()

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

Definition at line 54 of file LArBlobMergeAlg.py.

54 def 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 

◆ payload_dict()

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

Definition at line 40 of file LArBlobMergeAlg.py.

40 def 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__

string 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__

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

Definition at line 11 of file LArBlobMergeAlg.py.

CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.LArBlobMergeAlg.payload_dict
def payload_dict(payload, verbose=True)
Definition: LArBlobMergeAlg.py:40
python.LArBlobMergeAlg.patchChannel
def patchChannel(idhelper, channel, patchdet, patchFT, patchChan, verbose=False)
Definition: LArBlobMergeAlg.py:54
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.LArBlobMergeAlg.lenFactor
def lenFactor(thelen)
Definition: LArBlobMergeAlg.py:26
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25