#include <DataFrameContainer.h>
Classes | |
struct | IterHelp |
Public Types | |
typedef std::vector< data_type > ::const_iterator | const_DataIter |
typedef std::vector< id_type > ::const_iterator | const_IdIter |
typedef boost::transform_iterator < IterHelp, boost::counting_iterator< int > > | const_iterator |
typedef std::pair < const_IdIter, const_DataIter > | const_IterPair |
typedef unsigned short | data_type |
typedef std::vector< data_type > | DataContainer |
typedef std::vector< data_type > ::iterator | DataIter |
typedef unsigned int | id_type |
typedef std::vector< id_type > | IdContainer |
typedef std::vector< id_type > ::iterator | IdIter |
typedef std::pair< IdIter, DataIter > | IterPair |
typedef unsigned int | size_type |
Public Member Functions | |
DataFrame | back () |
const_iterator | begin () const |
DataFrameContainer (size_t istride, int isubdet=0, size_t isize=0) | |
DataFrameContainer () | |
bool | empty () const |
const_iterator | end () const |
const_iterator | find (id_type i) const |
data_type const * | frame (size_t cell) const |
id_type | id (size_t cell) const |
data_type | operator() (size_t cell, size_t frame) const |
DataFrameContainer & | operator= (DataFrameContainer const &rhs) |
DataFrame | operator[] (size_t i) |
DataFrame | operator[] (size_t i) const |
IterPair | pair (size_t i) |
const_IterPair | pair (size_t i) const |
void | pop_back () |
void | push_back (id_type iid, data_type const *idata) |
void | push_back (id_type iid) |
void | reserve (size_t isize) |
void | resize (size_t isize) |
void | set_back (data_type const *idata) |
void | set_back (id_type iid, data_type const *idata) |
void | set_back (id_type iid) |
size_type | size () const |
void | sort () |
size_type | stride () const |
int | subdetId () const |
void | swap (IdContainer &iic, DataContainer &idc) |
void | swap (DataFrameContainer &rh) |
Private Attributes | |
DataContainer | m_data |
IdContainer | m_ids |
size_type | m_stride |
int | m_subdetId |
an optitimized container that linearized a "vector of vector". It corresponds to a set of fixed size array of 16bit words each belonging to a "channel" identified by an 32bit id
FIXME interface to be finalized once use-cases fully identified
although it can be sorted internally it is strongly adviced to fill it already sorted....
Definition at line 24 of file DataFrameContainer.h.
typedef std::vector<data_type>::const_iterator edm::DataFrameContainer::const_DataIter |
Definition at line 35 of file DataFrameContainer.h.
typedef std::vector<id_type>::const_iterator edm::DataFrameContainer::const_IdIter |
Definition at line 34 of file DataFrameContainer.h.
typedef boost::transform_iterator<IterHelp,boost::counting_iterator<int> > edm::DataFrameContainer::const_iterator |
Definition at line 51 of file DataFrameContainer.h.
typedef std::pair<const_IdIter,const_DataIter> edm::DataFrameContainer::const_IterPair |
Definition at line 36 of file DataFrameContainer.h.
typedef unsigned short edm::DataFrameContainer::data_type |
Definition at line 28 of file DataFrameContainer.h.
typedef std::vector<data_type> edm::DataFrameContainer::DataContainer |
Definition at line 30 of file DataFrameContainer.h.
typedef std::vector<data_type>::iterator edm::DataFrameContainer::DataIter |
Definition at line 32 of file DataFrameContainer.h.
typedef unsigned int edm::DataFrameContainer::id_type |
Definition at line 27 of file DataFrameContainer.h.
typedef std::vector<id_type> edm::DataFrameContainer::IdContainer |
Definition at line 29 of file DataFrameContainer.h.
typedef std::vector<id_type>::iterator edm::DataFrameContainer::IdIter |
Definition at line 31 of file DataFrameContainer.h.
typedef std::pair<IdIter,DataIter> edm::DataFrameContainer::IterPair |
Definition at line 33 of file DataFrameContainer.h.
typedef unsigned int edm::DataFrameContainer::size_type |
Reimplemented in EcalDigiCollection, EBDigiCollection, EEDigiCollection, and ESDigiCollection.
Definition at line 26 of file DataFrameContainer.h.
edm::DataFrameContainer::DataFrameContainer | ( | ) | [inline] |
Definition at line 53 of file DataFrameContainer.h.
: m_subdetId(0), m_stride(0), m_ids(), m_data(){}
edm::DataFrameContainer::DataFrameContainer | ( | size_t | istride, |
int | isubdet = 0 , |
||
size_t | isize = 0 |
||
) | [inline, explicit] |
Definition at line 57 of file DataFrameContainer.h.
: m_subdetId(isubdet), m_stride(istride), m_ids(isize), m_data(isize*m_stride){}
DataFrame edm::DataFrameContainer::back | ( | ) | [inline] |
Definition at line 117 of file DataFrameContainer.h.
References size().
Referenced by EcalTB07DaqFormatter::interpretRawData(), EcalTBDaqFormatter::interpretRawData(), EcalBarrelRecHitsMaker::loadEcalBarrelRecHits(), EcalEndcapRecHitsMaker::loadEcalEndcapRecHits(), and EcalTBReadout::readOut().
{ return DataFrame(*this,size()-1); }
const_iterator edm::DataFrameContainer::begin | ( | void | ) | const [inline] |
Definition at line 152 of file DataFrameContainer.h.
Referenced by edm::DataMixingEMDigiWorker::addEMPileups(), edm::DataMixingEMDigiWorker::addEMSignals(), EcalTestPulseAnalyzer::analyze(), EcnaAnalyzer::analyze(), EcalABAnalyzer::analyze(), EcalLaserAnalyzer::analyze(), EcalPerEvtLaserAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), EcalDisplaysByEvent::makeHistos(), EcalDigiSelector::produce(), ESRecHitProducer::produce(), EcalSelectiveReadoutSuppressor::run(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::OccupancyTask::runOnDigis(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::TrigPrimTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::PresampleTask::runOnDigis(), EcalSelectiveReadoutValidation::setTtEtSums(), EcalSelectiveReadoutSuppressor::setTtFlags(), and ESUnpackerWorker::work().
{ return boost::make_transform_iterator(boost::counting_iterator<int>(0), IterHelp(*this)); }
bool edm::DataFrameContainer::empty | ( | ) | const [inline] |
const_iterator edm::DataFrameContainer::end | ( | void | ) | const [inline] |
Definition at line 156 of file DataFrameContainer.h.
References size().
Referenced by edm::DataMixingEMDigiWorker::addEMPileups(), edm::DataMixingEMDigiWorker::addEMSignals(), EcalEndcapRecHitsValidation::analyze(), EcalTestPulseAnalyzer::analyze(), EcnaAnalyzer::analyze(), EcalABAnalyzer::analyze(), EcalLaserAnalyzer::analyze(), EcalPerEvtLaserAnalyzer::analyze(), EcalLaserAnalyzer2::analyze(), EcalBarrelRecHitsValidation::analyze(), find(), EcalDisplaysByEvent::makeHistos(), EcalDigiSelector::produce(), ESRecHitProducer::produce(), EcalSelectiveReadoutSuppressor::run(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::OccupancyTask::runOnDigis(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::TrigPrimTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::PresampleTask::runOnDigis(), EcalSelectiveReadoutValidation::setTtEtSums(), EcalSelectiveReadoutSuppressor::setTtFlags(), and ESUnpackerWorker::work().
{ return boost::make_transform_iterator(boost::counting_iterator<int>(size()), IterHelp(*this)); }
const_iterator edm::DataFrameContainer::find | ( | id_type | i | ) | const [inline] |
Definition at line 145 of file DataFrameContainer.h.
References end(), i, m_ids, and AlCaHLTBitMon_ParallelJobs::p.
Referenced by EcalEndcapRecHitsValidation::analyze(), and EcalBarrelRecHitsValidation::analyze().
data_type const* edm::DataFrameContainer::frame | ( | size_t | cell | ) | const [inline] |
Definition at line 174 of file DataFrameContainer.h.
References m_data, and m_stride.
Referenced by operator()(), and edm::DataFrame::set().
id_type edm::DataFrameContainer::id | ( | size_t | cell | ) | const [inline] |
Definition at line 178 of file DataFrameContainer.h.
References m_ids.
Referenced by edm::DataFrame::set().
{ return m_ids[cell]; }
data_type edm::DataFrameContainer::operator() | ( | size_t | cell, |
size_t | frame | ||
) | const [inline] |
DataFrameContainer& edm::DataFrameContainer::operator= | ( | DataFrameContainer const & | rhs | ) | [inline] |
Definition at line 68 of file DataFrameContainer.h.
References swap(), and groupFilesInBlocks::temp.
{ DataFrameContainer temp(rhs); this->swap(temp); return *this; }
DataFrame edm::DataFrameContainer::operator[] | ( | size_t | i | ) | [inline] |
Definition at line 136 of file DataFrameContainer.h.
{ return DataFrame(*this,i); }
DataFrame edm::DataFrameContainer::operator[] | ( | size_t | i | ) | const [inline] |
Definition at line 140 of file DataFrameContainer.h.
{ return DataFrame(*this,i); }
IterPair edm::DataFrameContainer::pair | ( | size_t | i | ) | [inline] |
const_IterPair edm::DataFrameContainer::pair | ( | size_t | i | ) | const [inline] |
void edm::DataFrameContainer::pop_back | ( | ) | [inline] |
Definition at line 121 of file DataFrameContainer.h.
References m_data, m_ids, and m_stride.
Referenced by EcalTB07DaqFormatter::interpretRawData(), and EcalTBDaqFormatter::interpretRawData().
void edm::DataFrameContainer::push_back | ( | id_type | iid | ) | [inline] |
Reimplemented in ESDigiCollection.
Definition at line 99 of file DataFrameContainer.h.
Definition at line 92 of file DataFrameContainer.h.
References filterCSVwithJSON::copy, m_data, m_ids, and m_stride.
Referenced by EcalTB07DaqFormatter::interpretRawData(), EcalTBDaqFormatter::interpretRawData(), EcalBarrelRecHitsMaker::loadEcalBarrelRecHits(), EcalEndcapRecHitsMaker::loadEcalEndcapRecHits(), EcalTBReadout::readOut(), and EcalSelectiveReadoutSuppressor::run().
void edm::DataFrameContainer::reserve | ( | size_t | isize | ) | [inline] |
Definition at line 79 of file DataFrameContainer.h.
References m_data, m_ids, and m_stride.
Referenced by EcalTB07DaqFormatter::interpretRawData(), EcalTBDaqFormatter::interpretRawData(), EcalBarrelRecHitsMaker::loadEcalBarrelRecHits(), EcalEndcapRecHitsMaker::loadEcalEndcapRecHits(), EcalSelectiveReadoutSuppressor::run(), and ESDigitizer::run().
void edm::DataFrameContainer::resize | ( | size_t | isize | ) | [inline] |
void edm::DataFrameContainer::set_back | ( | id_type | iid | ) | [inline] |
void edm::DataFrameContainer::set_back | ( | data_type const * | idata | ) | [inline] |
Definition at line 112 of file DataFrameContainer.h.
References filterCSVwithJSON::copy, m_data, and m_stride.
size_type edm::DataFrameContainer::size | ( | void | ) | const [inline] |
Definition at line 168 of file DataFrameContainer.h.
References m_ids.
Referenced by edm::DataMixingEMDigiWorker::addEMPileups(), edm::DataMixingEMDigiWorker::addEMSignals(), EcnaAnalyzer::analyze(), EcalDigisValidation::analyze(), EcalMixingModuleValidation::analyze(), back(), EcalTBDigiProducer::cacheEEDigis(), end(), EcalZeroSuppressionProducer::produce(), ESRecHitProducer::produce(), EcalTBReadout::readOut(), EcalSelectiveReadoutSuppressor::run(), sort(), and ESUnpackerWorker::work().
{ return m_ids.size();}
void edm::DataFrameContainer::sort | ( | ) |
Definition at line 22 of file DataFrameContainer.cc.
References filterCSVwithJSON::copy, i, j, m_data, m_ids, m_stride, alignCSCRings::s, size(), and tmp.
{ if (size()<2) return; std::vector<int> indices(size(),1); indices[0]=0; std::partial_sum(indices.begin(),indices.end(),indices.begin()); std::sort(indices.begin(), indices.end(), TypeCompare(m_ids)); { IdContainer tmp(m_ids.size()); std::copy( boost::make_permutation_iterator( m_ids.begin(), indices.begin() ), boost::make_permutation_iterator( m_ids.end(), indices.end() ), tmp.begin()); tmp.swap(m_ids); } { // std::transform(indices.begin(),indices.end(),indices.begin(), // boost::bind(std::multiplies<int>(),m_stride,_1)); DataContainer tmp(m_data.size()); size_type s = m_stride*sizeof(data_type); for(size_type j=0, i=0; i!=indices.size(); ++i, j+=m_stride) ::memcpy(&tmp[j], &m_data[indices[i]*m_stride], s); tmp.swap(m_data); } }
size_type edm::DataFrameContainer::stride | ( | ) | const [inline] |
Definition at line 164 of file DataFrameContainer.h.
References m_stride.
Referenced by edm::DataFrame::set().
{ return m_stride; }
int edm::DataFrameContainer::subdetId | ( | ) | const [inline] |
void edm::DataFrameContainer::swap | ( | DataFrameContainer & | rh | ) | [inline] |
Definition at line 61 of file DataFrameContainer.h.
References m_data, m_ids, m_stride, and m_subdetId.
Referenced by operator=(), edm::swap(), and std::swap().
void edm::DataFrameContainer::swap | ( | IdContainer & | iic, |
DataContainer & | idc | ||
) | [inline] |
DataContainer edm::DataFrameContainer::m_data [private] |
Definition at line 193 of file DataFrameContainer.h.
Referenced by frame(), operator()(), pair(), pop_back(), push_back(), reserve(), resize(), set_back(), sort(), and swap().
IdContainer edm::DataFrameContainer::m_ids [private] |
Definition at line 192 of file DataFrameContainer.h.
Referenced by empty(), find(), id(), pair(), pop_back(), push_back(), reserve(), resize(), set_back(), size(), sort(), and swap().
size_type edm::DataFrameContainer::m_stride [private] |
Definition at line 190 of file DataFrameContainer.h.
Referenced by frame(), operator()(), pair(), pop_back(), push_back(), reserve(), resize(), set_back(), sort(), stride(), and swap().
int edm::DataFrameContainer::m_subdetId [private] |
Definition at line 187 of file DataFrameContainer.h.
Referenced by subdetId(), and swap().