CMS 3D CMS Logo

SiStripDetInfoFileReader.h

Go to the documentation of this file.
00001 #ifndef CalibTracker_SiStripChannelGain_SiStripDetInfoFileReader_h
00002 #define CalibTracker_SiStripChannelGain_SiStripDetInfoFileReader_h
00003 // -*- C++ -*-
00004 //
00005 // Package:    SiStripDetInfoFileReader
00006 // Class:      SiStripDetInfoFileReader
00007 // 
00015 //
00016 // Original Author:  G. Bruno
00017 //         Created:  Mon Nov 20 10:04:31 CET 2006
00018 // $Id: SiStripDetInfoFileReader.h,v 1.3 2007/10/24 08:36:37 giordano Exp $
00019 //
00020 //
00021 
00022 #include <map>
00023 #include <vector>
00024 #include <string>
00025 #include <iostream>
00026 #include <fstream>
00027 #include <boost/cstdint.hpp>
00028 
00029 class SiStripDetInfoFileReader  {
00030 
00031 public:
00032 
00033   struct DetInfo{
00034     
00035     DetInfo(){};
00036     DetInfo(unsigned short _nApvs, double _stripLength, float _thickness):
00037     nApvs(_nApvs),stripLength(_stripLength),thickness(_thickness){};
00038 
00039     unsigned short nApvs;
00040     double stripLength;
00041     float thickness;
00042   };
00043 
00044   explicit SiStripDetInfoFileReader(){};
00045   explicit SiStripDetInfoFileReader(std::string filePath);
00046   explicit SiStripDetInfoFileReader(const SiStripDetInfoFileReader&);
00047 
00048   ~SiStripDetInfoFileReader();
00049 
00050   SiStripDetInfoFileReader& operator=(const SiStripDetInfoFileReader &copy);
00051 
00052   const std::vector<uint32_t> & getAllDetIds() const {return detIds_;}
00053 
00054   const std::pair<unsigned short, double>  getNumberOfApvsAndStripLength(uint32_t detId) const;
00055 
00056   const float & getThickness(uint32_t detId) const;
00057 
00058   const std::map<uint32_t, DetInfo > & getAllData() const {return detData_;}
00059 
00060 
00061 private:
00062 
00063 
00064   std::ifstream inputFile_; 
00065   //  std::string filePath_;
00066 
00067   std::map<uint32_t, DetInfo> detData_;
00068   //  std::map<uint32_t, std::pair<unsigned short, double> > detData_;
00069   //std::map<uint32_t, float > detThickness_;
00070   std::vector<uint32_t> detIds_;
00071 
00072 };
00073 #endif

Generated on Tue Jun 9 17:25:50 2009 for CMSSW by  doxygen 1.5.4