00001
00002 #ifndef __SILAYERS_H
00003 #define __SILAYERS_H 1
00004
00005
00006 #include <iostream>
00007 #include <vector>
00008 #include "GaudiKernel/DataObject.h"
00009
00010 extern const CLID& CLID_SiLayers;
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00025
00026 class SiLayer
00027
00028 {
00029 public:
00030
00032 SiLayer(int layer, int iview, int ToT = -1);
00034 virtual ~SiLayer() {clear();}
00035
00037 inline void setToT(int ToT) {m_ToT = ToT;}
00039 void addStrip(int istrip);
00040
00042 inline int ToT() const {return m_ToT;}
00044 inline int layer() const {return m_layer;}
00046 inline int view() const {return m_view;}
00047
00049 inline int nstrips() {return m_stripList.size();}
00051 inline int idstrip(int i) {return m_stripList[i];}
00052
00054 void clear() {m_stripList.clear();}
00056 void writeOut() const;
00057
00058 private:
00059
00061
00062
00063 private:
00064
00066 int m_view;
00068 int m_layer;
00070 int m_ToT;
00071
00073 std::vector<int> m_stripList;
00074
00075 };
00076
00077
00081
00082 class SiLayers : public DataObject
00083
00084 {
00085 public:
00086
00088 SiLayers() {ini();}
00090 virtual ~SiLayers() {clear();}
00091
00092
00093 static const CLID& classID() {return CLID_SiLayers;}
00094 virtual const CLID& clID() const {return classID();}
00095
00097 void add(SiLayer* sd) {m_SiLayersList.push_back(sd);}
00098
00100 virtual void clear();
00102 virtual void make() {}
00103
00105 int numStrips();
00107 SiLayer* getSiLayer(int ilayer, int iview);
00108
00110 int num() const {return m_SiLayersList.size();}
00112 SiLayer* Layer(int i) const {return m_SiLayersList[i];}
00113
00115 void writeOut() const;
00116
00117 protected:
00118
00120 virtual void ini();
00121
00122 private:
00123
00125 std::vector<SiLayer*> m_SiLayersList;
00126
00127 };
00128
00129 #endif