CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
FEDRawData Class Reference

#include <FEDRawData.h>

Public Types

typedef std::vector< unsigned char > Data
 
typedef Data::iterator iterator
 

Public Member Functions

const unsigned char * data () const
 Return a const pointer to the beginning of the data buffer. More...
 
unsigned char * data ()
 Return a pointer to the beginning of the data buffer. More...
 
 FEDRawData ()
 Default ctor. More...
 
 FEDRawData (size_t newsize, size_t wordsize=8)
 
 FEDRawData (const FEDRawData &)
 Copy constructor. More...
 
FEDRawDataoperator= (const FEDRawData &)=default
 Assignment operator. More...
 
void resize (size_t newsize, size_t wordsize=8)
 
size_t size () const
 Lenght of the data buffer in bytes. More...
 
 ~FEDRawData ()
 Dtor. More...
 

Private Attributes

Data data_
 

Detailed Description

Class representing the raw data for one FED. The raw data is owned as a binary buffer. It is required that the lenght of the data is a multiple of the S-Link64 word lenght (8 byte). The FED data should include the standard FED header and trailer.

Author
G. Bruno - CERN, EP Division
S. Argiro - CERN and INFN - Refactoring and Modifications to fit into CMSSW

Definition at line 19 of file FEDRawData.h.

Member Typedef Documentation

◆ Data

typedef std::vector<unsigned char> FEDRawData::Data

Definition at line 21 of file FEDRawData.h.

◆ iterator

typedef Data::iterator FEDRawData::iterator

Definition at line 22 of file FEDRawData.h.

Constructor & Destructor Documentation

◆ FEDRawData() [1/3]

FEDRawData::FEDRawData ( )

Default ctor.

Definition at line 14 of file FEDRawData.cc.

14 {}

◆ FEDRawData() [2/3]

FEDRawData::FEDRawData ( size_t  newsize,
size_t  wordsize = 8 
)

Ctor specifying the size to be preallocated, in bytes. It is required that the size is a multiple of the size of a FED word (8 bytes default)

Definition at line 16 of file FEDRawData.cc.

References Exception.

16  : data_(newsize) {
17  if (newsize % wordsize != 0)
18  throw cms::Exception("DataCorrupt") << "FEDRawData::resize: " << newsize << " is not a multiple of " << wordsize
19  << " bytes." << endl;
20 }
Data data_
Definition: FEDRawData.h:55

◆ FEDRawData() [3/3]

FEDRawData::FEDRawData ( const FEDRawData in)

Copy constructor.

Definition at line 22 of file FEDRawData.cc.

22 : data_(in.data_) {}
Data data_
Definition: FEDRawData.h:55

◆ ~FEDRawData()

FEDRawData::~FEDRawData ( )

Dtor.

Definition at line 23 of file FEDRawData.cc.

23 {}

Member Function Documentation

◆ data() [1/2]

const unsigned char * FEDRawData::data ( ) const

Return a const pointer to the beginning of the data buffer.

Definition at line 24 of file FEDRawData.cc.

References data_.

Referenced by RawTask::_process(), ESFEDIntegrityTask::analyze(), ESRawDataTask::analyze(), CSCFileDumper::analyze(), L1TMP7ZeroSupp::analyze(), HcalTBWriter::analyze(), RawToText::analyze(), BxTiming::analyze(), SiPixelRawDataErrorSource::analyze(), DQMHcalPhiSymAlCaReco::analyze(), SiStripFEDCheckPlugin::analyze(), BlockFormatter::CleanUp(), SRBlockFormatter::DigiToRaw(), TCCBlockFormatter::DigiToRaw(), TowerBlockFormatter::DigiToRaw(), BlockFormatter::DigiToRaw(), CSCOfflineMonitor::doBXMonitor(), TowerBlockFormatter::EndEvent(), DataModeFRD::fillFEDRawDataCollection(), FedRawDataInputSource::fillFEDRawDataCollection(), DaqFakeReader::fillFEDs(), DataModeFRDStriped::fillFRDCollection(), DTTFFEDSim::fillRawData(), DataModeScoutingRun3::fillSDSRawDataCollection(), DaqFakeReader::fillTCDSFED(), HLTDTROMonitorFilter::filter(), TMTFilter::filter(), HcalEmptyEventFilter::filter(), HcalCalibTypeFilter::filter(), HLTHcalCalibTypeFilter::filter(), l1t::AMCDumpToRaw::formatRaw(), l1t::MP7BufferDumpToRaw::formatRaw(), GEMAMC13Status::GEMAMC13Status(), sistrip::FEDBufferGenerator::generateBuffer(), L1UpgradeTfMuonTreeProducer::getAlgoFwVersion(), HLTHcalNZSFilter::hltFilter(), EcalFEDErrorFilter::hltFilter(), SiStripDCSStatus::initialise(), TableDataFormatter::interpretRawData(), EcalSupervisorTBDataFormatter::interpretRawData(), CamacTBDataFormatter::interpretRawData(), EcalTBDaqFormatter::interpretRawData(), EcalTB07DaqFormatter::interpretRawData(), sistrip::SpyEventMatcher::mergeMatchingData(), CSCFileReader::nextEventFromFUs(), sistrip::preconstructCheckFEDBuffer(), sistrip::preconstructCheckFEDBufferBase(), sistrip::preconstructCheckFEDSpyBuffer(), BlockFormatter::print(), DTuROSRawToDigi::process(), DTTFFEDReader::process(), DTuROSDigiToRaw::process(), L1TTwinMuxRawToDigi::processFed(), RawDataCollectorByLabel::produce(), HcalCalibFEDSelector::produce(), Phase2Tracker::Phase2TrackerCommissioningDigiProducer::produce(), SubdetFEDSelector::produce(), HcalTBSource::produce(), DTUnpackingModule::produce(), RPCAMCRawToDigi::produce(), Phase2Tracker::Phase2TrackerDigiProducer::produce(), SiStripRegFEDSelector::produce(), ScGMTRawToDigi::produce(), ScBMTFRawToDigi::produce(), ECALRegFEDSelector::produce(), sistrip::SpyEventSummaryProducer::produce(), GEMRawToDigiModule::produce(), CSCTFUnpacker::produce(), RPCTwinMuxRawToDigi::produce(), LTCRawToDigi::produce(), ScalersRawToDigi::produce(), TcdsRawToDigi::produce(), TextToRaw::produce(), dqmBmtfAlgoSelector::L1TBMTFAlgoSelector::produce(), EcalFEDWithCRCErrorProducer::produce(), GctRawToDigi::produce(), EcalRawToDigi::produce(), L1GTEvmDigiToRaw::produce(), l1t::L1TRawToDigi::produce(), OnlineMetaDataRawToDigi::produce(), l1t::L1TDigiToRaw::produce(), L1GTDigiToRaw::produce(), l1t::AMC13DumpToRaw::produce(), omtf::OmtfPacker::produce(), L1GlobalTriggerEvmRawToDigi::produce(), HcalUHTRTableProducer::produce(), AlCaHcalNoiseProducer::produce(), L1GlobalTriggerRawToDigi::produce(), CSCDCCUnpacker::produce(), SelectedElectronFEDListProducer< TEle, TCand >::produce(), RPCPackingModule::rawData(), LmfSource::readEventWithinFile(), HcalTriggerPrimitiveAlgo::runFEFormatError(), RawDataFEDSelector::select(), FRDStreamSource::setRunAndEventInfo(), sistrip::RawToDigiUnpacker::triggerFed(), hcaltb::HcalTBQADCUnpacker::unpack(), HcalLaserUnpacker::unpack(), hcaltb::HcalTBSourcePositionDataUnpacker::unpack(), hcaltb::HcalTBTriggerDataUnpacker::unpack(), CastorCtdcUnpacker::unpack(), CastorUnpacker::unpack(), ZdcUnpacker::unpack(), HcalUnpacker::unpack(), hcaltb::HcalTBTDCUnpacker::unpackHits(), hcaltb::HcalTBSlowDataUnpacker::unpackMaps(), ScCaloRawToDigi::unpackOrbitFromDMA(), ScCaloRawToDigi::unpackTcpData(), HcalUnpacker::unpackUMNio(), HcalUnpacker::unpackUTCA(), HcalUnpacker::unpackVME(), FRDOutputModule::write(), and RawEventOutputModuleForBU< Consumer >::write().

24 { return data_.data(); }
Data data_
Definition: FEDRawData.h:55

◆ data() [2/2]

unsigned char * FEDRawData::data ( )

Return a pointer to the beginning of the data buffer.

Definition at line 26 of file FEDRawData.cc.

References data_.

26 { return data_.data(); }
Data data_
Definition: FEDRawData.h:55

◆ operator=()

FEDRawData& FEDRawData::operator= ( const FEDRawData )
default

Assignment operator.

◆ resize()

void FEDRawData::resize ( size_t  newsize,
size_t  wordsize = 8 
)

Resize to the specified size in bytes. It is required that the size is a multiple of the size of a FED word (8 bytes default)

Definition at line 28 of file FEDRawData.cc.

References data_, Exception, and size().

Referenced by BlockFormatter::CleanUp(), SRBlockFormatter::DigiToRaw(), TCCBlockFormatter::DigiToRaw(), TowerBlockFormatter::DigiToRaw(), BlockFormatter::DigiToRaw(), DataModeFRD::fillFEDRawDataCollection(), FedRawDataInputSource::fillFEDRawDataCollection(), DaqFakeReader::fillFEDs(), DataModeFRDStriped::fillFRDCollection(), DTTFFEDSim::fillRawData(), DataModeScoutingRun3::fillSDSRawDataCollection(), DaqFakeReader::fillTCDSFED(), l1t::AMCDumpToRaw::formatRaw(), l1t::MP7BufferDumpToRaw::formatRaw(), sistrip::FEDBufferGenerator::generateBuffer(), CSCFileReader::nextEventFromFUs(), DTuROSDigiToRaw::process(), HcalCalibFEDSelector::produce(), RawDataCollectorByLabel::produce(), SubdetFEDSelector::produce(), HcalTBSource::produce(), SiStripRegFEDSelector::produce(), ECALRegFEDSelector::produce(), HGCalSlinkEmulator::produce(), TextToRaw::produce(), EcalFEDWithCRCErrorProducer::produce(), L1GTEvmDigiToRaw::produce(), l1t::L1TDigiToRaw::produce(), L1GTDigiToRaw::produce(), l1t::AMC13DumpToRaw::produce(), omtf::OmtfPacker::produce(), AlCaHcalNoiseProducer::produce(), SelectedElectronFEDListProducer< TEle, TCand >::produce(), LmfSource::readEventWithinFile(), RawDataFEDSelector::select(), FRDStreamSource::setRunAndEventInfo(), and LmfSource::setRunAndEventInfo().

28  {
29  if (size() == newsize)
30  return;
31 
32  data_.resize(newsize);
33 
34  if (newsize % wordsize != 0)
35  throw cms::Exception("DataCorrupt") << "FEDRawData::resize: " << newsize << " is not a multiple of " << wordsize
36  << " bytes." << endl;
37 }
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:48
Data data_
Definition: FEDRawData.h:55

◆ size()

size_t FEDRawData::size ( void  ) const
inline

Lenght of the data buffer in bytes.

Definition at line 48 of file FEDRawData.h.

References data_.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), RawTask::_process(), MatacqProducer::addMatacqData(), ESFEDIntegrityTask::analyze(), ESRawDataTask::analyze(), CSCFileDumper::analyze(), myRawAna::analyze(), L1TMP7ZeroSupp::analyze(), GEMPackingTester::analyze(), HcalTBWriter::analyze(), RawToText::analyze(), SiPixelRawDataErrorSource::analyze(), DQMHcalPhiSymAlCaReco::analyze(), SiStripFEDCheckPlugin::analyze(), SiStripFEDMonitorPlugin::analyze(), EcalSelectiveReadoutValidation::analyzeDataVolume(), HcalTBWriter::buildTree(), BlockFormatter::CleanUp(), sistrip::RawToDigiUnpacker::createDigis(), sistrip::DigiToRaw::createFedBuffers_(), SRBlockFormatter::DigiToRaw(), TowerBlockFormatter::DigiToRaw(), TCCBlockFormatter::DigiToRaw(), BlockFormatter::DigiToRaw(), CSCOfflineMonitor::doBXMonitor(), TowerBlockFormatter::EndEvent(), HLTDTROMonitorFilter::filter(), HcalEmptyEventFilter::filter(), HLTHcalCalibTypeFilter::filter(), HcalCalibTypeFilter::filter(), GEMAMC13Status::GEMAMC13Status(), L1UpgradeTfMuonTreeProducer::getAlgoFwVersion(), LaserSorter::getOutputFedList(), HLTFEDSizeFilter::hltFilter(), HLTHcalNZSFilter::hltFilter(), EcalFEDErrorFilter::hltFilter(), SiStripDCSStatus::initialise(), TableDataFormatter::interpretRawData(), EcalSupervisorTBDataFormatter::interpretRawData(), CamacTBDataFormatter::interpretRawData(), EcalTBDaqFormatter::interpretRawData(), EcalTB07DaqFormatter::interpretRawData(), sistrip::SpyEventMatcher::mergeMatchingData(), sistrip::preconstructCheckFEDBufferBase(), BlockFormatter::print(), BlockFormatter::PrintSizes(), DTuROSRawToDigi::process(), DTTFFEDReader::process(), L1TTwinMuxRawToDigi::processFed(), RawDataCollectorByLabel::produce(), HcalCalibFEDSelector::produce(), Phase2Tracker::Phase2TrackerCommissioningDigiProducer::produce(), evf::EvFFEDSelector::produce(), SubdetFEDSelector::produce(), DTUnpackingModule::produce(), SiStripRegFEDSelector::produce(), Phase2Tracker::Phase2TrackerDigiProducer::produce(), RPCAMCRawToDigi::produce(), ScGMTRawToDigi::produce(), CTPPSPixelRawToDigi::produce(), ScBMTFRawToDigi::produce(), ECALRegFEDSelector::produce(), sistrip::SpyEventSummaryProducer::produce(), HcalRawToDigi::produce(), GEMRawToDigiModule::produce(), CSCTFUnpacker::produce(), CastorRawToDigi::produce(), RPCTwinMuxRawToDigi::produce(), LTCRawToDigi::produce(), ScalersRawToDigi::produce(), dqmBmtfAlgoSelector::L1TBMTFAlgoSelector::produce(), TcdsRawToDigi::produce(), RctRawToDigi::produce(), EcalFEDWithCRCErrorProducer::produce(), GctRawToDigi::produce(), L1GTEvmDigiToRaw::produce(), EcalRawToDigi::produce(), l1t::L1TRawToDigi::produce(), OnlineMetaDataRawToDigi::produce(), L1GTDigiToRaw::produce(), l1t::AMC13DumpToRaw::produce(), l1t::AMCDumpToRaw::produce(), L1GlobalTriggerEvmRawToDigi::produce(), AlCaHcalNoiseProducer::produce(), l1t::MP7BufferDumpToRaw::produce(), L1GlobalTriggerRawToDigi::produce(), CSCDCCUnpacker::produce(), RPCPackingModule::rawData(), LmfSource::readEventWithinFile(), resize(), HcalTriggerPrimitiveAlgo::runFEFormatError(), ecaldqm::SelectiveReadoutTask::runOnSource(), RawDataFEDSelector::select(), sistrip::RawToDigiUnpacker::triggerFed(), hcaltb::HcalTBQADCUnpacker::unpack(), HcalLaserUnpacker::unpack(), hcaltb::HcalTBTriggerDataUnpacker::unpack(), hcaltb::HcalTBSourcePositionDataUnpacker::unpack(), CastorCtdcUnpacker::unpack(), CastorUnpacker::unpack(), ZdcUnpacker::unpack(), HcalUnpacker::unpack(), hcaltb::HcalTBTDCUnpacker::unpackHits(), hcaltb::HcalTBSlowDataUnpacker::unpackMaps(), ScCaloRawToDigi::unpackOrbitFromDMA(), ScCaloRawToDigi::unpackTcpData(), HcalUnpacker::unpackVME(), FRDOutputModule::write(), and RawEventOutputModuleForBU< Consumer >::write().

48 { return data_.size(); }
Data data_
Definition: FEDRawData.h:55

Member Data Documentation

◆ data_

Data FEDRawData::data_
private

Definition at line 55 of file FEDRawData.h.

Referenced by data(), resize(), and size().