CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/CondFormats/DTObjects/interface/DTT0.h

Go to the documentation of this file.
00001 #ifndef DTT0_H
00002 #define DTT0_H
00003 
00015 //----------------------
00016 // Base Class Headers --
00017 //----------------------
00018 
00019 
00020 //------------------------------------
00021 // Collaborating Class Declarations --
00022 //------------------------------------
00023 #include "CondFormats/DTObjects/interface/DTTimeUnits.h"
00024 #include "CondFormats/DTObjects/interface/DTBufferTree.h"
00025 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00026 
00027 //---------------
00028 // C++ Headers --
00029 //---------------
00030 #include <string>
00031 #include <vector>
00032 #include <map>
00033 
00034 //              ---------------------
00035 //              -- Class Interface --
00036 //              ---------------------
00037 
00038 class DTT0Data {
00039 
00040  public:
00041 
00042   DTT0Data();
00043   ~DTT0Data();
00044 
00045   uint32_t channelId;
00046   float t0mean;
00047   float t0rms;
00048 
00049 };
00050 
00051 
00052 class DTT0 {
00053 
00054  public:
00055 
00058   DTT0();
00059   DTT0( const std::string& version );
00060 
00063   ~DTT0();
00064 
00067 
00068   int cellT0( int   wheelId,
00069               int stationId,
00070               int  sectorId,
00071               int      slId,
00072               int   layerId,
00073               int    cellId,
00074               float& t0mean,
00075               float& t0rms,
00076               DTTimeUnits::type unit ) const
00077       { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
00078                     t0mean, t0rms, unit ); };
00079   int cellT0( const DTWireId& id,
00080               float& t0mean,
00081               float& t0rms,
00082               DTTimeUnits::type unit ) const
00083       { return get( id, t0mean, t0rms, unit ); };
00084   int get( int   wheelId,
00085            int stationId,
00086            int  sectorId,
00087            int      slId,
00088            int   layerId,
00089            int    cellId,
00090            float& t0mean,
00091            float& t0rms,
00092            DTTimeUnits::type unit ) const;
00093   int get( const DTWireId& id,
00094            float& t0mean,
00095            float& t0rms,
00096            DTTimeUnits::type unit ) const;
00097   float unit() const;
00098 
00100   const
00101   std::string& version() const;
00102   std::string& version();
00103 
00105   void clear();
00106 
00107   int setCellT0( int   wheelId,
00108                  int stationId,
00109                  int  sectorId,
00110                  int      slId,
00111                  int   layerId,
00112                  int    cellId,
00113                  float t0mean,
00114                  float t0rms,
00115                  DTTimeUnits::type unit )
00116       { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
00117                     t0mean, t0rms, unit ); };
00118   int setCellT0( const DTWireId& id,
00119                  float t0mean,
00120                  float t0rms,
00121                  DTTimeUnits::type unit )
00122       { return set( id, t0mean, t0rms, unit ); };
00123   int set( int   wheelId,
00124            int stationId,
00125            int  sectorId,
00126            int      slId,
00127            int   layerId,
00128            int    cellId,
00129            float t0mean,
00130            float t0rms,
00131            DTTimeUnits::type unit );
00132   int set( const DTWireId& id,
00133            float t0mean,
00134            float t0rms,
00135            DTTimeUnits::type unit );
00136   void setUnit( float unit );
00137 
00139   typedef std::vector<DTT0Data>::const_iterator const_iterator;
00140   const_iterator begin() const;
00141   const_iterator end() const;
00142 
00143  private:
00144 
00145   std::string dataVersion;
00146   float nsPerCount;
00147 
00148   std::vector< DTT0Data > dataList;
00149 
00150 };
00151 
00152 
00153 #endif // DTT0_H
00154