|
std::vector< unsigned int > | dacs () |
|
std::string | mode () |
|
| PixelFEDTestDAC (std::string filename) |
|
| PixelFEDTestDAC (std::vector< std::vector< std::string > > &) |
|
virtual void | writeXML (std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const |
|
virtual void | writeXMLHeader (pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const |
|
virtual void | writeXMLTrailer (std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const |
|
virtual std::string | mode () const |
|
| PixelCalibBase () |
|
virtual void | writeXMLHeader (pos::PixelConfigKey &key, int version, std::string path, std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const |
|
virtual | ~PixelCalibBase () |
|
This class implements..
A longer explanation will be placed here later
Definition at line 29 of file PixelFEDTestDAC.h.
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 assert(), EnergyCorrector::c, ecal_dqm_sourceclient-live_cfg::cerr, RecoTauCleanerPlugins::charge, column, gather_cfg::cout, groupFilesInBlocks::fin, i, geometryCSVtoXML::line, gen::n, hltrates_dqm_sourceclient-live_cfg::offset, dqm_diff::start, and AlCaHLTBitMon_QueryRunRegistry::string.
15 std::string mthn =
"[PixelFEDTestDAC::PixelFEDTestDAC()]\t\t\t " ;
16 const unsigned long int UB=200;
17 const unsigned long int B=500;
18 const unsigned long int offset=0;
19 vector <unsigned int> pulseTrain(256), pixelDCol(1), pixelPxl(2), pixelTBMHeader(3), pixelTBMTrailer(3);
20 unsigned int DCol, LorR,
start=15;
23 unsigned long int npos=std::string::npos;
26 std::map<std::string , int > colM;
27 std::vector<std::string > colNames;
42 colNames.push_back(
"CONFIG_KEY" );
43 colNames.push_back(
"KEY_TYPE" );
44 colNames.push_back(
"KEY_ALIAS" );
45 colNames.push_back(
"VERSION" );
46 colNames.push_back(
"KIND_OF_COND" );
47 colNames.push_back(
"CALIB_TYPE" );
48 colNames.push_back(
"CALIB_OBJ_DATA_FILE");
49 colNames.push_back(
"CALIB_OBJ_DATA_CLOB");
51 for(
unsigned int c = 0 ;
c < tableMat[0].size() ;
c++)
53 for(
unsigned int n=0;
n<colNames.size();
n++)
55 if(tableMat[0][
c] == colNames[
n])
57 colM[colNames[
n]] =
c;
62 for(
unsigned int n=0;
n<colNames.size();
n++)
64 if(colM.find(colNames[
n]) == colM.end())
66 std::cerr << __LINE__ <<
"]\t" << mthn <<
"Couldn't find in the database the column with name " << colNames[
n] << std::endl;
72 std::istringstream
fin ;
73 fin.str(tableMat[1][colM[
"CALIB_OBJ_DATA_CLOB"]]) ;
76 for (
unsigned int i=0;i<pulseTrain.size();++
i)
78 pulseTrain[
i]=offset+
B;
86 mode_==
"FEDBaselineWithTestDACs"||
87 mode_==
"FEDAddressLevelWithTestDACs");
93 if (line.find(
"TBMHeader")!=npos)
95 loc1=line.find(
"(");
if (loc1==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"'(' not found after TBMHeader.\n";
break;}
96 loc2=line.find(
")", loc1+1);
if (loc2==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"')' not found after TBMHeader.\n";
break;}
97 int TBMHeader=atoi(line.substr(loc1+1,loc2-loc1-1).c_str());
100 pulseTrain[
i]=UB;++
i;
101 pulseTrain[
i]=UB;++
i;
111 else if (line.find(
"ROCHeader")!=std::string::npos)
113 loc1=line.find(
"(");
if (loc1==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"'(' not found after ROCHeader.\n";
break;}
114 loc2=line.find(
")", loc1+1);
if (loc2==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"')' not found after ROCHeader.\n";
break;}
115 int LastDAC=atoi(line.substr(loc1+1,loc2-loc1-1).c_str());
119 pulseTrain[
i]=UB;++
i;
123 else if (line.find(
"PixelHit")!=std::string::npos) {
125 loc1=line.find(
"(");
if (loc1==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"'(' not found after PixelHit.\n";
break;}
126 loc2=line.find(
",", loc1+1);
if (loc2==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"',' not found after the first argument of PixelHit.\n";
break;}
127 loc3=line.find(
",", loc2+1);
if (loc3==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"'.' not found after the second argument of PixelHit.\n";
break;}
128 loc4=line.find(
")", loc3+1);
if (loc4==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"')' not found after the third argument of PixelHit.\n";
break;}
129 int column=atoi(line.substr(loc1+1, loc2-loc1-1).c_str());
130 int row=atoi(line.substr(loc2+1, loc3-loc2-1).c_str());
131 int charge=atoi(line.substr(loc3+1, loc4-loc3-1).c_str());
134 LorR=int(column-DCol*2);
138 std::cout<<
"Pxl = "<<pixelPxl[2]<<pixelPxl[1]<<pixelPxl[0]<<
", DCol= "<<pixelDCol[1]<<pixelDCol[0]<<std::endl;
148 else if (line.find(
"TBMTrailer")!=std::string::npos)
150 loc1=line.find(
"(");
if (loc1==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"'(' not found after TBMTrailer.\n";
break;}
151 loc2=line.find(
")", loc1+1);
if (loc2==npos) {
cout<< __LINE__ <<
"]\t" << mthn <<
"')' not found after TBMTrailer.\n";
break;}
152 int TBMTrailer=atoi(line.substr(loc1+1,loc2-loc1-1).c_str());
154 pulseTrain[
i]=UB;++
i;
155 pulseTrain[
i]=UB;++
i;
156 pulseTrain[
i]=
B; ++
i;
157 pulseTrain[
i]=
B; ++
i;
tuple start
Check for commandline option errors.
std::vector< unsigned int > dacs_
unsigned int levelEncoder(int level)
std::vector< unsigned int > decimalToBaseX(unsigned int a, unsigned int x, unsigned int length)