// // File : VPixelSelector.hh // // Purpose: Declaration of the class VPixelSelector // // $Id: VPixelSelector.hh 9725 2010-09-28 07:31:17Z mathes $ // /** @file VPixelSelector.hh * Declaration of the class VPixelSelector. * @author H.-J. Mathes, FzK */ #ifndef _VPixelSelector_hh_ #define _VPixelSelector_hh_ #include #include #include #include #include #include // --- forward declaration(s) class TMirrorBitArray; class TMirrorPixelData; class TMirrorPixelList; /** A (partly) abstract base class for the pixel selectiopn mechanism. * * Based on the TMirrorPixelData read out from the SLT memory, a list of * pixels is prepared which is then used to steer the readout of the * monitoring data and the FADC data. */ class VPixelSelector { public: /** Constructor for the class VPixelSelector. */ VPixelSelector(const char *); /** Destructor of the class VPixelSelector. */ virtual ~VPixelSelector(); /** Clear/Reset the pixel list, i.e. the pixel list contains then no more * pixels. */ virtual void Clear() = 0; /** Clone the passed pixel selector. */ static VPixelSelector * Clone(VPixelSelector *); /** Create a pixel selector of the specified type. */ static VPixelSelector * Create(std::string,MiReadout::SltParameters); /** Create an object of the selected pixel selector type. */ static VPixelSelector * Create(MiReadout::SltParameters); #warning Tbd: put 'trigger_source' into TMirrorPixelData ! /** Run the selection algorithm. * * @param pixel_data TMirrorPixelData from SLT readout * @param trigger_source optional, used in some derived classes * @param column_list optional bit vector of FE modules * * @todo 'trigger_source' should be integrated into TMirrorPixelData */ virtual void Select(TMirrorPixelData*,TMirrorEventHeader::EMiTriggerSource, unsigned int column_list=0x0fffff) = 0; /** Return true if this PixelSelector does a full camera readout. */ virtual bool DoesFullReadout() { return false; } /** Get the name of the current PixelSelector. */ const std::string& GetName() { return fName; } /** Get the list of pixels to be read out. */ virtual TMirrorPixelList& GetPixelList(); /** Get the a 'matrix' of pixels to be read out. */ virtual TMirrorBitArray& GetPixels(); /** */ virtual void PrintSettings(std::ostream& =std::cout) { FD_CWARN << "VPixelSelector::PrintSettings() not implemented !" << std::endl; } /** Set the log-file for the pixel selector. */ virtual void SetLogfile(std::FILE * /* file */) { FD_CWARN << "VPixelSelector::PrintSettings() not implemented !" << std::endl; } /** Set the parameters (SltParameters) of the pixel selector. */ virtual void SetParameters(MiReadout::SltParameters slt) { if ( slt ) fSltPar = *slt; } protected: /** Set the 'matrix' of pixels to be read out. */ void Set(TMirrorBitArray*); /** Set the list of pixels to be read out. */ void Set(TMirrorPixelList*); /** Set the 'name' of the pixel selector. */ void SetName(const char *); /** The parameters (SltParameters) for this type of pixel selectors. */ MiReadout::SltParametersRec fSltPar; private: // these ones don't exist VPixelSelector(); VPixelSelector(const VPixelSelector&); TMirrorBitArray *fBitArray; std::string fName; /** The current list of selected pixels. * * This list must be cleared before a new event (TMirrorPixelData) is * analysed. */ TMirrorPixelList *fPixelList; }; #endif // _VPixelSelector_hh_