![]() |
![]() |
00001 // -*- C++ -*- 00002 // // 00003 // Package: CSCTFTBRawFormat 00004 // Module: CSCTFTBPTData 00005 // 00006 // Description: PT Data class 00007 // 00008 // Implementation: 00009 // <Notes on implementation> 00010 // 00011 // Author: Lindsey Gray 00012 // Created: 13.1.2005 00013 // 00014 // $Id: CSCTFTBPTData.cc,v 1.1 2007/04/26 23:39:19 kkotov Exp $ 00015 // 00016 // Revision History 00017 // $Log: CSCTFTBPTData.cc,v $ 00018 // Revision 1.1 2007/04/26 23:39:19 kkotov 00019 // 00020 // Moved old TB data format to a separate folder, attempted to unpack status digi 00021 // 00022 // Revision 1.2 2006/06/22 14:46:05 lgray 00023 // Forced commit of all code 00024 // 00025 // Revision 1.1 2006/06/22 00:34:18 lgray 00026 // Moved all data format classes here. Removed old Packages from nightly 00027 // 00028 // Revision 1.1 2006/02/22 23:16:42 lgray 00029 // First commit of test beam data format from UF 00030 // 00031 // Revision 1.2 2005/05/10 21:57:22 lgray 00032 // Bugfixes, stability issues fixed 00033 // 00034 // Revision 1.1 2005/02/14 21:01:32 lgray 00035 // First Commit from UF 00036 // 00037 // Revision 1.21 2004/10/12 00:09:07 tfcvs 00038 // DEA: update to Ntuple 00039 // 00040 // Revision 1.20 2004/06/13 12:06:14 tfcvs 00041 // DEA: closer to having beam dat ain sim 00042 // 00043 // Revision 1.19 2004/06/09 10:04:52 tfcvs 00044 // DEA 00045 // 00046 // Revision 1.18 2004/06/07 22:37:23 tfcvs 00047 // DEA 00048 // 00049 // Revision 1.17 2004/05/21 10:17:27 tfcvs 00050 // DEA: changes to analysis 00051 // 00052 // Revision 1.16 2004/05/18 22:25:54 tfcvs 00053 // DEA: change in location of Pt LUT 00054 // 00055 // Revision 1.15 2004/05/18 21:53:42 tfcvs 00056 // DEA: some print out 00057 // 00058 // Revision 1.14 2004/05/18 15:00:25 tfcvs 00059 // DEA: close to new SP data format 00060 // 00061 // Revision 1.13 2004/05/18 08:00:34 tfcvs 00062 // DEA: touch base 00063 // 00064 // 00065 // 00066 00067 // System include files 00068 #include <string.h> // memset 00069 // Package include files 00070 #include "EventFilter/CSCTFRawToDigi/src/CSCTFTBPTData.h" 00071 00072 // External package include files 00073 00074 // STL classes 00075 00076 // Constants, enums and typedefs 00077 00078 // CVS-based strings (Id and Tag with which file was checked out) 00079 static const char* const kIdString = "$Id: CSCTFTBPTData.cc,v 1.1 2007/04/26 23:39:19 kkotov Exp $"; 00080 static const char* const kTagString = "$Name: V02-15-07 $"; 00081 00082 // Static data member definitions 00083 00084 // Constructors and destructor 00085 CSCTFTBPTData::CSCTFTBPTData() 00086 {} 00087 00088 /*CSCTFTBPTData::~CSCTFTBPTData() 00089 {}*/ 00090 00091 CSCTFTBPTData::CSCTFTBPTData(const CSCTFTBPTData & parent) 00092 { 00093 //rear_pt_ = parent.rear_pt_; 00094 //front_pt_ = parent.front_pt_; 00095 memcpy(this,&parent,size()*sizeof(short)); 00096 00097 } 00098 00099 CSCTFTBPTData CSCTFTBPTData::operator=(const CSCTFTBPTData & parent) 00100 { 00101 memcpy(this,&parent,size()*sizeof(short)); 00102 //rear_pt_ = parent.rear_pt_; 00103 //front_pt_ = parent.front_pt_; 00104 return *this; 00105 } 00106 00107 unsigned int CSCTFTBPTData::ptLUT(int fr ) const 00108 { 00109 fr = (fr == 0 || fr ==1) ? fr : 0; 00110 // Rear 00111 if (fr == 0) return rear_pt_; 00112 // Front 00113 else return front_pt_; 00114 00115 } 00116 00117 std::ostream & operator<<(std::ostream & stream, const CSCTFTBPTData & ptData) 00118 { 00119 stream << "\t\tFront PT data : " << std::hex << ptData.ptLUT(1) << std::dec << std::endl; 00120 stream << "\t\tRear PT data : " << std::hex << ptData.ptLUT(0) << std::dec << std::endl; 00121 return stream; 00122 }