StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSstConfig.hh
1 //$Id: StSstConfig.hh,v 1.2 2015/06/24 17:37:21 smirnovd Exp $
2 //
3 //$Log: StSstConfig.hh,v $
4 //Revision 1.2 2015/06/24 17:37:21 smirnovd
5 //StSstUtil: Prepend included headers with path to submodule
6 //
7 //Revision 1.1 2015/06/23 16:26:19 jeromel
8 //First version created from the SSD code and reshaped
9 //
10 //Revision 1.1 2015/04/19 17:30:31 bouchet
11 //initial commit ; SST codes
12 //
13 
14 //fork from the SSD code, move along - see history therein
15 
16 #ifndef STSSTCONFIG_HH
17 #define STSSTCONFIG_HH
18 
19 #define MaxNumberOfLadders 20
20 
21 #include "St_base/StObject.h"
22 #include "TString.h"
23 
24 class ssdConfiguration_st;
25 
26 class StSstConfig: public StObject
27 {
28  private:
29  StSstConfig(const StSstConfig&);
30  StSstConfig& operator = (const StSstConfig&);
31 public:
32  StSstConfig();
33  virtual ~StSstConfig();
34 
35 
36  int getNumberOfLadders() {return mNumberOfLadders;}
37  int getNumberOfWafers() {return mNumberOfWafers;}
38  int getNumberOfHybrids() {return mNumberOfHybrids;}
39  int getTotalNumberOfLadders() {return mTotalNumberOfLadders;}
40  int getTotalNumberOfHybrids() {return mTotalNumberOfHybrids;}
41  int getNumberOfStrips() {return mNumberOfStrips;}
42 
43  void setNumberOfLadders(int ladders){mNumberOfLadders = ladders;}
44  void setNumberOfWafers(int wafers) {mNumberOfWafers = wafers;}
45  void setNumberOfHybrids(int hybrids) {mNumberOfHybrids = hybrids;}
46  void setTotalNumberOfHybrids(int hybrids) {mTotalNumberOfHybrids = hybrids;}
47  void setTotalNumberOfLadders(int totladders) {mTotalNumberOfLadders = totladders;}
48  void setNumberOfStrips(int strips) {mNumberOfStrips = strips;}
49 
50  void setConfiguration(); // set the SSD configuration
51  void setConfiguration(const char* config); // set the SSD configuration
52 
53  void setLadderIsActive(int ladder, int status){mStatus[ladder-1] = status;}
54  int getLadderIsActive(int ladder){return mStatus[ladder-1];}
55 
56  const char* getConfiguration(); // Returns the SSD configuration
57 
58 protected:
59  int mStatus[MaxNumberOfLadders];
60  int totLadderPresent; // Number of Present Ladders //////////// A MODIFIER PLUS TARD
61  int mNumberOfLadders; // Number of Present Ladders
62  int mNumberOfWafers; // Number of Wafers of each Ladder (Barrel dependent)
63  int mNumberOfHybrids; // Number of Hybrids of each Wafer
64  int mTotalNumberOfLadders; // Total Number of Ladders (entire SSD)
65  int mTotalNumberOfHybrids; // Total Number of Hybrids (entire SSD)
66 
67  int mNumberOfStrips; // Number of Strips in one hybrid
68 
69  TString mConfig; // SSD Configuration
70 
71  ClassDef(StSstConfig,1)
72 };
73 
74 #endif