17from ROOT
import Belle2
24now = datetime.datetime.now()
28 """ argument parser """
30 parser = argparse.ArgumentParser(description=__doc__)
31 parser.add_argument(
'-j',
'--json',
33 help=
'input json file',
38if __name__ ==
"__main__":
41 args = arg_parser().parse_args()
48 print(
"--> json INFO:")
49 print(
" "+str(param[
"_COMMENT"]))
54 uniqueID =
"SVDClusterTimeShifter_" + str(now.isoformat())
55 uniqueID +=
"_in-" + param[
"uniqueID"][
"INFO"][
"source"]
56 uniqueID +=
"_useFor-" + param[
"uniqueID"][
"INFO"][
"useFor"]
57 uniqueID +=
"_" + param[
"uniqueID"][
"INFO"][
"config"]
58 uniqueID +=
"_" + param[
"uniqueID"][
"INFO"][
"tag"]
59 print(
"uniqueID ->", uniqueID)
64 for alg
in param[
"shiftValues"]:
65 for sType
in param[
"shiftValues"][alg]:
66 shiftVals = param[
"shiftValues"][alg][sType]
67 for strip
in range(len(shiftVals)):
68 val = shiftVals[strip]
69 if math.fabs(val) > 10:
70 b2.B2WARNING(f
"cluster time shift ({val}) is very large for ({alg} : {sType} : size {strip + 1})")
71 payload.setClusterTimeShift(alg, sType, shiftVals)
static IntervalOfValidity always()
Function that returns an interval of validity that is always valid, c.f.
This class store the shift in svd time w.r.t.
static Database & Instance()
Instance of a singleton Database.