// // File : SelectivePixelReadout.hh // // Purpose: Declaration of class SelectivePixelReadout // // $Id: SelectivePixelReadout.hh 9725 2010-09-28 07:31:17Z mathes $ // /** @file SelectivePixelReadout.hh * Declaration of class SelectivePixelReadout. * @author H.-J. Mathes, Fzk */ #ifndef _SelectivePixelReadout_hh_ #define _SelectivePixelReadout_hh_ #include #include #include #include // --- forward declaration(s) class TMirrorBitArray; class TMirrorPixelData; /** Class to steer the selective readout of the camera data. * * This class evaluates the data readout from the SLT memory and proposes * a list of all channels to be read out. This is done in two steps: * @li pixels which are too much isolated from others are disregarded. This * step is steered by the parameter 'MinDistance' which is the minimum free distance in columns or rows to other pixels. * @li a certain area around valid pixels must be read out, too, as these * pixels might contain valuable sub-threshold data, too. This step is * steered by the parameters 'NExtColumns' and 'NExtRows' which tell * the class how much to extend the readout area. */ class SelectivePixelReadout : public VPixelSelector { public: /** Constructor for the class SelectivePixelReadout. * * All variables for the internal use and the algorithms parameters * are initialized. */ SelectivePixelReadout(MiReadout::SltParameters); /** Destructor of the class SelectivePixelReadout. * * All internal resources of the object are freed. */ virtual ~SelectivePixelReadout(); // --- methods inherited from base class VPixelSelector /** Clear internal data structures in order to perform the next * pixel selection properly when called again */ void Clear(); /** Decide if the event described by the PixelData (set through the method * SetPixelData()) has a valid signature. * * A valid signature is defined by the fact that at least two pixels close * to each other are set. * * The analysis consists of two steps: * @li single, isolated pixels are deleted * @li untriggerd pixels in the vicinity of triggered are marked for * readout. */ void Select(TMirrorPixelData*,TMirrorEventHeader::EMiTriggerSource, unsigned int column_list=0x0fffff); // -- methods specific for this class /** Print the final statistics of this processor. */ void PrintFinalResults(std::ostream& ostr=std::cout); /** Print the current parameters settings for this processor to the * specified output stream (default = cout). */ void PrintSettings(std::ostream& ostr=std::cout); /** Set a handle for the log file into which the TLT information is * written to. */ void SetLogfile(FILE* file) { fLogfile = file; } /** Set the level of verbosity for all instances of this class. */ static void SetPrintLevel(int level) { fgPrintLevel = level; } protected: /** Single pixels which are far away from pixel clusters, are deleted, * i.e. removed from the pixel data. * * This procedure is steered by the parameter fMinDist. If the parameters * is set to a value greater or equal to 22, i.e. the maximum number of * rows, this part is not executed. */ void DeleteSinglePixels(TMirrorPixelData*); static int fgPrintLevel; FILE *fLogfile; // handle for the log file MiReadout::SltParametersRec fSltParameters; // parameters for this // pixel selector TMirrorBitArray *fBitArray; // resulting pixel matrix TMirrorPixelData *fPixelData; // pixel data to work on TMirrorPixelList *fPixelList; // resulting pixel list unsigned int fNEventsAnalysed; // number of events anal. unsigned int fNEventsRejected; // number of events rejected TStopwatch fStopwatch; private: // these ones are not implemented SelectivePixelReadout(); SelectivePixelReadout(const SelectivePixelReadout&); SelectivePixelReadout& operator=(const SelectivePixelReadout&); }; #endif // _SelectivePixelReadout_hh_