This class implements..
A longer explanation will be placed here later
Definition at line 29 of file PixelFEDTestDAC.h.
PixelFEDTestDAC::PixelFEDTestDAC |
( |
std::string |
filename | ) |
|
Definition at line 218 of file PixelFEDTestDAC.cc.
References cms::cuda::assert(), B, ALCARECOTkAlJpsiMuMu_cff::charge, gather_cfg::cout, corrVsCorr::filename, groupFilesInBlocks::fin, mps_fire::i, createfilelist::int, mps_splice::line, HLT_IsoTrack_cff::offset, isotrackNtupler::start, and AlCaHLTBitMon_QueryRunRegistry::string.
219 std::string mthn =
"[PixelFEDTestDAC::PixelFEDTestDAC()]\t\t\t\t ";
220 const unsigned long int UB = 200;
221 const unsigned long int B = 500;
222 const unsigned long int offset = 0;
223 vector<unsigned int> pulseTrain(256), pixelDCol(1), pixelPxl(2), pixelTBMHeader(3), pixelTBMTrailer(3);
224 unsigned int DCol, LorR,
start = 15;
227 unsigned long int npos = std::string::npos;
231 for (
unsigned int i = 0;
i < pulseTrain.size(); ++
i) {
241 assert(
mode_ ==
"EmulatedPhysics" ||
mode_ ==
"FEDBaselineWithTestDACs" ||
mode_ ==
"FEDAddressLevelWithTestDACs");
246 if (
line.find(
"TBMHeader") != npos) {
247 loc1 =
line.find(
'(');
249 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after TBMHeader.\n";
252 loc2 =
line.find(
')', loc1 + 1);
254 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after TBMHeader.\n";
257 int TBMHeader = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
278 }
else if (
line.find(
"ROCHeader") != std::string::npos) {
279 loc1 =
line.find(
'(');
281 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after ROCHeader.\n";
284 loc2 =
line.find(
')', loc1 + 1);
286 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after ROCHeader.\n";
289 int LastDAC = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
291 std::cout <<
"--------------" << std::endl;
299 }
else if (
line.find(
"PixelHit") != std::string::npos) {
300 loc1 =
line.find(
'(');
302 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after PixelHit.\n";
305 loc2 =
line.find(
',', loc1 + 1);
307 cout << __LINE__ <<
"]\t" << mthn <<
"',' not found after the first argument of PixelHit.\n";
310 loc3 =
line.find(
',', loc2 + 1);
312 cout << __LINE__ <<
"]\t" << mthn <<
"'.' not found after the second argument of PixelHit.\n";
315 loc4 =
line.find(
')', loc3 + 1);
317 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after the third argument of PixelHit.\n";
320 int column = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
321 int row = atoi(
line.substr(loc2 + 1, loc3 - loc2 - 1).c_str());
322 int charge = atoi(
line.substr(loc3 + 1, loc4 - loc3 - 1).c_str());
324 DCol =
int(column / 2);
325 LorR =
int(column - DCol * 2);
329 std::cout <<
"Pxl = " << pixelPxl[2] << pixelPxl[1] << pixelPxl[0] <<
", DCol= " << pixelDCol[1] << pixelDCol[0]
345 }
else if (
line.find(
"TBMTrailer") != std::string::npos) {
346 loc1 =
line.find(
'(');
348 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after TBMTrailer.\n";
351 loc2 =
line.find(
')', loc1 + 1);
353 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after TBMTrailer.\n";
356 int TBMTrailer = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
std::vector< unsigned int > dacs_
unsigned int levelEncoder(int level)
std::vector< unsigned int > decimalToBaseX(unsigned int a, unsigned int x, unsigned int length)
PixelFEDTestDAC::PixelFEDTestDAC |
( |
std::vector< std::vector< std::string > > & |
tableMat | ) |
|
EXTENSION_TABLE_NAME: PIXEL_CALIB_CLOB (VIEW: CONF_KEY_PIXEL_CALIB_V)
CONFIG_KEY NOT NULL VARCHAR2(80) KEY_TYPE NOT NULL VARCHAR2(80) KEY_ALIAS NOT NULL VARCHAR2(80) VERSION VARCHAR2(40) KIND_OF_COND NOT NULL VARCHAR2(40) CALIB_TYPE VARCHAR2(200) CALIB_OBJ_DATA_FILE NOT NULL VARCHAR2(200) CALIB_OBJ_DATA_CLOB NOT NULL CLOB
Definition at line 12 of file PixelFEDTestDAC.cc.
References cms::cuda::assert(), B, DummyCfis::c, DMR_cfg::cerr, ALCARECOTkAlJpsiMuMu_cff::charge, gather_cfg::cout, groupFilesInBlocks::fin, mps_fire::i, createfilelist::int, mps_splice::line, create_idmaps::n, HLT_IsoTrack_cff::offset, isotrackNtupler::start, and AlCaHLTBitMon_QueryRunRegistry::string.
13 std::string mthn =
"[PixelFEDTestDAC::PixelFEDTestDAC()]\t\t\t ";
14 const unsigned long int UB = 200;
15 const unsigned long int B = 500;
16 const unsigned long int offset = 0;
17 vector<unsigned int> pulseTrain(256), pixelDCol(1), pixelPxl(2), pixelTBMHeader(3), pixelTBMTrailer(3);
18 unsigned int DCol, LorR,
start = 15;
21 unsigned long int npos = std::string::npos;
24 std::map<std::string, int> colM;
25 std::vector<std::string> colNames;
40 colNames.push_back(
"CONFIG_KEY");
41 colNames.push_back(
"KEY_TYPE");
42 colNames.push_back(
"KEY_ALIAS");
43 colNames.push_back(
"VERSION");
44 colNames.push_back(
"KIND_OF_COND");
45 colNames.push_back(
"CALIB_TYPE");
46 colNames.push_back(
"CALIB_OBJ_DATA_FILE");
47 colNames.push_back(
"CALIB_OBJ_DATA_CLOB");
49 for (
unsigned int c = 0;
c < tableMat[0].size();
c++) {
50 for (
unsigned int n = 0;
n < colNames.size();
n++) {
51 if (tableMat[0][
c] == colNames[
n]) {
52 colM[colNames[
n]] =
c;
57 for (
unsigned int n = 0;
n < colNames.size();
n++) {
58 if (colM.find(colNames[
n]) == colM.end()) {
59 std::cerr << __LINE__ <<
"]\t" << mthn <<
"Couldn't find in the database the column with name " << colNames[
n]
65 std::istringstream
fin;
66 fin.str(tableMat[1][colM[
"CALIB_OBJ_DATA_CLOB"]]);
69 for (
unsigned int i = 0;
i < pulseTrain.size(); ++
i) {
77 assert(
mode_ ==
"EmulatedPhysics" ||
mode_ ==
"FEDBaselineWithTestDACs" ||
mode_ ==
"FEDAddressLevelWithTestDACs");
82 if (
line.find(
"TBMHeader") != npos) {
83 loc1 =
line.find(
'(');
85 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after TBMHeader.\n";
88 loc2 =
line.find(
')', loc1 + 1);
90 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after TBMHeader.\n";
93 int TBMHeader = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
114 }
else if (
line.find(
"ROCHeader") != std::string::npos) {
115 loc1 =
line.find(
'(');
117 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after ROCHeader.\n";
120 loc2 =
line.find(
')', loc1 + 1);
122 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after ROCHeader.\n";
125 int LastDAC = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
127 std::cout <<
"--------------" << std::endl;
135 }
else if (
line.find(
"PixelHit") != std::string::npos) {
136 loc1 =
line.find(
'(');
138 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after PixelHit.\n";
141 loc2 =
line.find(
',', loc1 + 1);
143 cout << __LINE__ <<
"]\t" << mthn <<
"',' not found after the first argument of PixelHit.\n";
146 loc3 =
line.find(
',', loc2 + 1);
148 cout << __LINE__ <<
"]\t" << mthn <<
"'.' not found after the second argument of PixelHit.\n";
151 loc4 =
line.find(
')', loc3 + 1);
153 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after the third argument of PixelHit.\n";
156 int column = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
157 int row = atoi(
line.substr(loc2 + 1, loc3 - loc2 - 1).c_str());
158 int charge = atoi(
line.substr(loc3 + 1, loc4 - loc3 - 1).c_str());
160 DCol =
int(column / 2);
161 LorR =
int(column - DCol * 2);
165 std::cout <<
"Pxl = " << pixelPxl[2] << pixelPxl[1] << pixelPxl[0] <<
", DCol= " << pixelDCol[1] << pixelDCol[0]
181 }
else if (
line.find(
"TBMTrailer") != std::string::npos) {
182 loc1 =
line.find(
'(');
184 cout << __LINE__ <<
"]\t" << mthn <<
"'(' not found after TBMTrailer.\n";
187 loc2 =
line.find(
')', loc1 + 1);
189 cout << __LINE__ <<
"]\t" << mthn <<
"')' not found after TBMTrailer.\n";
192 int TBMTrailer = atoi(
line.substr(loc1 + 1, loc2 - loc1 - 1).c_str());
std::vector< unsigned int > dacs_
unsigned int levelEncoder(int level)
std::vector< unsigned int > decimalToBaseX(unsigned int a, unsigned int x, unsigned int length)