00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "psana_examples/DumpPimax.h"
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "MsgLogger/MsgLogger.h"
00026 #include "psddl_psana/pimax.ddl.h"
00027
00028
00029
00030
00031
00032 using namespace psana_examples;
00033 PSANA_MODULE_FACTORY(DumpPimax)
00034
00035
00036
00037
00038
00039 namespace psana_examples {
00040
00041
00042
00043
00044 DumpPimax::DumpPimax (const std::string& name)
00045 : Module(name)
00046 {
00047 m_src = configSrc("source", "DetInfo(:Pimax)");
00048 }
00049
00050
00051
00052
00053 DumpPimax::~DumpPimax ()
00054 {
00055 }
00056
00057
00058 void
00059 DumpPimax::beginCalibCycle(Event& evt, Env& env)
00060 {
00061 MsgLog(name(), trace, "in beginCalibCycle()");
00062
00063 shared_ptr<Psana::Pimax::ConfigV1> config1 = env.configStore().get(m_src);
00064 if (config1) {
00065
00066 WithMsgLog(name(), info, str) {
00067 str << "Pimax::ConfigV1:";
00068 str << "\n width = " << config1->width();
00069 str << "\n height = " << config1->height();
00070 str << "\n orgX = " << config1->orgX();
00071 str << "\n orgY = " << config1->orgY();
00072 str << "\n binX = " << config1->binX();
00073 str << "\n binY = " << config1->binY();
00074 str << "\n exposureTime = " << config1->exposureTime();
00075 str << "\n coolingTemp = " << config1->coolingTemp();
00076 str << "\n readoutSpeed = " << config1->readoutSpeed();
00077 str << "\n gainIndex = " << config1->gainIndex();
00078 str << "\n intensifierGain = " << config1->intensifierGain();
00079 str << "\n gateDelay = " << config1->gateDelay();
00080 str << "\n gateWidth = " << config1->gateWidth();
00081 str << "\n maskedHeight = " << config1->maskedHeight();
00082 str << "\n kineticHeight = " << config1->kineticHeight();
00083 str << "\n vsSpeed = " << config1->vsSpeed();
00084 str << "\n infoReportInterval = " << config1->infoReportInterval();
00085 str << "\n exposureEventCode = " << config1->exposureEventCode();
00086 str << "\n numIntegrationShots = " << config1->numIntegrationShots();
00087 str << "\n frameSize = " << config1->frameSize();
00088 str << "\n numPixelsX = " << config1->numPixelsX();
00089 str << "\n numPixelsY = " << config1->numPixelsY();
00090 str << "\n numPixels = " << config1->numPixels();
00091 }
00092
00093 }
00094 }
00095
00096
00097 void
00098 DumpPimax::event(Event& evt, Env& env)
00099 {
00100 shared_ptr<Psana::Pimax::FrameV1> frame1 = evt.get(m_src);
00101 if (frame1) {
00102 WithMsgLog(name(), info, str) {
00103 str << "Pimax::FrameV1:";
00104 str << "\n shotIdStart = " << frame1->shotIdStart();
00105 str << "\n readoutTime = " << frame1->readoutTime();
00106 str << "\n temperature = " << frame1->temperature();
00107 str << "\n data = " << frame1->data();
00108 }
00109 }
00110 }
00111
00112 }