10 from LArRawConditions.LArConditionsContainer
import LArConditionsContainer
12 from PyKernel
import PyKernel
15 def __init__(self, larCablingSvc, outputLevel) :
25 del libPyROOT.const_iterator
26 except AttributeError:
30 del libPyROOT.iterator
31 except AttributeError:
42 if -1!=t.find(
"LArRampP"):
44 for obj_i
in obj.m_vRamp:
45 obj_str = obj_str+
str(obj_i)+
' '
46 print(
"ramp = ", obj_str)
49 elif -1!=t.find(
"LArShapeP"):
51 for obj_i
in obj.m_vShape :
52 obj_str = obj_str+
str(obj_i)+
' '
53 print(
"LArShape = ", obj_str)
55 for obj_i
in obj.m_vShapeDer :
56 obj_str = obj_str+
str(obj_i)+
' '
57 print(
"LArShapeDer = ", obj_str)
59 elif -1!=t.find(
"LArPedestalP"):
61 for obj_i
in obj.m_vPedestal:
62 obj_str = obj_str+
str(obj_i)+
' '
63 print(
"Pedestal = ", obj_str)
66 for obj_i
in obj.m_vPedestalRMS:
67 obj_str = obj_str+
str(obj_i)+
' '
68 print(
"PedestalRMS = ", obj_str)
70 elif -1!=t.find(
"LArAutoCorrP"):
72 for obj_i
in obj.m_vAutoCorr:
73 obj_str = obj_str+
str(obj_i)+
' '
74 print(
"AutoCorr = ", obj_str)
76 elif -1!=t.find(
"LArDAC2uAP"):
78 print(
"DAC2uA = ", obj.m_DAC2uA)
80 elif -1!=t.find(
"LArfSamplP"):
82 print(
"fSampl = ", obj.m_fSampl)
84 elif -1!=t.find(
"LAruA2MeVP"):
85 print(
"uA2MeV = ", obj.m_uA2MeV)
87 elif -1!=t.find(
"LArNoiseP") :
88 print(
"Noise = ", obj.m_Noise)
90 elif -1!=t.find(
"LArMinBiasP") :
91 print(
"MinBias = ", obj.m_MinBiasRMS)
93 elif -1!=t.find(
"LArMphysOverMcalP") :
94 print(
"MphysOverMcal = ", obj.m_MphysOverMcal)
96 elif -1!=t.find(
"LArOFCP") :
98 for obj_i
in obj.m_vOFC_a:
99 print(
" delay=",delay)
103 obj_str = obj_str +
str(obj_j) +
' '
104 print(
" OFC_a = ", obj_str)
107 for obj_j
in obj.m_vOFC_b[delay]:
108 obj_str = obj_str +
str(obj_j) +
' '
109 print(
" OFC_b = ", obj_str)
113 elif -1!=t.find(
"LArCaliWaveVec") :
115 print(
" DAC_0 = ", wave.getDAC(),
" Dt=", wave.getDt())
119 for obj_i
in wave.getWave():
120 obj_str = obj_str +
str(i) +
' ' +
str(obj_i) +
' '
122 print(
" Wave = ", obj_str)
134 if len(ListofType) != len(ListofKey) :
135 print(
" ERROR: Type and Key not the same length")
140 for i
in range(len(ListofType)):
146 _ = LArConditionsContainer(typ.__name__)
148 print(
"Cannot get ",typ.__name__,
" Container")
153 container = PyKernel.retrieveDet(typ,key)
161 caliWave = -1!=key.find(
"CaliWave")
164 for gain
in range(container.minGain(), container.minGain()+container.nGains()):
165 print(
" Accessing ",key,
" gain = ", gain)
169 for obj,id
in container.conditionsIter(gain):
170 ft = self.
onlineID.feedthrough_name(id)
172 if ( (
not caliWave)
and (
not obj.isEmpty()) )
or (caliWave
and len(obj)!=0):
175 str_id1 = self.
onlineID.print_to_string(id)
179 str_id2 = self.
onlineID.print_to_string(off_id)
182 print(
" disconnected channel" )
186 print(n,
" ",key,
" accessed" )
187 keys = FeedThroughs.keys()
189 print(
" Feedthroughs ",keys )
192 print(
" accessing ",key,
" failed ")
193 typ, value, traceBack = sys.exc_info()
195 traceback.print_exc()
204 if operator.isNumberType(obj):
206 print(tab, objName,
" = ", obj)
210 if objType.__name__ ==
'MethodProxy':
220 if operator.isNumberType(obj):
221 print(
"obj type = ",objType.__name__)
223 print(tab, objName,
" = ", obj)
225 print(
"obj type =",objType.__name__)
228 if objType.__name__.find(
'vector') == 0:
230 elif hasattr(obj,
'begin')
and hasattr(obj,
'end')
and hasattr(obj,
'size'):
244 for attrName
in attrNames:
246 if attrName.find(
"m_") == 0
or attrName.find(
"get") == 0:
248 attr = getattr(obj, attrName)
250 print(
"Could not get attr", attrName)