/* ======================================================================== *\ ! ! * ! * This file is part of MARS, the MAGIC Analysis and Reconstruction ! * Software. It is distributed to you in the hope that it can be a useful ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. ! * It is distributed WITHOUT ANY WARRANTY. ! * ! * Permission to use, copy, modify and distribute this software and its ! * documentation for any purpose is hereby granted without fee, ! * provided that the above copyright notice appear in all copies and ! * that both that copyright notice and this permission notice appear ! * in supporting documentation. It is provided "as is" without express ! * or implied warranty. ! * ! ! ! Author(s): Thomas Bretz, 1/2004 ! ! Copyright: MAGIC Software Development, 2000-2004 ! ! \* ======================================================================== */ ///////////////////////////////////////////////////////////////////////////// // // MBadPixelsPix // ///////////////////////////////////////////////////////////////////////////// #include "MBadPixelsPix.h" #include "MLog.h" #include "MLogManip.h" ClassImp(MBadPixelsPix); using namespace std; const Char_t MBadPixelsPix::fgRunMask=MBadPixelsPix::kUnsuitableRun; // ------------------------------------------------------------------------ // // Initialize Pixel to be Ok. // MBadPixelsPix::MBadPixelsPix(const char* name, const char* title) : fInfo(0) { fName = name ? name : "MBadPixelsPix"; fTitle = title ? title : "Container storeing bad pixel information for a single pixel"; } // ------------------------------------------------------------------------ // // Invalidate all bits which are not run-wise. This will be called for // all entries in the parameter list, just before each time the task-list // is executed. // void MBadPixelsPix::Reset() { fInfo[0] &= fgRunMask; } // ------------------------------------------------------------------------ // // Invalidate values (set=0 which mean Pixel OK) // void MBadPixelsPix::Clear(Option_t *o) { fInfo.Reset(0); } // ------------------------------------------------------------------------ // // Merge (bitwise or) the information in pix into this pixel. // void MBadPixelsPix::Merge(const MBadPixelsPix &pix) { const Int_t n = pix.fInfo.GetSize(); if (n>fInfo.GetSize()) fInfo.Set(n); for (int i=0; i