Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TkrBadStripsSvc.h

Go to the documentation of this file.
00001 
00002 #ifndef __TKRBADSTRIPSSVC_H
00003 #define __TKRBADSTRIPSSVC_H 1
00004 
00005 #include "GaudiKernel/Service.h"
00006 
00007 #include "TkrRecon/ITkrBadStripsSvc.h"
00008 #include "TkrRecon/TkrAxis.h"
00009 #include "TkrRecon/ITkrGeometrySvc.h"
00010 
00011 #include <string>
00012 #include <vector>
00013 
00014 //----------------------------------------------
00015 //
00016 //   TkrBadStripsSvc
00017 //
00018 //       Tracker bad strips Service.
00019 //----------------------------------------------
00020 //             Leon Rochester, SLAC, 3-June-2001
00021 //----------------------------------------------
00022 class TkrBadStripsSvc : public Service,
00023         virtual public ITkrBadStripsSvc
00024 {
00025 public:
00026 
00028     TkrBadStripsSvc(const std::string& name, ISvcLocator* pSvcLocator); 
00029     virtual ~TkrBadStripsSvc() {}
00030     
00031     StatusCode initialize();
00032     StatusCode finalize();
00033     int getIndex(const int tower, const int layer, const TkrAxis::axis);
00034     v_strips* getBadStrips(const int tower, const int layer, const TkrAxis::axis);
00035     v_strips* getBadStrips(const int index);
00036     bool isBadStrip(const int tower, const int layer, const TkrAxis::axis, const int strip);
00037     bool isBadStrip(const v_strips* v, const int strip);
00038     bool isTaggedBad(const int taggedStrip);
00039     int tagBad(const int strip);
00040     int tagGood(const int strip);
00041     int untag(const int strip);
00042        
00044     StatusCode queryInterface(const IID& riid, void** ppvUnknown);
00045 
00046     static const InterfaceID& interfaceID() { return ITkrBadStripsSvc::interfaceID(); }
00047 
00049     const IID& type() const;
00050    
00051 private:
00052 
00053     //void makeCol(const int size);
00054     void readFromFile(std::ifstream* file);
00055     void addStrip(v_strips* v, const int strip);
00056 
00057     ITkrGeometrySvc* pTkrGeom;
00058 
00059     std::string m_badStripsFile;  // File name for constants
00060 
00061     int m_ntowers;            // number of towers
00062     int m_nlayers;            // number of layers
00063     int m_nviews;             // number of views
00064 
00065 
00066     // this will have m_towers*m_layers*m_views elements
00067     v_strips m_stripsCol[576];
00068 };
00069 
00070 
00071 #endif

Generated at Wed Nov 21 12:21:21 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000