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