CMS 3D CMS Logo

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

#include <CTPPSPixelDigiCollection.h>

Public Types

typedef std::vector< CTPPSPixelDigi >::const_iterator ContainerIterator
 
typedef std::pair< unsigned int, unsigned int > IndexRange
 
typedef std::pair< ContainerIterator, ContainerIteratorRange
 
typedef std::map< unsigned int, IndexRangeRegistry
 
typedef std::map< unsigned int, IndexRange >::const_iterator RegistryIterator
 

Public Member Functions

 CTPPSPixelDigiCollection ()
 
const std::vector< unsigned int > detIDs () const
 
const Range get (unsigned int detID) const
 
void put (Range input, unsigned int detID)
 

Private Attributes

std::vector< CTPPSPixelDigicontainer_
 
Registry map_
 

Detailed Description

Definition at line 9 of file CTPPSPixelDigiCollection.h.

Member Typedef Documentation

◆ ContainerIterator

typedef std::vector<CTPPSPixelDigi>::const_iterator CTPPSPixelDigiCollection::ContainerIterator

Definition at line 11 of file CTPPSPixelDigiCollection.h.

◆ IndexRange

typedef std::pair<unsigned int, unsigned int> CTPPSPixelDigiCollection::IndexRange

Definition at line 13 of file CTPPSPixelDigiCollection.h.

◆ Range

Definition at line 12 of file CTPPSPixelDigiCollection.h.

◆ Registry

typedef std::map<unsigned int, IndexRange> CTPPSPixelDigiCollection::Registry

Definition at line 14 of file CTPPSPixelDigiCollection.h.

◆ RegistryIterator

typedef std::map<unsigned int, IndexRange>::const_iterator CTPPSPixelDigiCollection::RegistryIterator

Definition at line 15 of file CTPPSPixelDigiCollection.h.

Constructor & Destructor Documentation

◆ CTPPSPixelDigiCollection()

CTPPSPixelDigiCollection::CTPPSPixelDigiCollection ( )
inline

Definition at line 17 of file CTPPSPixelDigiCollection.h.

17 {}

Member Function Documentation

◆ detIDs()

const std::vector< unsigned int > CTPPSPixelDigiCollection::detIDs ( ) const

returns vector of detIDs in map

Definition at line 45 of file CTPPSPixelDigiCollection.cc.

45  {
47 
48  auto begin = map_.begin();
49  auto end = map_.end();
50 
51  std::vector<unsigned int> output;
52  output.reserve(12);
53 
54  for (; begin != end; ++begin) {
55  output.push_back(begin->first);
56  }
57 
58  return output;
59 }

References mps_fire::end, map_, and convertSQLitetoXML_cfg::output.

◆ get()

const CTPPSPixelDigiCollection::Range CTPPSPixelDigiCollection::get ( unsigned int  detID) const

◆ put()

void CTPPSPixelDigiCollection::put ( Range  input,
unsigned int  detID 
)

put in Digis of detID

store size of vector before put

fill input in temporary vector for sorting

fill map

Definition at line 5 of file CTPPSPixelDigiCollection.cc.

5  {
7 
10 
12  std::vector<CTPPSPixelDigi> temporary;
13 
14  auto sort_begin = input.first;
15  auto sort_end = input.second;
16 
17  temporary.insert(std::end(temporary), sort_begin, sort_end);
18 
19  std::sort(temporary.begin(), temporary.end());
20 
21  inputRange.first = container_.size();
22  container_.insert(std::end(container_), std::begin(temporary), std::end(temporary));
23  inputRange.second = container_.size() - 1;
24 
26  map_[detID] = inputRange;
27 }

References container_, mps_fire::end, input, pileupCalc::inputRange, map_, and jetUpdater_cfi::sort.

Member Data Documentation

◆ container_

std::vector<CTPPSPixelDigi> CTPPSPixelDigiCollection::container_
private

Definition at line 24 of file CTPPSPixelDigiCollection.h.

Referenced by get(), and put().

◆ map_

Registry CTPPSPixelDigiCollection::map_
private

Definition at line 25 of file CTPPSPixelDigiCollection.h.

Referenced by detIDs(), get(), and put().

CTPPSPixelDigiCollection::IndexRange
std::pair< unsigned int, unsigned int > IndexRange
Definition: CTPPSPixelDigiCollection.h:13
CTPPSPixelDigiCollection::container_
std::vector< CTPPSPixelDigi > container_
Definition: CTPPSPixelDigiCollection.h:24
input
static const std::string input
Definition: EdmProvDump.cc:48
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
pileupCalc.inputRange
inputRange
Definition: pileupCalc.py:218
mps_fire.end
end
Definition: mps_fire.py:242
CTPPSPixelDigiCollection::map_
Registry map_
Definition: CTPPSPixelDigiCollection.h:25
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
CTPPSPixelDigiCollection::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: CTPPSPixelDigiCollection.h:12