12from ROOT
import Belle2
15Create and fill ECLChannelMap class.
16Can be used for creating run-dependent ECLUnpacker parameters.
23DBOBJECT_NAME =
'ECLUnpackingParameters'
26def getValue(crate, shaper, channel):
28 Edit this function according to your current use-case.
29 If you are preparing ECLUnpackingParameters, see
30 ECLUnpackerModule::ECLUnpack for bit definitions.
32 if crate == 32
and shaper == 9:
46 for crate
in range(1, 52 + 1):
53 for shaper
in range(1, sh_count + 1):
54 for channel
in range(1, 16 + 1):
55 val = getValue(crate, shaper, channel)
63 vec_bar = ROOT.std.vector(
'int')()
65 vec_fwd = ROOT.std.vector(
'int')()
67 vec_bwd = ROOT.std.vector(
'int')()
71 coefs.setMappingVectors(vec_bar, vec_fwd, vec_bwd)
75 db.storeData(DBOBJECT_NAME, coefs, iov)
78if __name__ ==
'__main__':
DB object to store correspondence table of type (Crate id, ShaperDSP id, Channel id) <-> (ECL CellID)
A class that describes the interval of experiments/runs for which an object in the database is valid.
static Database & Instance()
Instance of a singleton Database.