CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/L1Trigger/DTTraco/interface/DTTracoCand.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00016 //
00017 //--------------------------------------------------
00018 #ifndef DT_TRACO_CAND_H
00019 #define DT_TRACO_CAND_H
00020 
00021 //------------------------------------
00022 // Collaborating Class Declarations --
00023 //------------------------------------
00024 class DTBtiTrigData;
00025 class DTTracoChip;
00026 
00027 //----------------------
00028 // Base Class Headers --
00029 //----------------------
00030 #include "L1TriggerConfig/DTTPGConfig/interface/BitArray.h"
00031 
00032 //---------------
00033 // C++ Headers --
00034 //---------------
00035 
00036 //              ---------------------
00037 //              -- Class Interface --
00038 //              ---------------------
00039 
00040 class DTTracoCand {
00041 
00042   public:
00043 
00045     DTTracoCand() {}
00046 
00048     DTTracoCand(DTTracoChip* tc, const DTBtiTrigData* btitr, int pos, int step);
00049 
00051     DTTracoCand(const DTTracoCand& tccand);
00052 
00054     DTTracoCand& operator=(const DTTracoCand& tccand);
00055 
00057     ~DTTracoCand();
00058 
00060     inline void setUsed() { _usable=0; }
00061 
00063     inline void setUnused() {_usable=1; }
00064 
00066     void setBits(int itk);
00067 
00069     inline DTTracoChip* Traco() const { return _traco; }
00070 
00072     inline const DTBtiTrigData* BtiTrig() const { return _btitr; }
00073 
00075     inline int step() const { return _step; }
00076 
00078     inline int position() const { return _position; }
00079 
00081     inline int K() const { return _tcK; }
00082 
00084     inline int X() const { return _tcX; }
00085 
00087     inline int usable() const { return _usable; }
00088 
00090     bool operator < ( const DTTracoCand& c) const { return _tcK<c._tcK; }
00091     // bool operator < ( const DTTracoCand& c) const { return _dataword<c._dataword; }
00092 
00093     /*
00095     inline bool closer ( const DTTracoCand& cand1, const DTTracoCand& cand2) const {
00096        return cand1<cand2; 
00097     }
00098 
00100     inline bool wider ( const DTTracoCand& cand1, const DTTracoCand& cand2) const { 
00101       return cand2<cand1; 
00102     }
00103     */
00104 
00106     void print() const ;
00107 
00108   private:
00109 
00110     DTTracoChip* _traco;         // Parent DTTracoChip
00111 
00112     const DTBtiTrigData* _btitr; // Associated BTI trigger
00113 
00114     // Other variables
00115     BitArray<7> _dataword; // the word on which sorting is done
00116     int _step;
00117     int _position;
00118     int _usable;
00119     int _tcX;
00120     int _tcK;
00121 
00122 };
00123 
00124 #endif