33 class St_fttHardwareMap;
34 class St_fttDataWindows;
39 StFttDb(
const char *name=
"fttDb");
42 int InitRun(
int runNumber);
44 void SetDebug(
int v=1) {mDebug=v;}
54 uint16_t packKey(
int feb,
int vmm,
int ch )
const;
55 void unpackKey(
int key,
int &feb,
int &vmm,
int &ch )
const;
56 uint16_t packVal(
int row,
int strip )
const;
57 void unpackVal(
int val,
int &row,
int &strip )
const;
58 void loadHardwareMapFromFile( std::string fn );
59 void loadHardwareMapFromDb( St_fttHardwareMap * );
60 void loadDataWindowsFromFile( std::string fn );
61 void loadDataWindowsFromDb( St_fttDataWindows * );
70 static double stripPitch;
71 static double rowLength;
72 static double lowerQuadOffsetX;
73 static double idealPlaneZLocations[4];
75 static const size_t nPlane = 4;
76 static const size_t nQuadPerPlane = 4;
77 static const size_t nFobPerQuad = 6;
78 static const size_t nVMMPerFob = 4;
79 static const size_t nChPerVMM = 64;
81 static const size_t nQuad = nQuadPerPlane * nPlane;
82 static const size_t nRob = nQuad;
84 static const size_t nFobPerPlane = nFobPerQuad * nQuadPerPlane;
85 static const size_t nFob = nFobPerPlane * nPlane;
87 static const size_t nVMMPerQuad = nFobPerQuad * nVMMPerFob;
88 static const size_t nVMMPerPlane = nVMMPerQuad * nQuadPerPlane;
89 static const size_t nVMM = nVMMPerPlane * nPlane;
91 static const size_t nChPerFob = nVMMPerFob * nChPerVMM;
92 static const size_t nChPerQuad = nChPerFob * nFobPerQuad;
93 static const size_t nChPerPlane = nChPerQuad * nQuadPerPlane;
94 static const size_t nCh = nChPerPlane * nPlane;
96 static const size_t maxADC = 1024 + 1;
97 static const size_t maxBCID = 4096 + 1;
98 static const int minTb = -32768 - 1000;
99 static const int maxTb = 32768 + 1000;
101 static const size_t nRowsPerQuad = 5;
102 static const size_t nStripOrientations = 5;
103 static const size_t maxStripPerRow = 166;
105 static vector<string> orientationLabels;
110 UChar_t getOrientation(
int rob,
int feb,
int vmm,
int row )
const;
111 bool hardwareMap(
int rob,
int feb,
int vmm,
int ch,
int &row,
int &strip, UChar_t &orientation )
const;
114 void getGloablOffset( UChar_t plane, UChar_t quad,
float &dx,
float &sx,
float &dy,
float &sy,
float &dz,
float &sz );
117 CalibratedBunchCrossingMode = 0,
121 void setTimeCut(TimeCutMode mode,
int low=-70,
int high=30)
123 mUserDefinedTimeCut =
true;
133 if (mUserDefinedTimeCut)
137 size_t hit_uuid =
uuid( hit );
138 if ( dwMap.count( hit_uuid ) ){
139 mode = dwMap[ hit_uuid ].mode;
140 l = dwMap[ hit_uuid ].min;
141 h = dwMap[ hit_uuid ].max;
151 bool mUserDefinedTimeCut =
false;
152 TimeCutMode mTimeCutMode;
153 int mTimeCutLow, mTimeCutHigh;
155 std :: map< uint16_t , uint16_t > mMap;
156 std :: map< uint16_t , uint16_t > rMap;
158 std :: map< uint16_t , FttDataWindow > dwMap;
void setRun(int run)
enable(1) or disable(0) offline DB access
void setDbAccess(int v=1)
debug level
static size_t uuid(StFttRawHit *h, bool includeStrip=false)
set run#
void setDebug(int v=1)
debug level