Belle II Software  release-05-01-25
eclWriteWaveformParametersForMCLocalDB.cc
1 #include <framework/database/DBImportObjPtr.h>
2 #include <ecl/dbobjects/ECLDigitWaveformParametersForMC.h>
3 #include <iostream>
4 /*
5 MC photon parameters are given as averaged value.
6 Diode and hadron template parameters are computed using
7 eclComputePulseTemplates_StepX.cc scripts, consistent with procedure for data parameters.
8 */
9 
10 int main()
11 {
12 
13  Belle2::DBImportObjPtr<Belle2::ECLDigitWaveformParametersForMC> importer("ECLDigitWaveformParametersForMC");
14  importer.construct();
15 
16  const float PhotonMCPar11[11] = {27.7221, 0.5, 0.648324, 0.401711, 0.374167, 0.849417, 0.00144548, 4.70722, 0.815639, 0.555605, 0.2752};
17  const float HadronMCPar11[11] = {29.5092, 0.542623, 0.929354, 0.556139, 0.446967, 0.140175, 0.0312971, 3.12842, 0.791012, 0.619416, 0.385621};
18  const float DiodeMCPar11[11] = {28.7801, 0.578214, 0.00451387, 0.663087, 0.501441, 0.12073, 0.029675, 3.0666, 0.643883, 0.756048, 0.509381};
19 
20  importer->setTemplateParameters(PhotonMCPar11, HadronMCPar11, DiodeMCPar11);
21  importer.import(Belle2::IntervalOfValidity::always());
22 
23  std::cout << "Successfully wrote payload ECLDigitWaveformParametersForMC to local DB" << std::endl;
24 
25  return 1;
26 
27 }
Belle2::IntervalOfValidity::always
static IntervalOfValidity always()
Function that returns an interval of validity that is always valid, c.f.
Definition: IntervalOfValidity.h:72
main
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:77
Belle2::DBImportObjPtr
Class for importing a single object to the database.
Definition: DBImportObjPtr.h:33