This is the documentation about PixelLowVoltageMap...
More...
#include <PixelLowVoltageMap.h>
|
std::string | dpNameIana (const PixelModuleName &module) const |
|
std::string | dpNameIdigi (const PixelModuleName &module) const |
|
std::set< unsigned int > | getFEDs (PixelNameTranslation *translation) const |
|
std::map< unsigned int,
std::set< unsigned int > > | getFEDsAndChannels (PixelNameTranslation *translation) const |
|
| PixelLowVoltageMap (std::vector< std::vector< std::string > > &tableMat) |
|
| PixelLowVoltageMap (std::string filename) |
|
void | writeASCII (std::string dir="") const |
|
void | writeXML (pos::PixelConfigKey key, int version, std::string path) const |
|
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 |
|
std::string | creator () |
|
std::string | date () |
|
std::string | description () |
|
std::string | getAuthor () const |
|
std::string | getComment () const |
|
| PixelConfigBase (std::string description, std::string creator, std::string date) |
|
void | setAuthor (std::string author) |
|
void | setComment (std::string comment) |
|
virtual void | writeXML (std::ofstream *out) const |
|
virtual void | writeXMLHeader (pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const |
|
virtual void | writeXMLTrailer (std::ofstream *out) const |
|
virtual | ~PixelConfigBase () |
|
This is the documentation about PixelLowVoltageMap...
" "
A longer explanation will be placed here later
Definition at line 31 of file PixelLowVoltageMap.h.
PixelLowVoltageMap::PixelLowVoltageMap |
( |
std::vector< std::vector< std::string > > & |
tableMat | ) |
|
Definition at line 22 of file PixelLowVoltageMap.cc.
References trackerHits::c, dtNoiseDBValidation_cfg::cerr, dpNameMap_, python.rootplot.argparse::module, n, and alignCSCRings::r.
24 std::string mthn =
"[PixelLowVoltageMap::PixelLowVoltageMap()] " ;
25 std::map<std::string , int > colM;
26 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(
"PANEL_NAME" );
48 colNames.push_back(
"DATAPOINT" );
49 colNames.push_back(
"LV_DIGITAL" );
50 colNames.push_back(
"LV_ANALOG" );
64 for(
unsigned int c = 0 ;
c < tableMat[0].size() ;
c++)
66 for(
unsigned int n=0;
n<colNames.size();
n++)
68 if(tableMat[0][
c] == colNames[
n])
70 colM[colNames[
n]] =
c;
75 for(
unsigned int n=0;
n<colNames.size();
n++)
77 if(colM.find(colNames[
n]) == colM.end())
79 std::cerr << mthn <<
"Couldn't find in the database the column with name " << colNames[
n] << std::endl;
84 std::string modulename ;
85 std::string dpNameBase ;
86 std::string ianaChannel ;
87 std::string idigiChannel ;
88 for(
unsigned int r = 1 ;
r < tableMat.size() ;
r++)
90 modulename = tableMat[
r][colM[
"PANEL_NAME"]] ;
91 dpNameBase = tableMat[
r][colM[
"DATAPOINT"]] ;
92 ianaChannel = tableMat[
r][colM[
"LV_ANALOG"]] ;
93 idigiChannel= tableMat[
r][colM[
"LV_DIGITAL"]] ;
95 pair<string, string> channels(ianaChannel,idigiChannel);
96 pair<string, pair<string,string> > dpName(dpNameBase,channels);
std::map< PixelModuleName, std::pair< std::string, std::pair< std::string, std::string > > > dpNameMap_
PixelConfigBase(std::string description, std::string creator, std::string date)
PixelLowVoltageMap::PixelLowVoltageMap |
( |
std::string |
filename | ) |
|
Definition at line 103 of file PixelLowVoltageMap.cc.
References gather_cfg::cout, dpNameMap_, recoMuon::in, and python.rootplot.argparse::module.
106 std::string mthn =
"[PixelLowVoltageMap::PixelLowVoltageMap()]\t\t\t " ;
113 std::cout << __LINE__ <<
"]\t" << mthn <<
"Could not open: " <<
filename << std::endl;
114 throw std::runtime_error(
"Failed to open file "+
filename);
121 std::cout << __LINE__ <<
"]\t" << mthn <<
"eof before reading anything!" << std::endl;
122 throw std::runtime_error(
"Failure when reading file; file seems to be empty: "+
filename);
128 std::string modulename;
129 std::string dpNameBase;
130 std::string ianaChannel;
131 std::string idigiChannel;
133 in >> modulename >> dpNameBase >> ianaChannel >> idigiChannel;
136 cout << __LINE__ <<
"]\t" << mthn <<
"Read modulename: " << modulename << endl;
138 pair<string, string> channels(ianaChannel,idigiChannel);
139 pair<string, pair<string,string> > dpName(dpNameBase,channels);
141 in >> modulename >> dpNameBase >> ianaChannel >> idigiChannel;
std::map< PixelModuleName, std::pair< std::string, std::pair< std::string, std::string > > > dpNameMap_
PixelConfigBase(std::string description, std::string creator, std::string date)
std::string PixelLowVoltageMap::dpNameIana |
( |
const PixelModuleName & |
module | ) |
const |
Definition at line 150 of file PixelLowVoltageMap.cc.
References gather_cfg::cout, dpNameMap_, and i.
152 std::string mthn =
"[PixelLowVoltageMap::dpNameIana()]\t\t\t " ;
153 std::map<PixelModuleName, pair< string, pair<string, string> > >::const_iterator
i=
157 cout << __LINE__ <<
"]\t" << mthn <<
"Could not find module: " << module << endl;
160 return i->second.first+
"/"+i->second.second.first;
std::map< PixelModuleName, std::pair< std::string, std::pair< std::string, std::string > > > dpNameMap_
std::string PixelLowVoltageMap::dpNameIdigi |
( |
const PixelModuleName & |
module | ) |
const |
Definition at line 164 of file PixelLowVoltageMap.cc.
References gather_cfg::cout, dpNameMap_, and i.
166 std::string mthn =
"[PixelLowVoltageMap::dpNameIdigi()]\t\t\t " ;
167 std::map<PixelModuleName, pair< string, pair<string, string> > >::const_iterator
i=
171 cout << __LINE__ <<
"]\t" << mthn <<
"Could not find module: " << module << endl;
174 return i->second.first+
"/"+i->second.second.second;
std::map< PixelModuleName, std::pair< std::string, std::pair< std::string, std::string > > > dpNameMap_
std::map<unsigned int, std::set<unsigned int> > pos::PixelLowVoltageMap::getFEDsAndChannels |
( |
PixelNameTranslation * |
translation | ) |
const |
void PixelLowVoltageMap::writeASCII |
( |
std::string |
dir = "" | ) |
const |
|
virtual |
Implements pos::PixelConfigBase.
Definition at line 179 of file PixelLowVoltageMap.cc.
References gather_cfg::cout, dpNameMap_, cmsRelvalreport::exit, lut2db_cfg::filename, and dbtoconf::out.
181 std::string mthn =
"[PixelLowVoltageMap::writeASCII()]\t\t\t " ;
187 std::cout << __LINE__ <<
"]\t" << mthn <<
"Could not open file " << filename <<
" for write" << std::endl ;
190 std::map<PixelModuleName, pair< string, pair<string, string> > >::const_iterator imodule=
194 out << imodule->first
195 <<
" "<< imodule->second.first
196 <<
" "<< imodule->second.second.first
197 <<
" "<< imodule->second.second.second
std::map< PixelModuleName, std::pair< std::string, std::pair< std::string, std::string > > > dpNameMap_
void pos::PixelLowVoltageMap::writeXML |
( |
pos::PixelConfigKey |
key, |
|
|
int |
version, |
|
|
std::string |
path |
|
) |
| const |
|
inlinevirtual |
void PixelLowVoltageMap::writeXML |
( |
std::ofstream * |
out, |
|
|
std::ofstream * |
out1 = NULL , |
|
|
std::ofstream * |
out2 = NULL |
|
) |
| const |
|
virtual |
Reimplemented from pos::PixelConfigBase.
Definition at line 252 of file PixelLowVoltageMap.cc.
References dpNameMap_.
256 std::string mthn =
"[PixelLowVoltageMap::writeXML()]\t\t\t " ;
258 std::map<PixelModuleName, pair< string, pair<string, string> > >::const_iterator imodule=
dpNameMap_.begin();
261 *outstream <<
" <DATA>" << std::endl ;
262 *outstream <<
" <PANEL_NAME>" << imodule->first <<
"</PANEL_NAME>" << std::endl ;
263 *outstream <<
" <DATAPOINT>" << imodule->second.first <<
"</DATAPOINT>" << std::endl ;
264 *outstream <<
" <LV_DIGITAL>" << imodule->second.second.first <<
"</LV_DIGITAL>" << std::endl ;
265 *outstream <<
" <LV_ANALOG>" << imodule->second.second.second <<
"</LV_ANALOG>" << std::endl ;
266 *outstream <<
" </DATA>" << std::endl ;
267 *outstream <<
"" << std::endl ;
std::map< PixelModuleName, std::pair< std::string, std::pair< std::string, std::string > > > dpNameMap_
void PixelLowVoltageMap::writeXMLHeader |
( |
pos::PixelConfigKey |
key, |
|
|
int |
version, |
|
|
std::string |
path, |
|
|
std::ofstream * |
out, |
|
|
std::ofstream * |
out1 = NULL , |
|
|
std::ofstream * |
out2 = NULL |
|
) |
| const |
|
virtual |
Reimplemented from pos::PixelConfigBase.
Definition at line 206 of file PixelLowVoltageMap.cc.
References gather_cfg::cout, pos::PixelConfigBase::getAuthor(), pos::PixelConfigBase::getComment(), pos::PixelTimeFormatter::getmSecTime(), and pos::PixelTimeFormatter::getTime().
213 std::string mthn =
"[PixelLowVoltageMap::writeXMLHeader()]\t\t\t " ;
214 std::stringstream maskFullPath ;
217 std::cout << __LINE__ <<
"]\t" << mthn <<
"Writing to: " << maskFullPath.str() << std::endl ;
219 outstream->open(maskFullPath.str().c_str()) ;
221 *outstream <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << std::endl ;
222 *outstream <<
"<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" << std::endl ;
223 *outstream <<
"" << std::endl ;
224 *outstream <<
" <HEADER>" << std::endl ;
225 *outstream <<
" <TYPE>" << std::endl ;
226 *outstream <<
" <EXTENSION_TABLE_NAME>XDAQ_LOW_VOLTAGE_MAP</EXTENSION_TABLE_NAME>" << std::endl ;
227 *outstream <<
" <NAME>XDAQ Low Voltage Map</NAME>" << std::endl ;
228 *outstream <<
" </TYPE>" << std::endl ;
229 *outstream <<
" <RUN>" << std::endl ;
230 *outstream <<
" <RUN_TYPE>XDAQ Low Voltage Map</RUN_TYPE>" << std::endl ;
231 *outstream <<
" <RUN_NUMBER>1</RUN_NUMBER>" << std::endl ;
233 *outstream <<
" <LOCATION>CERN P5</LOCATION>" << std::endl ;
234 *outstream <<
" </RUN>" << std::endl ;
235 *outstream <<
" </HEADER>" << std::endl ;
236 *outstream <<
"" << std::endl ;
237 *outstream <<
" <DATA_SET>" << std::endl ;
238 *outstream <<
"" << std::endl ;
239 *outstream <<
" <VERSION>" <<
version <<
"</VERSION>" << std::endl ;
240 *outstream <<
" <COMMENT_DESCRIPTION>" <<
getComment() <<
"</COMMENT_DESCRIPTION>" << std::endl ;
241 *outstream <<
" <CREATED_BY_USER>" <<
getAuthor() <<
"</CREATED_BY_USER>" << std::endl ;
242 *outstream <<
"" << std::endl ;
243 *outstream <<
" <PART>" << std::endl ;
244 *outstream <<
" <NAME_LABEL>CMS-PIXEL-ROOT</NAME_LABEL>" << std::endl ;
245 *outstream <<
" <KIND_OF_PART>Detector ROOT</KIND_OF_PART>" << std::endl ;
246 *outstream <<
" </PART>" << std::endl ;
247 *outstream <<
" " << std::endl ;
std::string getComment() const
std::string getAuthor() const
void PixelLowVoltageMap::writeXMLTrailer |
( |
std::ofstream * |
out, |
|
|
std::ofstream * |
out1 = NULL , |
|
|
std::ofstream * |
out2 = NULL |
|
) |
| const |
|
virtual |
Reimplemented from pos::PixelConfigBase.
Definition at line 272 of file PixelLowVoltageMap.cc.
References gather_cfg::cout.
276 std::string mthn =
"[PixelLowVoltageMap::writeXMLTrailer()]\t\t\t " ;
278 *outstream <<
" </DATA_SET>" << std::endl ;
279 *outstream <<
"</ROOT>" << std::endl ;
282 std::cout << __LINE__ <<
"]\t" << mthn <<
"Data written " << std::endl ;
std::map<PixelModuleName, std::pair<std::string, std::pair<std::string, std::string> > > pos::PixelLowVoltageMap::dpNameMap_ |
|
private |