00001 #if !defined(CSCTFTBRAWFORMAT_CSCTFTBFRONTBLOCK_H) 00002 #define CSCTFTBRAWFORMAT_CSCTFTBFRONTBLOCK_H 00003 // -*- C++ -*- 00004 // 00005 // Package: CSCTFTBRawFormat 00006 // Module: CSCTFTBFrontBlock 00007 // 00008 // Description: Header file for Front Event Data Block 00009 // 00010 // Implementation: 00011 // <Notes on implementation> 00012 // 00013 // Author: Lindsey Gray 00014 // Created: 13.5.2003 00015 // 00016 // $Id: CSCTFTBFrontBlock.h,v 1.1 2007/04/26 23:39:19 kkotov Exp $ 00017 // 00018 // Revision History 00019 // $Log: CSCTFTBFrontBlock.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/26 23:34:33 lgray 00031 // Adding tests for raw data. 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.2 2004/05/18 08:00:10 tfcvs 00043 // DEA: touch base 00044 // 00045 // Revision 1.1 2004/05/17 08:25:52 tfcvs 00046 // DEA: switch to SR BX data 00047 // 00048 // Revision 1.2 2003/08/27 22:07:51 tfcvs 00049 // Added pretty-print - Rick 00050 // 00051 // Revision 1.1 2003/05/25 10:13:02 tfcvs 00052 // first working version -DEA 00053 // 00054 // Revision 1.7 2003/05/20 22:13:06 tfcvs 00055 // HS - Added Darin's changes 00056 // 00057 // Revision 1.6 2003/05/19 23:23:12 tfcvs 00058 // HS - Commit after some changes 00059 // 00060 // Revision 1.4 2003/05/19 15:47:18 tfcvs 00061 // HS - Some cleanup 00062 // 00063 // Revision 1.3 2003/05/19 00:25:56 tfcvs 00064 // DEA: committed, but may not compile 00065 // 00066 // Revision 1.2 2003/05/15 23:58:40 tfcvs 00067 // HS - Some cosmetics 00068 // 00069 // 00070 // 00071 00072 // System include files 00073 #include <vector> 00074 #include <iostream> 00075 00076 // Package include files 00077 #include "EventFilter/CSCTFRawToDigi/src/CSCTFTBFrontData.h" 00078 #include "EventFilter/CSCTFRawToDigi/src/CSCTFTBFrontHeader.h" 00079 00080 // External package include files 00081 #include <DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h> 00082 00083 // STL classes 00084 00085 // Forward declarations 00086 //class BitVector; 00087 class CSCTFTBEventData; 00088 class CSCTFTBEventHeader; 00089 00090 class CSCTFTBFrontBlock 00091 { 00092 00093 // Friend classses and functions 00094 00095 // Public part 00096 public: 00097 // Constants, enums and typedefs 00098 00099 // Constructors and destructor 00100 CSCTFTBFrontBlock(); 00101 00102 CSCTFTBFrontBlock(unsigned short *buf, int bx, 00103 const CSCTFTBEventHeader& hdr); 00104 00105 ~CSCTFTBFrontBlock(); 00106 00107 // Member functions 00108 00109 // Const member functions 00110 00112 CSCTFTBFrontHeader frontHeader() const {return frontHeader_;} 00113 00115 std::vector<std::vector<CSCTFTBFrontData> > frontData() const {return srdata_;} 00116 00118 std::vector<CSCTFTBFrontData> frontData(unsigned mpc) const; 00119 00121 CSCTFTBFrontData frontData(unsigned mpc, unsigned link) const; 00122 CSCCorrelatedLCTDigi frontDigiData(unsigned mpc, unsigned link) const; 00123 00125 int size() const {return size_;}; 00126 00128 int BX() const {return myBX_;}; 00129 00131 //BitVector pack(); 00132 00134 friend std::ostream & operator<<(std::ostream & stream, const CSCTFTBFrontBlock &); 00135 // Protected part 00136 protected: 00137 00138 // Protected member functions 00139 int unpackData(unsigned short * buf, const CSCTFTBEventHeader&); 00140 00141 00142 // Protected const member functions 00143 00145 std::vector<std::vector<CSCTFTBFrontData> > srdata_; 00146 CSCTFTBFrontHeader frontHeader_; 00147 00148 int size_; 00149 int myBX_; 00150 00151 // Private part 00152 private: 00153 00154 // Constructors and destructor 00155 00156 // Assignment operator(s) 00157 00158 // Private member functions 00159 00160 // Private const member functions 00161 00162 // Data members 00163 00164 // Static data members 00165 00166 // Inline function definitions 00167 00168 }; 00169 00170 #endif