23 '''Recursive function to find all contents in a given ROOT file''' 24 keys = in_tfile.GetDirectory(full_path).GetListOfKeys()
27 classname = key.GetClassName()
28 if 'TDirectory' in classname:
33 if options.name
and name != options.name:
continue 34 full_name =
'/'.
join([full_path,name])
35 obj = in_tfile.Get(full_name)
38 simple_name = full_name[2:]
39 print(
"%s" % simple_name, end=
' ')
40 for arg
in [x[2:]
for x
in sys.argv
if x.startswith(
"--")]:
41 if "classname" == arg:
42 print(
"%s" % classname, end=
' ')
43 if obj.InheritsFrom(
'TH1'):
45 print(
" %i" % obj.GetEntries(), end=
' ')
47 if obj.InheritsFrom(
'TH2'):
50 for j
in reversed(
list(range(obj.GetNbinsY()))):
53 [
str(obj.GetBinContent(i+1, j+1))
for i
in range(obj.GetNbinsX())]), end=
' ')
56 [
str(obj.GetBinContent(i+1))
for i
in range(obj.GetNbinsX())]), end=
' ')
58 if obj.InheritsFrom(
'TH2'):
59 for j
in reversed(
list(range(obj.GetNbinsY()))):
62 [
str(obj.GetBinError(i+1, j+1))
for i
in range(obj.GetNbinsX())]), end=
' ')
65 [
str(obj.GetBinError(i+1))
for i
in range(obj.GetNbinsX())]), end=
' ')
66 if "bincenter" == arg:
68 [
str(obj.GetBinCenter(i+1))
for i
in range(obj.GetNbinsX())]), end=
' ')
70 print(
" %i" % obj.GetMaximum(), end=
' ')
72 print(
" %i" % obj.GetMinimum(), end=
' ')
74 print(
" %i" % obj.GetBinContent(obj.GetNbinsX()), end=
' ')
75 if "underflow" == arg:
76 print(
" %i" % obj.GetBinContent(0), end=
' ')
77 if obj.InheritsFrom(
'TGraph'):
79 x, y = Double(0), Double(0)
82 for i
in range(obj.GetN()):
84 xvals.append(copy.copy(x))
85 yvals.append(copy.copy(y))
86 for point
in zip(xvals,yvals):
87 print(
" (%d, %d)" % point, end=
' ')
def recurse_thru_file(in_tfile, options, full_path='/')
S & print(S &os, JobReport::InputFile const &f)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
static std::string join(char **cmd)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run