psana_examples/include/DumpDgram.h

Go to the documentation of this file.
00001 #ifndef PSANA_EXAMPLES_DUMPDGRAM_H
00002 #define PSANA_EXAMPLES_DUMPDGRAM_H
00003 
00004 //--------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Id:
00007 //
00008 // Description:
00009 //      Class DumpDgram
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------
00014 // C/C++ Headers --
00015 //-----------------
00016 
00017 //----------------------
00018 // Base Class Headers --
00019 //----------------------
00020 #include "psana/Module.h"
00021 
00022 //-------------------------------
00023 // Collaborating Class Headers --
00024 //-------------------------------
00025 
00026 //------------------------------------
00027 // Collaborating Class Declarations --
00028 //------------------------------------
00029 #include "XtcInput/DgramList.h"
00030 #include "XtcInput/FiducialsCompare.h"
00031 
00032 //              ---------------------
00033 //              -- Class Interface --
00034 //              ---------------------
00035 
00036 namespace psana_examples {
00037 
00038 /// @addtogroup psana_examples
00039 
00040 /**
00041  *  @ingroup psana_examples
00042  *
00043  *  @brief gets the DgramList or Dgram from the Event. Dumps basic information.
00044  *
00045  *  This example demonstrates how to deal with the raw xtc dgram, if it is present in
00046  *  the event (it will not be if psana's input is hdf5). Ealier versions of psana put 
00047  *  a single Pds::Dgram into the event. Later versions that deal with offline event 
00048  *  building put a XtcInput::DgramList into the event. 
00049  *
00050  *  In general users *should not* work with this data. This is the raw data from which psana 
00051  *  fills the Event. Users should access the data by getting psana Types from the Event. In general
00052  *  they should not be looking at the Datagrams. However looking at the Datagrams could be 
00053  *  useful for diagnosing problems with event building.
00054  *
00055  *  @note This software was developed for the LCLS project.  If you use all or 
00056  *  part of it, please give an appropriate acknowledgment.
00057  *
00058  *  @see XtcInput::DgramList
00059  *
00060  *  @version \$Id:
00061  *
00062  *  @author David Schneider
00063  */
00064 
00065 class DumpDgram : public Module {
00066 public:
00067 
00068   // Default constructor
00069   DumpDgram (const std::string& name) ;
00070 
00071   // Destructor
00072   virtual ~DumpDgram () ;
00073 
00074   /// Method which is called once at the beginning of the job
00075   virtual void beginJob(Event& evt, Env& env);
00076   
00077   /// Method which is called at the beginning of the run
00078   virtual void beginRun(Event& evt, Env& env);
00079   
00080   /// Method which is called at the beginning of the calibration cycle
00081   virtual void beginCalibCycle(Event& evt, Env& env);
00082 
00083   /// Method which is called with event data
00084   virtual void event(Event& evt, Env& env);
00085 
00086   /// Method which is called at the end of the calibration cycle
00087   virtual void endCalibCycle(Event& evt, Env& env);
00088 
00089   /// Method which is called at the end of the run
00090   virtual void endRun(Event& evt, Env& env);
00091 
00092   /// Method which is called once at the end of the job
00093   virtual void endJob(Event& evt, Env& env);
00094 
00095  protected:
00096   void dgramDump(Event &evt, const std::string &hdr);
00097 };
00098 
00099 } // namespace psana_examples
00100 
00101 #endif // PSANA_EXAMPLES_DGRAMLISTFIDUCIALS_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7