00001 #include "EventFilter/CSCRawToDigi/interface/CSCAnodeData.h" 00002 #include "EventFilter/CSCRawToDigi/interface/CSCALCTHeader.h" 00003 #include "EventFilter/CSCRawToDigi/interface/CSCAnodeData2006.h" 00004 #include "EventFilter/CSCRawToDigi/interface/CSCAnodeData2007.h" 00005 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00006 #include <string.h> // for bzero 00007 00008 00009 00010 00011 CSCAnodeData::CSCAnodeData(const CSCALCTHeader & header) 00012 : firmwareVersion(header.alctFirmwareVersion()) 00013 { 00014 if(firmwareVersion == 2006) { 00015 theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header)); 00016 } else { 00017 theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header)); 00018 } 00019 } 00020 00021 00022 // initialize 00023 CSCAnodeData::CSCAnodeData(const CSCALCTHeader & header , 00024 const unsigned short *buf) 00025 : firmwareVersion(header.alctFirmwareVersion()) 00026 { 00027 if(firmwareVersion == 2006) { 00028 theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2006(header, buf)); 00029 } else { 00030 theData = boost::shared_ptr<CSCAnodeDataFormat>(new CSCAnodeData2007(header, buf)); 00031 } 00032 } 00033 00034 std::vector < std::vector<CSCWireDigi> > CSCAnodeData::wireDigis() const 00035 { 00036 std::vector < std::vector<CSCWireDigi> > result; 00037 for (int layer = 1; layer <= 6; ++layer) 00038 { 00039 result.push_back(wireDigis(layer)); 00040 } 00041 return result; 00042 } 00043