File indexing completed on 2023-03-17 10:51:21
0001
0002 #ifndef DataFormats_SiStripCommon_SiStripHistoTitle_H
0003 #define DataFormats_SiStripCommon_SiStripHistoTitle_H
0004
0005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0006 #include <ostream>
0007 #include <sstream>
0008 #include <string>
0009
0010 class SiStripKey;
0011 class SiStripHistoTitle;
0012
0013
0014 std::ostream& operator<<(std::ostream&, const SiStripHistoTitle&);
0015
0016
0017
0018
0019
0020 class SiStripHistoTitle {
0021 public:
0022
0023
0024
0025 SiStripHistoTitle(const sistrip::HistoType& histo_type,
0026 const sistrip::RunType& run_type,
0027 const SiStripKey& key,
0028 const std::string& extra_info = "");
0029
0030
0031 SiStripHistoTitle(const sistrip::HistoType& histo_type,
0032 const sistrip::RunType& run_type,
0033 const sistrip::KeyType& key_type,
0034 const uint32_t& key_value,
0035 const sistrip::Granularity& gran,
0036 const uint16_t& channel,
0037 const std::string& extra_info = "");
0038
0039
0040 SiStripHistoTitle(const std::string& histo_title);
0041
0042
0043
0044
0045 inline const std::string& title() const;
0046
0047
0048 inline const sistrip::HistoType& histoType() const;
0049
0050
0051 inline const sistrip::RunType& runType() const;
0052
0053
0054 inline const sistrip::KeyType& keyType() const;
0055
0056
0057 inline const uint32_t& keyValue() const;
0058
0059
0060 inline const sistrip::Granularity& granularity() const;
0061
0062
0063 inline const uint16_t& channel() const;
0064
0065
0066 inline const std::string& extraInfo() const;
0067
0068 private:
0069
0070
0071
0072 SiStripHistoTitle() { ; }
0073
0074
0075 void setTitle();
0076
0077
0078 void extractTitle();
0079
0080
0081
0082
0083 std::string title_;
0084
0085
0086 sistrip::HistoType histoType_;
0087
0088
0089 sistrip::RunType runType_;
0090
0091
0092 sistrip::KeyType keyType_;
0093
0094
0095 uint32_t keyValue_;
0096
0097
0098 sistrip::Granularity granularity_;
0099
0100
0101 uint16_t channel_;
0102
0103
0104 std::string extraInfo_;
0105 };
0106
0107
0108
0109 const std::string& SiStripHistoTitle::title() const { return title_; }
0110 const sistrip::HistoType& SiStripHistoTitle::histoType() const { return histoType_; }
0111 const sistrip::RunType& SiStripHistoTitle::runType() const { return runType_; }
0112 const sistrip::KeyType& SiStripHistoTitle::keyType() const { return keyType_; }
0113 const uint32_t& SiStripHistoTitle::keyValue() const { return keyValue_; }
0114 const sistrip::Granularity& SiStripHistoTitle::granularity() const { return granularity_; }
0115 const uint16_t& SiStripHistoTitle::channel() const { return channel_; }
0116 const std::string& SiStripHistoTitle::extraInfo() const { return extraInfo_; }
0117
0118 #endif