CMS 3D CMS Logo

CSCTFTBSPData.h

Go to the documentation of this file.
00001 #if !defined(CSCTFTBRAWFORMAT_CSCTFTBSPDATA_H)
00002 #define CSCTFTBRAWFORMAT_CSCTFTBSPDATA_H
00003 // -*- C++ -*-
00004 //
00005 // Package:     CSCTFTBRawFormat
00006 // Module:      CSCTFTBSPData
00007 // 
00008 // Description: Header file for SP Event Data (Tracks)
00009 //
00010 // Implementation:
00011 //     <Notes on implementation>
00012 //
00013 // Author:      Lindsey Gray
00014 // Created:     13.1.2005
00015 //
00016 // $Id: CSCTFTBSPData.h,v 1.1 2007/04/26 23:39:19 kkotov Exp $
00017 //
00018 // Revision History
00019 // $Log: CSCTFTBSPData.h,v $
00020 // Revision 1.1  2007/04/26 23:39:19  kkotov
00021 //
00022 // Moved old TB data format to a separate folder, attempted to unpack status digi
00023 //
00024 // Revision 1.2  2006/06/22 14:46:05  lgray
00025 // Forced commit of all code
00026 //
00027 // Revision 1.1  2006/06/22 00:34:18  lgray
00028 // Moved all data format classes here. Removed old Packages from nightly
00029 //
00030 // Revision 1.1  2006/02/22 23:15:49  lgray
00031 // First commit of test beam data format from UF
00032 //
00033 // Revision 1.3  2005/05/10 21:57:21  lgray
00034 // Bugfixes, stability issues fixed
00035 //
00036 // Revision 1.2  2005/03/03 18:14:48  lgray
00037 // Added ability to pack data back into raw form. Added test program for this as well.
00038 //
00039 // Revision 1.1  2005/02/14 20:59:46  lgray
00040 // First Commit from UF
00041 //
00042 // Revision 1.13  2004/05/21 10:17:26  tfcvs
00043 // DEA: changes to analysis
00044 //
00045 // Revision 1.12  2004/05/18 15:00:25  tfcvs
00046 // DEA: close to new SP data format
00047 //
00048 // Revision 1.11  2004/05/18 08:00:10  tfcvs
00049 // DEA: touch base
00050 //
00051 
00052 // System include files
00053 #include <iostream>
00054 
00055 // Package include files
00056 #include "EventFilter/CSCTFRawToDigi/src/CSCTFTBPTData.h"
00057 
00058 // External package include files
00059 
00060 // STL classes
00061 
00062 // Forward declarations
00063 //class BitVector;
00064 
00065 class CSCTFTBSPData 
00066 {
00067 // Friend classses and functions
00068 
00069 // Public part
00070    public:
00071         // Constants, enums and typedefs
00072 
00073         // Constructors and destructor
00074         CSCTFTBSPData();
00075         CSCTFTBSPData(unsigned short * buf,
00076                                bool ptflag,
00077                                unsigned themode_,
00078                                unsigned link_); 
00079         CSCTFTBSPData(const CSCTFTBSPData &);
00080         ~CSCTFTBSPData();
00081 
00082         CSCTFTBSPData operator=(const CSCTFTBSPData &);
00083 
00084         // Member functions
00085         static unsigned size() {return size_;};
00086 
00087         // Const member functions
00088 
00090         unsigned int trackId() const {return trkId_;}
00091 
00093         unsigned int link() const {return mylink_;}
00094 
00096         CSCTFTBPTData* ptData() const {return pt_data_;}
00097         
00099         unsigned phiPacked()    const {return phi_;}
00100         unsigned frPacked()     const {return fr_;}
00101         unsigned chargePacked() const {return chrg_;}
00102         unsigned haloPacked()   const {return hl_;}
00103         unsigned etaPacked()    const {return eta_;}
00104         unsigned sePacked()     const {return se_;}
00105         unsigned rsvPacked()    const {return rsv_;}
00106         unsigned dphi12Packed() const {return dphi_12_;}
00107         unsigned dphi23Packed() const {return dphi_23_;}
00108         unsigned signPacked()   const {return sign_;}
00109         unsigned bx0Packed()    const {return bx0_;}
00110         unsigned bc0Packed()    const {return bc0_;}
00111 
00113         //BitVector packVector() const;
00114 
00116         friend std::ostream & operator<<(std::ostream & stream, const CSCTFTBSPData &);
00117 
00118         // Static member functions
00119                        
00120 // Private part
00121 
00122 private:
00123 
00124         //frame 1
00125         unsigned phi_        :5;
00126         unsigned fr_         :1;
00127         unsigned chrg_       :1;
00128         unsigned hl_         :1;
00129         unsigned eta_        :5;
00130         unsigned se_         :1;
00131         unsigned rsv_        :1;
00132         unsigned zero1_      :1; //always zero
00133         //frame 2
00134         unsigned dphi_12_    :8;
00135         unsigned dphi_23_    :4;
00136         unsigned sign_       :1;
00137         unsigned bx0_        :1;
00138         unsigned bc0_        :1;
00139         unsigned zero2_      :1; //always zero
00140         //frame 3
00141         unsigned trkId_      :15;
00142         unsigned zero3_      :1; //always zero
00143         
00144         CSCTFTBPTData *pt_data_;
00145         unsigned mymode_;
00146         unsigned mylink_;
00147 
00148         // Constructors and destructor
00149 
00150         // Assignment operator(s)
00151 
00152         // Private member functions
00153         int unpackData(unsigned short * buf, bool ptflag);
00154         // Private const member functions
00155 
00156         // Data members
00157 
00158         // Static data members
00159         const static unsigned size_ = 3;
00160         // Inline function definitions
00161 
00162 };
00163 
00164 #endif

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