// // File : EyePixelData.hh // // Purpose: Header file for EyePixelData.cc, // containing TEyePixelData class declaration // // $Id: EyePixelData.hh 12083 2011-02-21 17:11:42Z mathes $ // #ifndef _EyePixelData_hh_ #define _EyePixelData_hh_ #include #include #include /** @file EyePixelData.hh * Declaration of the class TEyePixelData. * @author H.-J. Mathes, FzK */ #include // --- forward declaration(s) class TMirrorPixelData; /** Class to hold optionally all mirrors pixel data. * * The TMirrorPixelData which is used to fill objects of this type is the * data readout from the SLT memory. It is a sample of the each pixels * trigger each 1 us. */ class TEyePixelData : public TObject { public: /** Value returned if no triggered time bin was found. */ static const int kNoTrigger; /** Constructor for the class TEyePixelList. * * The following fields are initialized: * @li the storage of pixel data is disabled * @li ... */ TEyePixelData(); /** Copy constructor of the class TEyePixelData. */ TEyePixelData(const TEyePixelData&); /** Assignment operator for the class TEyePixelData. */ TEyePixelData& operator=(const TEyePixelData&); /** Destructor of the class TEyePixelData. */ virtual ~TEyePixelData(); /** operator==() for the class TEyePixelData (required by operator=()). */ bool operator==(const TEyePixelData& rhs) const { return this == &rhs; } /** Add the specified mirrors pixel data to the eyes pixel data. * * @param pixel_data the mirrors pixel data * @param mirror_id the mirrors id, range 1 .. 6 * @param is_owner if set to kTRUE, TEyePixelData owns the passed * TMirrorPixelData object. * * @return true if the object was added */ bool AddPixelData(TMirrorPixelData *pixel_data, unsigned int mirror_id,bool is_owner=false); /** Clear the contents of the TEyePixelData object. */ void Clear(Option_t *option=""); /** Print information about this object to the specified ostream. * * @param ostr the output stream, defaults to std::cout */ void Show(std::ostream& ostr=std::cout); /** Get the first triggered time bin for the specified pixel. * * @param fdpixel FdPixelNumber of the pixel you are interested in * @param first_bin index of time slice where to start looking for * triggered pixels, 0 ... Fd::kMI_NSLT_BINS - 1 * @param first_bin index of time slice where to stop looking for * triggered pixels, 0 ... Fd::kMI_NSLT_BINS - 1
* * @return the time bin (0 ... Fd::kMI_NSLT_BINS - 1) where the first trigger * occurred or kNoTrigger if there was no trigger at all, i.e. * the return value has to be interpreted in units of usec. */ int GetFirstTriggeredTimeBin(FdUtil::Fd::FdPixelNumber fdpixel, unsigned int first_bin=0, unsigned int last_bin=FdUtil::Fd::kMI_NSLT_BINS - 1) const; /** Get the number of triggered pixel within the specified time range (in * usec) of the SLT memory. */ unsigned int GetNumberOfTriggeredPixels(unsigned int start_slice = 0, unsigned int end_slice = FdUtil::Fd::kMI_NSLT_BINS - 1) const; /** Get the number of triggered pixel for the specified Mirror and within * the specified time range (in usec) of the SLT memory. */ unsigned int GetNumberOfTriggeredPixels(unsigned int mirror_id, unsigned int start_slice, unsigned int end_slice) const; /** Get the TMirrorPixelData for the specified mirror id. * * @param mirror_id the mirrors id, range 1 .. 6 * @return NULL, if the specified mirror is not present in the data or is * lying outside the valid range. */ TMirrorPixelData* GetPixelData(unsigned int mirror_id) const; private: Version_t fStreamerVersion; //! version read from file TMirrorPixelData *fPixelData[FdUtil::Fd::kEYE_NMIRRORS]; // Pointers to PixelData obj. ClassDef(TEyePixelData,EyeEVENTVERSIONv2) }; #endif // _EyePixelData_hh_