cspad_mod/include/CsPadCalib.h

Go to the documentation of this file.
00001 #ifndef CSPAD_MOD_CSPADCALIB_H
00002 #define CSPAD_MOD_CSPADCALIB_H
00003 
00004 //--------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Id: CsPadCalib.h 3244 2012-04-24 01:00:31Z salnikov@SLAC.STANFORD.EDU $
00007 //
00008 // Description:
00009 //      Class CsPadCalib.
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------
00014 // C/C++ Headers --
00015 //-----------------
00016 #include <string>
00017 #include <set>
00018 
00019 //----------------------
00020 // Base Class Headers --
00021 //----------------------
00022 #include "psana/Module.h"
00023 
00024 //-------------------------------
00025 // Collaborating Class Headers --
00026 //-------------------------------
00027 
00028 //------------------------------------
00029 // Collaborating Class Declarations --
00030 //------------------------------------
00031 
00032 //              ---------------------
00033 //              -- Class Interface --
00034 //              ---------------------
00035 
00036 namespace cspad_mod {
00037 
00038 /// @addtogroup cspad_mod
00039 
00040 /**
00041  *  @ingroup cspad_mod
00042  *
00043  *  @brief Module which performs CsPad calibration.
00044  *
00045  *  This software was developed for the LCLS project.  If you use all or 
00046  *  part of it, please give an appropriate acknowledgment.
00047  *
00048  *  @version \$Id: CsPadCalib.h 3244 2012-04-24 01:00:31Z salnikov@SLAC.STANFORD.EDU $
00049  *
00050  *  @author Andy Salnikov
00051  */
00052 
00053 class CsPadCalib : public Module {
00054 public:
00055 
00056   // Default constructor
00057   CsPadCalib (const std::string& name) ;
00058 
00059   // Destructor
00060   virtual ~CsPadCalib () ;
00061 
00062   /// Method which is called once at the beginning of the job
00063   virtual void beginJob(Event& evt, Env& env);
00064   
00065   /// Method which is called at the beginning of the run
00066   virtual void beginRun(Event& evt, Env& env);
00067   
00068   /// Method which is called at the beginning of the calibration cycle
00069   virtual void beginCalibCycle(Event& evt, Env& env);
00070   
00071   /// Method which is called with event data, this is the only required 
00072   /// method, all other methods are optional
00073   virtual void event(Event& evt, Env& env);
00074   
00075   /// Method which is called at the end of the calibration cycle
00076   virtual void endCalibCycle(Event& evt, Env& env);
00077 
00078   /// Method which is called at the end of the run
00079   virtual void endRun(Event& evt, Env& env);
00080 
00081   /// Method which is called once at the end of the job
00082   virtual void endJob(Event& evt, Env& env);
00083 
00084 protected:
00085 
00086   // add calibration proxies for CsPad::ElementV* classes
00087   void addProxyV1(const PSEvt::EventKey& key, Event& evt, Env& env);
00088   void addProxyV2(const PSEvt::EventKey& key, Event& evt, Env& env);
00089 
00090   // add calibration proxies for CsPad2x2::ElementV* classes
00091   void addProxy2x2(const PSEvt::EventKey& key, Event& evt, Env& env);
00092 
00093 private:
00094 
00095 
00096   std::string m_inkey;     ///< event key for non-calibrated data, default is empty
00097   std::string m_outkey;    ///< event key for calibrated data, default is "calibrated"
00098   bool m_doPedestals;  ///< do pedestal subtraction if set
00099   bool m_doPixelStatus;  ///< use pixel status data if set
00100   bool m_doCommonMode;  ///< do common mode correction if set
00101   bool m_doPixelGain;  ///< do pixel gain correction if set
00102 
00103   
00104 };
00105 
00106 } // namespace cspad_mod
00107 
00108 #endif // CSPAD_MOD_CSPADCALIB_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7