16 #include "StSstConfig.hh"
17 #include "StMessMgr.h"
19 #include "tables/St_ssdConfiguration_Table.h"
24 :totLadderPresent(-1956)
25 ,mNumberOfLadders(-1956)
26 ,mNumberOfWafers(-1956)
27 ,mNumberOfHybrids(-1956)
28 ,mTotalNumberOfLadders(-1956)
29 ,mTotalNumberOfHybrids(-1956)
30 ,mNumberOfStrips(-1956)
32 { memset(mStatus,-1,
sizeof(mStatus)); }
34 StSstConfig::~StSstConfig()
38 totLadderPresent = geom.mNumberOfLadders;
39 mNumberOfLadders = geom.mNumberOfLadders;
40 mNumberOfWafers = geom.mNumberOfWafers;
41 mNumberOfHybrids = geom.mNumberOfHybrids;
42 mNumberOfStrips = geom.mNumberOfStrips;
43 mTotalNumberOfLadders = geom.mTotalNumberOfLadders;
44 mTotalNumberOfHybrids = geom.mTotalNumberOfHybrids;
52 void StSstConfig::setConfiguration()
54 if ((totLadderPresent == 1))
55 mConfig = TString(
"LAD0");
56 else if (totLadderPresent == 10)
57 mConfig = TString(
"HALF");
58 else if (totLadderPresent == 20)
59 mConfig = TString(
"FULL");
61 mConfig = TString(
"NULL");
64 void StSstConfig::setConfiguration(
const char* config)
68 mConfig = TString(config);
70 if ( !strncmp(config,
"HALF", strlen(
"HALF")) ) {
71 setNumberOfLadders(10);
72 setNumberOfWafers(160);
73 setNumberOfHybrids(2);
74 setTotalNumberOfHybrids(320);
75 }
else if ( !strncmp(config,
"FULL", strlen(
"FULL")) ) {
76 setNumberOfLadders(20);
77 setNumberOfWafers(320);
78 setNumberOfHybrids(2);
79 setTotalNumberOfHybrids(640);
81 LOG_ERROR <<
"Configuration of SSD not defined! It must be LAD0 or HALF or FULL "<< endm;
85 const char* StSstConfig::getConfiguration()
87 return mConfig.Data();