00001 #ifndef DTTtrig_H
00002 #define DTTtrig_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 #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h"
00026
00027
00028
00029
00030 #include <string>
00031 #include <vector>
00032
00033
00034
00035
00036
00037 class DTTtrigId {
00038
00039 public:
00040
00041 DTTtrigId();
00042 ~DTTtrigId();
00043
00044 int wheelId;
00045 int stationId;
00046 int sectorId;
00047 int slId;
00048 int layerId;
00049 int cellId;
00050
00051 };
00052
00053
00054 class DTTtrigData {
00055
00056 public:
00057
00058 DTTtrigData();
00059 ~DTTtrigData();
00060
00061 float tTrig;
00062 float tTrms;
00063
00064 };
00065
00066
00067 class DTTtrig {
00068
00069 public:
00070
00073 DTTtrig();
00074 DTTtrig( const std::string& version );
00075
00078 ~DTTtrig();
00079
00082
00083 int slTtrig( int wheelId,
00084 int stationId,
00085 int sectorId,
00086 int slId,
00087 float& tTrig,
00088 float& tTrms,
00089 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00090 { return get( wheelId, stationId, sectorId, slId, 0, 0,
00091 tTrig, tTrms, unit ); };
00092 int slTtrig( int wheelId,
00093 int stationId,
00094 int sectorId,
00095 int slId,
00096 int layerId,
00097 int cellId,
00098 float& tTrig,
00099 float& tTrms,
00100 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00101 { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
00102 tTrig, tTrms, unit ); };
00103 int slTtrig( const DTSuperLayerId& id,
00104 float& tTrig,
00105 float& tTrms,
00106 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00107 { return get( id, tTrig, tTrms, unit ); };
00108 int slTtrig( const DetId& id,
00109 float& tTrig,
00110 float& tTrms,
00111 DTTimeUnits::type unit = DTTimeUnits::counts ) const
00112 { return get( id, tTrig, tTrms, unit ); };
00113 int get( int wheelId,
00114 int stationId,
00115 int sectorId,
00116 int slId,
00117 float& tTrig,
00118 float& tTrms,
00119 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00120 int get( int wheelId,
00121 int stationId,
00122 int sectorId,
00123 int slId,
00124 int layerId,
00125 int cellId,
00126 float& tTrig,
00127 float& tTrms,
00128 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00129 int get( const DTSuperLayerId& id,
00130 float& tTrig,
00131 float& tTrms,
00132 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00133 int get( const DetId& id,
00134 float& tTrig,
00135 float& tTrms,
00136 DTTimeUnits::type unit = DTTimeUnits::counts ) const;
00137 float unit() const;
00138
00140 const
00141 std::string& version() const;
00142 std::string& version();
00143
00145 void clear();
00146
00147 int setSLTtrig( int wheelId,
00148 int stationId,
00149 int sectorId,
00150 int slId,
00151 float tTrig,
00152 float tTrms,
00153 DTTimeUnits::type unit = DTTimeUnits::counts )
00154 { return set( wheelId, stationId, sectorId, slId, 0, 0,
00155 tTrig, tTrms, unit ); };
00156 int setSLTtrig( int wheelId,
00157 int stationId,
00158 int sectorId,
00159 int slId,
00160 int layerId,
00161 int cellId,
00162 float tTrig,
00163 float tTrms,
00164 DTTimeUnits::type unit = DTTimeUnits::counts )
00165 { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
00166 tTrig, tTrms, unit ); };
00167 int setSLTtrig( const DTSuperLayerId& id,
00168 float tTrig,
00169 float tTrms,
00170 DTTimeUnits::type unit = DTTimeUnits::counts )
00171 { return set( id, tTrig, tTrms, unit ); };
00172 int setSLTtrig( const DetId& id,
00173 float tTrig,
00174 float tTrms,
00175 DTTimeUnits::type unit = DTTimeUnits::counts )
00176 { return set( id, tTrig, tTrms, unit ); };
00177 int set( int wheelId,
00178 int stationId,
00179 int sectorId,
00180 int slId,
00181 float tTrig,
00182 float tTrms,
00183 DTTimeUnits::type unit = DTTimeUnits::counts );
00184 int set( int wheelId,
00185 int stationId,
00186 int sectorId,
00187 int slId,
00188 int layerId,
00189 int cellId,
00190 float tTrig,
00191 float tTrms,
00192 DTTimeUnits::type unit = DTTimeUnits::counts );
00193 int set( const DTSuperLayerId& id,
00194 float tTrig,
00195 float tTrms,
00196 DTTimeUnits::type unit = DTTimeUnits::counts );
00197 int set( const DetId& id,
00198 float tTrig,
00199 float tTrms,
00200 DTTimeUnits::type unit = DTTimeUnits::counts );
00201 void setUnit( float unit );
00202
00204 typedef std::vector< std::pair<DTTtrigId,
00205 DTTtrigData> >::const_iterator
00206 const_iterator;
00207 const_iterator begin() const;
00208 const_iterator end() const;
00209
00210 private:
00211
00212 std::string dataVersion;
00213 float nsPerCount;
00214
00215 std::vector< std::pair<DTTtrigId,DTTtrigData> > dataList;
00216
00218 void cacheMap() const;
00219 std::string mapName() const;
00220
00221 };
00222
00223
00224 #endif // DTTtrig_H
00225