CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/CalibFormats/SiStripObjects/interface/SiStripDelay.h

Go to the documentation of this file.
00001 #ifndef SiStripObjects_SiStripDelay_h
00002 #define SiStripObjects_SiStripDelay_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     SiStripObjects
00006 // Class  :     SiStripDelay
00007 // 
00027 #include "CondFormats/SiStripObjects/interface/SiStripBaseDelay.h"
00028 #include <vector>
00029 #include <memory>
00030 #include <boost/unordered_map.hpp>
00031 
00032 class SiStripDelay
00033 {
00034  public:
00035   SiStripDelay() {};
00036   virtual ~SiStripDelay() {};
00037 
00038   inline SiStripDelay(const SiStripBaseDelay& baseDelay, const int sumSign,
00039                       const std::pair<std::string, std::string> & recordLabelPair)
00040   {
00041     fillNewDelay(baseDelay, sumSign, recordLabelPair);
00042   }
00043 
00044   void fillNewDelay(const SiStripBaseDelay& baseDelay, const int sumSign,
00045                     const std::pair<std::string, std::string> & recordLabelPair);
00046 
00048   float getDelay(const uint32_t detId) const;
00049 
00051   bool makeDelay();
00052 
00054   void clear();
00055   
00062   inline const SiStripBaseDelay * getBaseDelay(const uint32_t index) const
00063   {
00064     return baseDelayVector_[index];
00065   }
00066 
00067   inline size_t getNumberOfTags() const
00068   {
00069     return baseDelayVector_.size();
00070   }
00071   inline std::string getRcdName(const uint32_t index) const
00072   {
00073     return recordLabelPair_[index].first;
00074   }
00075   inline std::string getLabelName(const uint32_t index) const
00076   {
00077     return recordLabelPair_[index].second;
00078   }
00079   inline int getTagSign(const uint32_t index) const
00080   {
00081     return sumSignVector_[index];
00082   }
00083 
00085   void printSummary(std::stringstream& ss) const;
00087   void printDebug(std::stringstream& ss) const;
00088 
00089  private:
00090 
00091   SiStripDelay(const SiStripDelay&); // stop default
00092   const SiStripDelay& operator=(const SiStripDelay&); // stop default
00093 
00094   // ---------- member data --------------------------------
00095 
00096   std::vector<const SiStripBaseDelay *> baseDelayVector_;
00097   std::vector<int> sumSignVector_;
00098   std::vector<std::pair<std::string, std::string> > recordLabelPair_;
00099   boost::unordered_map<uint32_t, double> delays_;
00100 };
00101 
00102 #endif