PSXtcInput/include/DamagePolicy.h

Go to the documentation of this file.
00001 #ifndef PSXTCINPUT_DAMAGEPOLICY_H
00002 #define PSXTCINPUT_DAMAGEPOLICY_H
00003 
00004 //--------------------------------------------------------------------------
00005 // File and Version Information:
00006 //      $Id: DamagePolicy.h 7696 2014-02-27 00:40:59Z salnikov@SLAC.STANFORD.EDU $
00007 //
00008 // Description:
00009 //      Class DamagePolicy.
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------
00014 // C/C++ Headers --
00015 //-----------------
00016 
00017 //----------------------
00018 // Base Class Headers --
00019 //----------------------
00020 #include "psana/Configurable.h"
00021 
00022 //-------------------------------
00023 // Collaborating Class Headers --
00024 //-------------------------------
00025 #include "pdsdata/xtc/Damage.hh"
00026 #include "pdsdata/xtc/TypeId.hh"
00027 
00028 //------------------------------------
00029 // Collaborating Class Declarations --
00030 //------------------------------------
00031 
00032 //              ---------------------
00033 //              -- Class Interface --
00034 //              ---------------------
00035 
00036 namespace PSXtcInput {
00037 
00038 /// @addtogroup PSXtcInput
00039 
00040 /**
00041  *  @ingroup PSXtcInput
00042  *
00043  *  @brief Class which determines where data with particular damage needs to be stored 
00044  *  in psana event.
00045  *
00046  *
00047  *  @note This software was developed for the LCLS project.  If you use all or 
00048  *  part of it, please give an appropriate acknowledgment.
00049  *
00050  *  @version $Id: DamagePolicy.h 7696 2014-02-27 00:40:59Z salnikov@SLAC.STANFORD.EDU $
00051  *
00052  *  @author Andy Salnikov
00053  */
00054 
00055 class DamagePolicy : public psana::Configurable {
00056 public:
00057 
00058   // Default constructor
00059   DamagePolicy();
00060 
00061   /// determines if an xtc type should be stored in the event
00062   bool eventDamagePolicy(Pds::Damage damage, enum Pds::TypeId::Type typeId);
00063 
00064   /// determines if an xtc type should be stored in the config
00065   bool configDamagePolicy(Pds::Damage damage);
00066 
00067 protected:
00068 
00069 private:
00070 
00071   bool m_storeOutOfOrderDamage;                       ///< if false, do not parse Xtc Type, just report damage
00072   bool m_storeUserEbeamDamage;                        ///< if true, make exception for user damage if for Ebeam
00073   bool m_storeDamagedConfig;                          ///< if true, store damaged config
00074 
00075 };
00076 
00077 } // namespace PSXtcInput
00078 
00079 #endif // PSXTCINPUT_DAMAGEPOLICY_H

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7