CMS 3D CMS Logo

DTStatusFlag.h

Go to the documentation of this file.
00001 #ifndef DTStatusFlag_H
00002 #define DTStatusFlag_H
00003 
00015 //----------------------
00016 // Base Class Headers --
00017 //----------------------
00018 
00019 
00020 //------------------------------------
00021 // Collaborating Class Declarations --
00022 //------------------------------------
00023 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00024 
00025 //---------------
00026 // C++ Headers --
00027 //---------------
00028 #include <string>
00029 #include <vector>
00030 
00031 //              ---------------------
00032 //              -- Class Interface --
00033 //              ---------------------
00034 
00035 class DTStatusFlagId {
00036 
00037  public:
00038 
00039   DTStatusFlagId();
00040   ~DTStatusFlagId();
00041 
00042   int   wheelId;
00043   int stationId;
00044   int  sectorId;
00045   int      slId;
00046   int   layerId;
00047   int    cellId;
00048 
00049 };
00050 
00051 
00052 class DTStatusFlagData {
00053 
00054  public:
00055 
00056   DTStatusFlagData();
00057   ~DTStatusFlagData();
00058 
00059   bool noiseFlag;
00060   bool    feMask;
00061   bool   tdcMask;
00062   bool  trigMask;
00063   bool  deadFlag;
00064   bool  nohvFlag;
00065 
00066 };
00067 
00068 
00069 class DTStatusFlagCompare {
00070  public:
00071   bool operator()( const DTStatusFlagId& idl,
00072                    const DTStatusFlagId& idr ) const;
00073 };
00074 
00075 
00076 class DTStatusFlag {
00077 
00078  public:
00079 
00082   DTStatusFlag();
00083   DTStatusFlag( const std::string& version );
00084 
00087   ~DTStatusFlag();
00088 
00091 
00092   int cellStatus( int   wheelId,
00093                   int stationId,
00094                   int  sectorId,
00095                   int      slId,
00096                   int   layerId,
00097                   int    cellId,
00098                   bool& noiseFlag,
00099                   bool&    feMask,
00100                   bool&   tdcMask,
00101                   bool&  trigMask,
00102                   bool&  deadFlag,
00103                   bool&  nohvFlag ) const
00104       { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
00105                     noiseFlag, feMask, tdcMask, trigMask,
00106                     deadFlag, nohvFlag); };
00107   int cellStatus( const DTWireId& id,
00108                   bool& noiseFlag,
00109                   bool&    feMask,
00110                   bool&   tdcMask,
00111                   bool&  trigMask,
00112                   bool&  deadFlag,
00113                   bool&  nohvFlag ) const
00114       { return get( id,
00115                     noiseFlag, feMask, tdcMask, trigMask,
00116                     deadFlag, nohvFlag ); };
00117   int get( int   wheelId,
00118            int stationId,
00119            int  sectorId,
00120            int      slId,
00121            int   layerId,
00122            int    cellId,
00123            bool& noiseFlag,
00124            bool&    feMask,
00125            bool&   tdcMask,
00126            bool&  trigMask,
00127            bool&  deadFlag,
00128            bool&  nohvFlag ) const;
00129   int get( const DTWireId& id,
00130            bool& noiseFlag,
00131            bool&    feMask,
00132            bool&   tdcMask,
00133            bool&  trigMask,
00134            bool&  deadFlag,
00135            bool&  nohvFlag ) const;
00136 
00138   const
00139   std::string& version() const;
00140   std::string& version();
00141 
00143   void clear();
00144 
00145   int setCellStatus( int   wheelId,
00146                      int stationId,
00147                      int  sectorId,
00148                      int      slId,
00149                      int   layerId,
00150                      int    cellId,
00151                      bool noiseFlag,
00152                      bool    feMask,
00153                      bool   tdcMask,
00154                      bool  trigMask,
00155                      bool  deadFlag,
00156                      bool  nohvFlag );
00157   int setCellStatus( const DTWireId& id,
00158                      bool noiseFlag,
00159                      bool    feMask,
00160                      bool   tdcMask,
00161                      bool  trigMask,
00162                      bool  deadFlag,
00163                      bool  nohvFlag );
00164 
00165   int setCellNoise( int   wheelId,
00166                     int stationId,
00167                     int  sectorId,
00168                     int      slId,
00169                     int   layerId,
00170                     int    cellId,
00171                     bool flag );
00172   int setCellNoise( const DTWireId& id,
00173                     bool flag );
00174 
00175   int setCellFEMask( int   wheelId,
00176                      int stationId,
00177                      int  sectorId,
00178                      int      slId,
00179                      int   layerId,
00180                      int    cellId,
00181                      bool mask );
00182   int setCellFEMask( const DTWireId& id,
00183                      bool mask );
00184 
00185   int setCellTDCMask( int   wheelId,
00186                       int stationId,
00187                       int  sectorId,
00188                       int      slId,
00189                       int   layerId,
00190                       int    cellId,
00191                       bool mask );
00192   int setCellTDCMask( const DTWireId& id,
00193                       bool mask );
00194 
00195   int setCellTrigMask( int   wheelId,
00196                        int stationId,
00197                        int  sectorId,
00198                        int      slId,
00199                        int   layerId,
00200                        int    cellId,
00201                        bool mask );
00202   int setCellTrigMask( const DTWireId& id,
00203                        bool mask );
00204 
00205   int setCellDead( int   wheelId,
00206                    int stationId,
00207                    int  sectorId,
00208                    int      slId,
00209                    int   layerId,
00210                    int    cellId,
00211                    bool flag );
00212   int setCellDead( const DTWireId& id,
00213                    bool flag );
00214 
00215   int setCellNoHV( int   wheelId,
00216                    int stationId,
00217                    int  sectorId,
00218                    int      slId,
00219                    int   layerId,
00220                    int    cellId,
00221                    bool flag );
00222   int setCellNoHV( const DTWireId& id,
00223                    bool flag );
00224 
00226   typedef std::vector< std::pair<DTStatusFlagId,
00227                                  DTStatusFlagData> >::const_iterator
00228                                                       const_iterator;
00229   const_iterator begin() const;
00230   const_iterator end() const;
00231 
00232  private:
00233 
00234   std::string dataVersion;
00235 
00236   std::vector< std::pair<DTStatusFlagId,DTStatusFlagData> > dataList;
00237 
00239   void cacheMap() const;
00240   std::string mapName() const;
00241 
00242 };
00243 
00244 
00245 #endif // DTStatusFlag_H
00246 

Generated on Tue Jun 9 17:26:26 2009 for CMSSW by  doxygen 1.5.4