CMS 3D CMS Logo

pos::PixelLTCConfig Class Reference
["Configuration Objects"]

This is the documentation about PixelLTCConfig... More...

#include <CalibFormats/SiPixelObjects/interface/PixelLTCConfig.h>

Inheritance diagram for pos::PixelLTCConfig:

pos::PixelConfigBase

List of all members.

Public Member Functions

std::stringstream & getLTCConfigStream ()
 PixelLTCConfig (std::string filename)
virtual void writeASCII (std::string dir) const
virtual void writeXML (std::ofstream *out) const
void writeXML (pos::PixelConfigKey key, int version, std::string path) const
virtual void writeXMLHeader (pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const
virtual void writeXMLTrailer (std::ofstream *out) const

Private Attributes

std::stringstream ltcConfigStream_


Detailed Description

This is the documentation about PixelLTCConfig...

" "

This class reads the LTC configuration file

Definition at line 29 of file PixelLTCConfig.h.


Constructor & Destructor Documentation

PixelLTCConfig::PixelLTCConfig ( std::string  filename  ) 

Definition at line 13 of file PixelLTCConfig.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), in, parsecf::pyparsing::line(), and ltcConfigStream_.

00013                                                 :
00014   PixelConfigBase(" "," "," "){
00015 
00016     std::ifstream in(filename.c_str());
00017 
00018     if (!in.good()){
00019         std::cout << "Could not open:"<<filename<<std::endl;
00020         assert(0);
00021     }
00022     else {
00023         std::cout << "Opened:"<<filename<<std::endl;
00024     }
00025 
00026     //ltcConfigPath_ = filename;
00027     string line;
00028     while (!in.eof()) {
00029        getline (in,line);
00030        ltcConfigStream_ << line << endl;
00031     }
00032 
00033 } 


Member Function Documentation

std::stringstream& pos::PixelLTCConfig::getLTCConfigStream (  )  [inline]

Definition at line 35 of file PixelLTCConfig.h.

References ltcConfigStream_.

00035 {return ltcConfigStream_;}

void PixelLTCConfig::writeASCII ( std::string  dir  )  const [virtual]

Implements pos::PixelConfigBase.

Definition at line 35 of file PixelLTCConfig.cc.

References lat::endl(), EgammaValidation_cff::filename, ltcConfigStream_, and out.

00035                                                    {
00036 
00037   if (dir!="") dir+="/";
00038   std::string filename=dir+"LTCConfiguration.txt";
00039   std::ofstream out(filename.c_str());
00040 
00041   //std::ifstream in(ltcConfigPath_.c_str());
00042   //assert(in.good());
00043 
00044   string configstr = ltcConfigStream_.str();
00045 
00046   out << configstr << endl;
00047 
00048   out.close();
00049 
00050 }

virtual void pos::PixelLTCConfig::writeXML ( std::ofstream *  out  )  const [inline, virtual]

Reimplemented from pos::PixelConfigBase.

Definition at line 40 of file PixelLTCConfig.h.

00040 {;}

void pos::PixelLTCConfig::writeXML ( pos::PixelConfigKey  key,
int  version,
std::string  path 
) const [inline, virtual]

Reimplemented from pos::PixelConfigBase.

Definition at line 38 of file PixelLTCConfig.h.

00038 {;}

virtual void pos::PixelLTCConfig::writeXMLHeader ( pos::PixelConfigKey  key,
int  version,
std::string  path,
std::ofstream *  out 
) const [inline, virtual]

Reimplemented from pos::PixelConfigBase.

Definition at line 39 of file PixelLTCConfig.h.

00039 {;}

virtual void pos::PixelLTCConfig::writeXMLTrailer ( std::ofstream *  out  )  const [inline, virtual]

Reimplemented from pos::PixelConfigBase.

Definition at line 41 of file PixelLTCConfig.h.

00041 {;}


Member Data Documentation

std::stringstream pos::PixelLTCConfig::ltcConfigStream_ [private]

Definition at line 46 of file PixelLTCConfig.h.

Referenced by getLTCConfigStream(), PixelLTCConfig(), and writeASCII().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:50:34 2009 for CMSSW by  doxygen 1.5.4