StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtConfig.hh
1 /***************************************************************************
2  *
3  * $Id: StSvtConfig.hh,v 1.4 2002/02/22 20:12:15 caines Exp $
4  *
5  * Author: Marcelo Munhoz
6  ***************************************************************************
7  *
8  * Description: SVT Geometry object. It makes the link with the Data Base
9  *
10  ***************************************************************************
11  *
12  * $Log: StSvtConfig.hh,v $
13  * Revision 1.4 2002/02/22 20:12:15 caines
14  * Add getLayer() call
15  *
16  * Revision 1.3 2001/10/04 02:56:26 caines
17  * Fix some of the hybrid swapping indexing
18  *
19  * Revision 1.2 2001/08/24 21:03:03 caines
20  * Do index swapping for year2001 data
21  *
22  * Revision 1.1 2000/11/30 20:38:50 caines
23  * Svt configuration files
24  *
25  **************************************************************************/
26 
27 #ifndef STSVTCONFIG_HH
28 #define STSVTCONFIG_HH
29 
30 #define MAX_NUMBER_OF_BARRELS 3
31 
32 #include "StObject.h"
33 #include "TString.h"
34 
35 class StSvtConfig: public StObject
36 {
37 public:
38  StSvtConfig();
39  virtual ~StSvtConfig();
40 
41  StSvtConfig(const StSvtConfig&);
42  StSvtConfig& operator = (const StSvtConfig&);
43 
44  int getNumberOfBarrels() {return mNumberOfBarrels;}
45  int getNumberOfLadders(int barrel) {return mNumberOfLadders[barrel-1];}
46  int getNumberOfWafers(int barrel) {return mNumberOfWafers[barrel-1];}
47  int getNumberOfHybrids() {return mNumberOfHybrids;}
48  int getTotalNumberOfHybrids() {return mTotalNumberOfHybrids;}
49 
50  int getNumberOfAnodes() {return mNumberOfAnodes;}
51  int getNumberOfTimeBins() {return mNumberOfTimeBins;}
52 
53  void setNumberOfBarrels(int barrels) {mNumberOfBarrels = barrels;}
54  void setNumberOfLadders(int barrel, int ladders) {mNumberOfLadders[barrel-1] = ladders;}
55  void setNumberOfWafers(int barrel, int wafers) {mNumberOfWafers[barrel-1] = wafers;}
56  void setNumberOfHybrids(int hybrids) {mNumberOfHybrids = hybrids;}
57  void setTotalNumberOfHybrids(int hybrids) {mTotalNumberOfHybrids = hybrids;}
58 
59  void setNumberOfAnodes(int anodes) {mNumberOfAnodes = anodes;}
60  void setNumberOfTimeBins(int timeBins) {mNumberOfTimeBins = timeBins;}
61 
62  void setConfiguration(); // set the SVT configuration
63  void setConfiguration(const char* config); // set the SVT configuration
64 
65  int getHybridIndex(int barrelID, int ladderID, int waferID, int hybridID);
66  int getProperHybridIndex(int barrelID, int ladderID, int waferID, int hybridID);
67  int getBarrel(int index);
68  int getLayer(int index);
69  int getLadder(int index);
70  int getWafer(int index);
71  int getHybrid(int index);
72 
73  const char* getConfiguration(); // Returns the SVT configuration
74 
75 protected:
76  int mNumberOfBarrels; // Number of Barrels
77  int mNumberOfLadders[MAX_NUMBER_OF_BARRELS]; // Number of Ladders of each Barrel
78  int mNumberOfWafers[MAX_NUMBER_OF_BARRELS]; // Number of Wafers of each Ladder (Barrel dependent)
79  int mNumberOfHybrids; // Number of Hybrids of each Wafer
80 
81  int mTotalNumberOfHybrids; // Total Number of Hybrids (entire SVT)
82 
83  int mNumberOfAnodes; // Number of Anodes in one hybrid
84  int mNumberOfTimeBins; // Number of Time Bins in one hybrid
85 
86  TString mConfig; // SVT Configuration
87 
88  ClassDef(StSvtConfig,1)
89 };
90 
91 #endif