// // File : LongPixelPattern.hh // // Purpose: Header file for class LongPixelPattern // // $Revision: 9725 $ // /** @file LongPixelPattern.hh * Declaration of the class LongPixelPattern. * @author H.-J. Mathes, FzK */ #ifndef _LongPixelPattern_hh_ #define _LongPixelPattern_hh_ #include #include #include /** This class is in principle an extended PixelPattern. * * This means that it may contain the internal data of more than one * SltPatterm object. PixelPatterns may overlap, so this class acts as an * container for overlapping SLT patterns. The access to a class object is * mostly done via a similar interface like to the class PixelPattern. */ class LongPixelPattern : public PixelPattern { public: /** Constructor for the class LongPixelPattern. * * The LongPixelPattern 'eats' a PixelPattern object as its seed and * becomes afterwards 'fatter' by eating more and more PixelPattern * objects. */ LongPixelPattern(PixelPattern&); /** Constructor for the class LongPixelPattern. Memory sufficient for the * specified number of pixels is allocated. */ LongPixelPattern(unsigned int size); /** Add a PixelPattern object which has some overlap with the LongPixelPattern * object to the LongPixelPattern object. */ void Add(PixelPattern*); /** Add the specified pixel to the pattern. * * If the storage which is allocated to keep the column and row numbers * is not large enough, new memory is allocated. */ void Add(FdUtil::Fd::PixelNumber); /** Return the pattern id/class of the actual pattern. * * In the case of a combined pattern this makes no sense, so 0x7f is * returned always. */ int GetPatternId() { return 0x7f; } /** Returns true, if the passed PixelPattern has any overlap with the * pixels of this object (i.e. is partly contained in this object). */ bool HasOverlap(PixelPattern*); private: LongPixelPattern(); // is private to restrict construction LongPixelPattern(LongPixelPattern&); bool fIsValid; unsigned int fNMaxPixel; // maximum number of pixels }; #endif // _LongPixelPattern_hh_