CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DataFormats/SiStripCommon/interface/SiStripHistoTitle.h

Go to the documentation of this file.
00001 // Last commit: $Id: SiStripHistoTitle.h,v 1.4 2007/07/31 15:20:24 ratnik Exp $
00002 
00003 #ifndef DataFormats_SiStripCommon_SiStripHistoTitle_H
00004 #define DataFormats_SiStripCommon_SiStripHistoTitle_H
00005 
00006 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
00007 #include <ostream>
00008 #include <sstream>
00009 #include <string>
00010 
00011 class SiStripKey;
00012 class SiStripHistoTitle;
00013 
00015 std::ostream& operator<< ( std::ostream&, const SiStripHistoTitle& );
00016 
00021 class SiStripHistoTitle {
00022 
00023  public:
00024   
00025   // ---------- Constructors, destructors ----------
00026   
00028   SiStripHistoTitle( const sistrip::HistoType& histo_type, 
00029                      const sistrip::RunType&   run_type, 
00030                      const SiStripKey&         key,
00031                      const std::string&        extra_info = "" );
00032   
00034   SiStripHistoTitle( const sistrip::HistoType&   histo_type, 
00035                      const sistrip::RunType&     run_type, 
00036                      const sistrip::KeyType&     key_type,
00037                      const uint32_t&             key_value,
00038                      const sistrip::Granularity& gran,
00039                      const uint16_t&             channel,
00040                      const std::string&          extra_info = "" );
00041   
00043   SiStripHistoTitle( const std::string& histo_title );
00044 
00045   // ---------- Public interface ----------
00046   
00048   inline const std::string& title() const;
00049   
00051   inline const sistrip::HistoType& histoType() const;
00052   
00054   inline const sistrip::RunType& runType() const;
00055   
00057   inline const sistrip::KeyType& keyType() const; 
00058   
00060   inline const uint32_t& keyValue() const;
00061 
00063   inline const sistrip::Granularity& granularity() const;
00064   
00066   inline const uint16_t& channel() const;
00067   
00069   inline const std::string& extraInfo() const;
00070   
00071  private:
00072 
00073   // ---------- Private methods ----------
00074   
00076   SiStripHistoTitle() {;}
00077 
00079   void setTitle();
00080 
00082   void extractTitle();
00083   
00084   // ---------- Private member data ----------
00085 
00087   std::string title_;
00088 
00090   sistrip::HistoType histoType_;
00091 
00093   sistrip::RunType runType_;
00094 
00096   sistrip::KeyType keyType_; 
00097 
00099   uint32_t keyValue_;
00100 
00102   sistrip::Granularity granularity_;
00103 
00105   uint16_t channel_;
00106 
00108   std::string extraInfo_;
00109   
00110 };
00111 
00112 // ---------- inline methods ----------
00113 
00114 const std::string& SiStripHistoTitle::title() const { return title_; }
00115 const sistrip::HistoType& SiStripHistoTitle::histoType() const { return histoType_; }
00116 const sistrip::RunType& SiStripHistoTitle::runType() const { return runType_; }
00117 const sistrip::KeyType& SiStripHistoTitle::keyType() const { return keyType_; } 
00118 const uint32_t& SiStripHistoTitle::keyValue() const { return keyValue_; }
00119 const sistrip::Granularity& SiStripHistoTitle::granularity() const { return granularity_; }
00120 const uint16_t& SiStripHistoTitle::channel() const { return channel_; }
00121 const std::string& SiStripHistoTitle::extraInfo() const { return extraInfo_; }
00122 
00123 #endif // DataFormats_SiStripCommon_SiStripHistoTitle_H
00124 
00125