#include <PixelTTCciConfig.h>
Public Member Functions | |
std::stringstream & | getTTCConfigStream () |
PixelTTCciConfig (std::vector< std::vector< std::string > > &) | |
PixelTTCciConfig (std::string filename) | |
virtual void | writeASCII (std::string dir) const |
virtual 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 |
Private Attributes | |
std::stringstream | ttcConfigStream_ |
Definition at line 19 of file PixelTTCciConfig.h.
PixelTTCciConfig::PixelTTCciConfig | ( | std::string | filename | ) |
Definition at line 63 of file PixelTTCciConfig.cc.
References gather_cfg::cout, recoMuon::in, geometryCSVtoXML::line, and ttcConfigStream_.
: PixelConfigBase(" "," "," "){ std::string mthn ="]\t[PixelTKFECConfig::PixelTKFECConfig()]\t\t\t " ; std::ifstream in(filename.c_str()); if (!in.good()){ std::cout << __LINE__ << mthn << "Could not open: " << filename << std::endl; throw std::runtime_error("Failed to open file "+filename); } else { std::cout << __LINE__ << mthn << "Opened : " << filename << std::endl; } //ttcConfigPath_ = filename; string line; while (!in.eof()) { getline (in,line); ttcConfigStream_ << line << endl; } }
pos::PixelTTCciConfig::PixelTTCciConfig | ( | std::vector< std::vector< std::string > > & | ) |
std::stringstream& pos::PixelTTCciConfig::getTTCConfigStream | ( | ) | [inline] |
Definition at line 26 of file PixelTTCciConfig.h.
References ttcConfigStream_.
{return ttcConfigStream_;}
void PixelTTCciConfig::writeASCII | ( | std::string | dir | ) | const [virtual] |
Implements pos::PixelConfigBase.
Definition at line 303 of file PixelROCDACSettings.cc.
References pos::k_DACName_CalDel, pos::k_DACName_ChipContReg, pos::k_DACName_TempRange, pos::k_DACName_Vana, pos::k_DACName_VbiasOp, pos::k_DACName_Vcal, pos::k_DACName_Vcomp, pos::k_DACName_VcThr, pos::k_DACName_Vdd, pos::k_DACName_VHldDel, pos::k_DACName_VIbias_bus, pos::k_DACName_VIbias_DAC, pos::k_DACName_VIbias_PH, pos::k_DACName_VIbias_roc, pos::k_DACName_VIbias_sf, pos::k_DACName_VIColOr, pos::k_DACName_VIon, pos::k_DACName_Vleak, pos::k_DACName_Vnpix, pos::k_DACName_VOffsetOp, pos::k_DACName_VOffsetRO, pos::k_DACName_VrgPr, pos::k_DACName_VrgSh, pos::k_DACName_Vsf, pos::k_DACName_VsumCol, pos::k_DACName_Vtrim, pos::k_DACName_VwllPr, pos::k_DACName_VwllSh, and pos::k_DACName_WBC.
Referenced by writeXMLHeader().
{ out << "ROC: " << rocid_.rocname() <<endl; out << k_DACName_Vdd << ": " << (int)Vdd_ <<endl; out << k_DACName_Vana << ": " << (int)Vana_ <<endl; out << k_DACName_Vsf << ": " << (int)Vsf_ <<endl; out << k_DACName_Vcomp << ": " << (int)Vcomp_ <<endl; out << k_DACName_Vleak << ": " << (int)Vleak_ <<endl; out << k_DACName_VrgPr << ": " << (int)VrgPr_ <<endl; out << k_DACName_VwllPr << ": " << (int)VwllPr_ <<endl; out << k_DACName_VrgSh << ": " << (int)VrgSh_ <<endl; out << k_DACName_VwllSh << ": " << (int)VwllSh_ <<endl; out << k_DACName_VHldDel << ": " << (int)VHldDel_ <<endl; out << k_DACName_Vtrim << ": " << (int)Vtrim_ <<endl; out << k_DACName_VcThr << ": " << (int)VcThr_ <<endl; out << k_DACName_VIbias_bus << ": " << (int)VIbias_bus_ <<endl; out << k_DACName_VIbias_sf << ": " << (int)VIbias_sf_ <<endl; out << k_DACName_VOffsetOp << ": " << (int)VOffsetOp_ <<endl; out << k_DACName_VbiasOp << ": " << (int)VbiasOp_ <<endl; out << k_DACName_VOffsetRO << ": " << (int)VOffsetRO_ <<endl; out << k_DACName_VIon << ": " << (int)VIon_ <<endl; out << k_DACName_VIbias_PH << ": " << (int)VIbias_PH_ <<endl; out << k_DACName_VIbias_DAC << ": " << (int)VIbias_DAC_ <<endl; out << k_DACName_VIbias_roc << ": " << (int)VIbias_roc_ <<endl; out << k_DACName_VIColOr << ": " << (int)VIColOr_ <<endl; out << k_DACName_Vnpix << ": " << (int)Vnpix_ <<endl; out << k_DACName_VsumCol << ": " << (int)VsumCol_ <<endl; out << k_DACName_Vcal << ": " << (int)Vcal_ <<endl; out << k_DACName_CalDel << ": " << (int)CalDel_ <<endl; out << k_DACName_TempRange << ": " << (int)TempRange_ <<endl; out << k_DACName_WBC << ": " << (int)WBC_ <<endl; out << k_DACName_ChipContReg << ": " << (int)ChipContReg_ <<endl; }
void PixelTTCciConfig::writeXML | ( | std::ofstream * | out, |
std::ofstream * | out1 = NULL , |
||
std::ofstream * | out2 = NULL |
||
) | const [virtual] |
Reimplemented from pos::PixelConfigBase.
Definition at line 152 of file PixelTTCciConfig.cc.
{ std::string mthn = "[PixelTTCciConfig::writeXML()]\t\t\t " ; *outstream << " " << std::endl ; *outstream << " <DATA>" << std::endl ; *outstream << " <TTC_OBJ_DATA_FILE>TTCciConfiguration.txt</TTC_OBJ_DATA_FILE>" << std::endl ; *outstream << " </DATA>" << std::endl ; *outstream << " " << std::endl ; }
virtual void pos::PixelTTCciConfig::writeXML | ( | pos::PixelConfigKey | key, |
int | version, | ||
std::string | path | ||
) | const [inline, virtual] |
void PixelTTCciConfig::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 105 of file PixelTTCciConfig.cc.
References gather_cfg::cout, pos::PixelConfigBase::getAuthor(), pos::PixelConfigBase::getComment(), pos::PixelTimeFormatter::getmSecTime(), edm::service::getTime(), and writeASCII().
{ std::string mthn = "[PixelTTCciConfig::writeXMLHeader()]\t\t\t " ; std::stringstream maskFullPath ; writeASCII(path) ; maskFullPath << path << "/Pixel_TtcParameters_" << PixelTimeFormatter::getmSecTime() << ".xml"; std::cout << mthn << "Writing to: " << maskFullPath.str() << std::endl ; outstream->open(maskFullPath.str().c_str()) ; *outstream << "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << std::endl ; *outstream << "<ROOT xmlns:xsi='https://www.w3.org/2001/XMLSchema-instance'>" << std::endl ; *outstream << "" << std::endl ; *outstream << " <HEADER>" << std::endl ; *outstream << " <TYPE>" << std::endl ; *outstream << " <EXTENSION_TABLE_NAME>PIXEL_TTC_PARAMETERS</EXTENSION_TABLE_NAME>" << std::endl ; *outstream << " <NAME>TTC Configuration Parameters</NAME>" << std::endl ; *outstream << " </TYPE>" << std::endl ; *outstream << " <RUN>" << std::endl ; *outstream << " <RUN_TYPE>TTC Configuration Parameters</RUN_TYPE>" << std::endl ; *outstream << " <RUN_NUMBER>1</RUN_NUMBER>" << std::endl ; *outstream << " <RUN_BEGIN_TIMESTAMP>" << PixelTimeFormatter::getTime() << "</RUN_BEGIN_TIMESTAMP>" << std::endl ; *outstream << " <LOCATION>CERN P5</LOCATION>" << std::endl ; *outstream << " </RUN>" << std::endl ; *outstream << " </HEADER>" << std::endl ; *outstream << "" << std::endl ; *outstream << " <DATA_SET>" << std::endl ; *outstream << "" << std::endl ; *outstream << " <VERSION>" << version << "</VERSION>" << std::endl ; *outstream << " <COMMENT_DESCRIPTION>" << getComment() << "</COMMENT_DESCRIPTION>" << std::endl ; *outstream << " <CREATED_BY_USER>" << getAuthor() << "</CREATED_BY_USER>" << std::endl ; *outstream << "" << std::endl ; *outstream << " <PART>" << std::endl ; *outstream << " <NAME_LABEL>CMS-PIXEL-ROOT</NAME_LABEL>" << std::endl ; *outstream << " <KIND_OF_PART>Detector ROOT</KIND_OF_PART>" << std::endl ; *outstream << " </PART>" << std::endl ; }
void PixelTTCciConfig::writeXMLTrailer | ( | std::ofstream * | out, |
std::ofstream * | out1 = NULL , |
||
std::ofstream * | out2 = NULL |
||
) | const [virtual] |
Reimplemented from pos::PixelConfigBase.
Definition at line 166 of file PixelTTCciConfig.cc.
References gather_cfg::cout.
{ std::string mthn = "[PixelTTCciConfig::writeXMLTrailer()]\t\t\t " ; *outstream << " " << std::endl ; *outstream << " </DATA_SET>" << std::endl ; *outstream << "</ROOT>" << std::endl ; outstream->close() ; std::cout << mthn << "Data written " << std::endl ; }
std::stringstream pos::PixelTTCciConfig::ttcConfigStream_ [private] |
Definition at line 48 of file PixelTTCciConfig.h.
Referenced by getTTCConfigStream(), and PixelTTCciConfig().