00001 #ifndef DTT0_H
00002 #define DTT0_H
00003
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "CondFormats/DTObjects/interface/DTTimeUnits.h"
00024 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00025
00026
00027
00028
00029 #include <string>
00030 #include <vector>
00031
00032
00033
00034
00035
00036 class DTT0Id {
00037
00038 public:
00039
00040 DTT0Id();
00041 ~DTT0Id();
00042
00043 int wheelId;
00044 int stationId;
00045 int sectorId;
00046 int slId;
00047 int layerId;
00048 int cellId;
00049
00050 };
00051
00052
00053 class DTT0Data {
00054
00055 public:
00056
00057 DTT0Data();
00058 ~DTT0Data();
00059
00060 float t0mean;
00061 float t0rms;
00062
00063 };
00064
00065
00066 class DTT0 {
00067
00068 public:
00069
00072 DTT0();
00073 DTT0( const std::string& version );
00074
00077 ~DTT0();
00078
00081
00082 int cellT0( int wheelId,
00083 int stationId,
00084 int sectorId,
00085 int slId,
00086 int layerId,
00087 int cellId,
00088 float& t0mean,
00089 float& t0rms,
00090 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00091 { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
00092 t0mean, t0rms, unit ); };
00093 int cellT0( const DTWireId& id,
00094 float& t0mean,
00095 float& t0rms,
00096 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00097 { return get( id, t0mean, t0rms, unit ); };
00098 int get( int wheelId,
00099 int stationId,
00100 int sectorId,
00101 int slId,
00102 int layerId,
00103 int cellId,
00104 float& t0mean,
00105 float& t0rms,
00106 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00107 int get( const DTWireId& id,
00108 float& t0mean,
00109 float& t0rms,
00110 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00111 float unit() const;
00112
00114 const
00115 std::string& version() const;
00116 std::string& version();
00117
00119 void clear();
00120
00121 int setCellT0( int wheelId,
00122 int stationId,
00123 int sectorId,
00124 int slId,
00125 int layerId,
00126 int cellId,
00127 float t0mean,
00128 float t0rms,
00129 DTTimeUnits::type unit = DTTimeUnits::counts )
00130 { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
00131 t0mean, t0rms, unit ); };
00132 int setCellT0( const DTWireId& id,
00133 float t0mean,
00134 float t0rms,
00135 DTTimeUnits::type unit = DTTimeUnits::counts )
00136 { return set( id, t0mean, t0rms, unit ); };
00137 int set( int wheelId,
00138 int stationId,
00139 int sectorId,
00140 int slId,
00141 int layerId,
00142 int cellId,
00143 float t0mean,
00144 float t0rms,
00145 DTTimeUnits::type unit = DTTimeUnits::counts );
00146 int set( const DTWireId& id,
00147 float t0mean,
00148 float t0rms,
00149 DTTimeUnits::type unit = DTTimeUnits::counts );
00150 void setUnit( float unit );
00151
00153 typedef std::vector< std::pair<DTT0Id,
00154 DTT0Data> >::const_iterator
00155 const_iterator;
00156 const_iterator begin() const;
00157 const_iterator end() const;
00158
00159 private:
00160
00161 std::string dataVersion;
00162 float nsPerCount;
00163
00164 std::vector< std::pair<DTT0Id,DTT0Data> > dataList;
00165
00167 void cacheMap() const;
00168 std::string mapName() const;
00169
00170 };
00171
00172
00173 #endif // DTT0_H
00174