00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "psana_examples/DumpPulnix.h"
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "MsgLogger/MsgLogger.h"
00026 #include "psddl_psana/pulnix.ddl.h"
00027
00028
00029
00030
00031
00032 using namespace psana_examples;
00033 PSANA_MODULE_FACTORY(DumpPulnix)
00034
00035
00036
00037
00038
00039 namespace psana_examples {
00040
00041
00042
00043
00044 DumpPulnix::DumpPulnix (const std::string& name)
00045 : Module(name)
00046 {
00047 m_src = configSrc("source", "DetInfo(:Tm6740)");
00048 }
00049
00050
00051
00052
00053 DumpPulnix::~DumpPulnix ()
00054 {
00055 }
00056
00057
00058 void
00059 DumpPulnix::beginCalibCycle(Event& evt, Env& env)
00060 {
00061 MsgLog(name(), trace, "in beginCalibCycle()");
00062
00063 shared_ptr<Psana::Pulnix::TM6740ConfigV1> config1 = env.configStore().get(m_src);
00064 if (config1) {
00065
00066 WithMsgLog(name(), info, str) {
00067 str << "Pulnix::TM6740ConfigV1:";
00068 str << "\n gain_a = " << config1->gain_a();
00069 str << "\n gain_b = " << config1->gain_b();
00070 str << "\n vref = " << config1->vref();
00071 str << "\n shutter_width = " << config1->shutter_width();
00072 str << "\n gain_balance = " << int(config1->gain_balance());
00073 str << "\n output_resolution = " << config1->output_resolution();
00074 str << "\n horizontal_binning = " << config1->horizontal_binning();
00075 str << "\n vertical_binning = " << config1->vertical_binning();
00076 str << "\n lookuptable_mode = " << config1->lookuptable_mode();
00077 str << "\n output_resolution_bits = " << int(config1->output_resolution_bits());
00078 }
00079
00080 }
00081
00082 shared_ptr<Psana::Pulnix::TM6740ConfigV2> config2 = env.configStore().get(m_src);
00083 if (config2) {
00084
00085 WithMsgLog(name(), info, str) {
00086 str << "Pulnix::TM6740ConfigV2:";
00087 str << "\n gain_a = " << config2->gain_a();
00088 str << "\n gain_b = " << config2->gain_b();
00089 str << "\n vref_a = " << config2->vref_a();
00090 str << "\n vref_b = " << config2->vref_b();
00091 str << "\n gain_balance = " << int(config2->gain_balance());
00092 str << "\n output_resolution = " << config2->output_resolution();
00093 str << "\n horizontal_binning = " << config2->horizontal_binning();
00094 str << "\n vertical_binning = " << config2->vertical_binning();
00095 str << "\n lookuptable_mode = " << config2->lookuptable_mode();
00096 str << "\n output_resolution_bits = " << int(config2->output_resolution_bits());
00097 }
00098
00099 }
00100 }
00101
00102
00103 void
00104 DumpPulnix::event(Event& evt, Env& env)
00105 {
00106 }
00107
00108 }