// // File : MiTriggerData.hh // // Purpose: Declaration of the class TMirrorTriggerData // // $Id: MiTriggerData.hh 12082 2011-02-21 17:11:29Z mathes $ // /** @file MiTriggerData.hh * Declaration of the class TMirrorTriggerData. * @author H.-J. Mathes, FzK */ #ifndef _MiTriggerData_hh_ #define _MiTriggerData_hh_ // --> prevent users from including that file directly #ifndef __CINT__ # if (!defined _MiEvent_hh_) && (!defined _VMiEvent_hh_) # error You are not supposed to include that header file ! # error Please use MiEvent.hh instead ! # endif // !_MiEvent_hh_ && !_VMiEvent_hh_ #endif // __CINT__ #include #include #include // --- forward declaration(s) /** This class contains the information deduced from analysing the trigger data * of the camera. */ class TMirrorTriggerData : public TObject { friend class TShmEvent; friend class ShmEventDescriptor; protected: typedef struct _MiTriggerDataRec { Version_t fVersion; ///< internally used struct version number UInt_t fNPixels; ///< number of pixels triggered UChar_t fPatternNumber; ///< pattern class which triggerd UChar_t fTriggerColumn; ///< column where this pattern occurred UChar_t fTriggerRow; ///< row where this pattern occurred Float_t fCutVar1; ///< TLT cut variable 1 (pixels/100ns) Float_t fCutVar2; ///< TLT cut variable 2 } MiTriggerDataRec, *MiTriggerData; public: /** Default constructor of the class TMirrorTriggerData. * * All data members are initialized with dummy values. */ TMirrorTriggerData(); /** Constructor for the class TMirrorTriggerData from a pointer to * a location in memory (shared memory). */ TMirrorTriggerData(void *); /** Copy constructor of the class TMirrorTriggerData. */ TMirrorTriggerData(const TMirrorTriggerData& rhs) : TObject(rhs) { *this = rhs; } #ifndef __CINT__ /** Constructor of the class TMirrorTriggerData from data structures * residing in SHM. */ TMirrorTriggerData(TShmEvent*); #endif // __CINT__ /** Destructor of the class TMirrorTriggerData. * If memory was allocated previously it will be released now. */ ~TMirrorTriggerData(); /** Special operator=() for the class TMirrorTriggerData which performs * a deep copy. */ TMirrorTriggerData& operator=(const TMirrorTriggerData&); /** Clear the contents of a TMirrorTriggerData. */ virtual void Clear(Option_t *o=""); /** Print the contents of the class TMirrorTriggerData to the * specified ostream. */ void Show(std::ostream& ostr=std::cout) const; protected: /** Init the TMirrorTriggerData object partially. */ void Init(); private: /** */ void Construct() { fTriggerData = new MiTriggerDataRec(); } /** */ void Destruct() { delete fTriggerData; fTriggerData = NULL; } MiEvent::Constructor_t fConstructorType; //! how object was created MiTriggerData fTriggerData; //! pointer to C struct ClassDef(TMirrorTriggerData,MiEVENTVERSIONv1) }; #endif // _MiTriggerData_hh_