00001 #if !defined(CSCTFTBRAWFORMAT_CSCTFTBFRONTDATA_H) 00002 #define CSCTFTBRAWFORMAT_CSCTFTBFRONTDATA_H 00003 // -*- C++ -*- 00004 // 00005 // Package: CSCTFTBRawFormat 00006 // Module: CSCTFTBFrontData 00007 // 00008 // Description: Header file for Front Event Data (Correlated LCTs) 00009 // 00010 // Implementation: 00011 // <Notes on implementation> 00012 // 00013 // Author: Lindsey Gray 00014 // Created: 13.1.2005 00015 // 00016 // $Id: CSCTFTBFrontData.h,v 1.1 2007/04/26 23:39:19 kkotov Exp $ 00017 // 00018 // Revision History 00019 // $Log: CSCTFTBFrontData.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.2 2006/02/24 23:15:43 lgray 00031 // Fixed buildfile, added default ctor to FrontData 00032 // 00033 // Revision 1.1 2006/02/22 23:15:49 lgray 00034 // First commit of test beam data format from UF 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/19 17:27:32 tfcvs 00046 // DEA: touch base with LCT reformat 00047 // 00048 // Revision 1.11 2004/05/18 11:37:46 tfcvs 00049 // DEA: touch base 00050 // 00051 // Revision 1.10 2004/05/18 08:00:10 tfcvs 00052 // DEA: touch base 00053 // 00054 // Revision 1.9 2003/08/27 22:08:13 tfcvs 00055 // Added pretty-print - Rick 00056 // 00057 // Revision 1.8 2003/05/25 10:13:02 tfcvs 00058 // first working version -DEA 00059 // 00060 // Revision 1.7 2003/05/20 22:13:06 tfcvs 00061 // HS - Added Darin's changes 00062 // 00063 // Revision 1.6 2003/05/19 23:23:12 tfcvs 00064 // HS - Commit after some changes 00065 // 00066 // Revision 1.4 2003/05/19 15:47:18 tfcvs 00067 // HS - Some cleanup 00068 // 00069 // Revision 1.3 2003/05/19 00:25:56 tfcvs 00070 // DEA: committed, but may not compile 00071 // 00072 // Revision 1.2 2003/05/15 23:58:40 tfcvs 00073 // HS - Some cosmetics 00074 // 00075 // 00076 // 00077 00078 // System include files 00079 #include <iostream> 00080 // Package include files 00081 00082 // External package include files 00083 00084 // STL classes 00085 00086 // Forward declarations 00087 //class BitVector; 00088 00089 class CSCTFTBFrontData 00090 { 00091 00092 // Friend classses and functions 00093 00094 // Public part 00095 public: 00096 // Constants, enums and typedefs 00097 00098 // Constructors and destructor 00099 CSCTFTBFrontData() { } 00100 CSCTFTBFrontData(unsigned); 00101 CSCTFTBFrontData(const CSCTFTBFrontData&); 00102 00103 ~CSCTFTBFrontData(); 00104 00105 // Member functions 00106 00107 // Const member functions 00108 00110 unsigned qualityPacked() const {return quality_;} 00111 00113 unsigned CSCIDPacked() const {return csc_id_;} 00114 00116 unsigned wireGroupPacked() const {return wire_group_;} 00117 00119 unsigned stripPacked() const {return clct_patrn_;} 00120 00122 unsigned patternPacked() const {return clct_patnum_;} 00123 00125 unsigned lrPacked() const {return l_r_;} 00126 00128 unsigned bx0Packed() const {return BX0_;} 00129 00131 unsigned bc0Packed() const {return BC0_;} 00132 00134 int getMPC() const { return myMPC_;} 00135 00137 bool check() {return (zero1_ == 0 && zero2_ == 0);} 00138 00140 friend std::ostream & operator<<(std::ostream & stream, const CSCTFTBFrontData &); 00142 //BitVector packVector() const; 00143 00144 // Static member functions 00145 static int size() {return size_;}; 00146 00147 // Private part 00148 private: 00149 00150 //frame 1 00151 unsigned quality_ :4; 00152 unsigned csc_id_ :4; 00153 unsigned wire_group_ :7; 00154 unsigned zero1_ :1; // always zero 00155 //frame 2 00156 unsigned clct_patrn_ :8; 00157 unsigned clct_patnum_:4; 00158 unsigned l_r_ :1; 00159 unsigned BX0_ :1; 00160 unsigned BC0_ :1; 00161 unsigned zero2_ :1; //always zero 00162 00163 // Constructors and destructor 00164 00165 // Assignment operator(s) 00166 00167 // Private member functions 00168 00169 // Private const member functions 00170 00171 // Data members 00172 int myMPC_; 00173 // Static data members 00174 static const unsigned size_ = 2; // 16 bit words 00175 // Inline function definitions 00176 00177 }; 00178 00179 #endif