CMS 3D CMS Logo

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

#include <PixelDigiCollection.h>

Public Types

typedef std::vector< PixelDigi >::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

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

Private Attributes

std::vector< PixelDigicontainer_
 
Registry map_
 

Detailed Description

Definition at line 9 of file PixelDigiCollection.h.

Member Typedef Documentation

◆ ContainerIterator

typedef std::vector<PixelDigi>::const_iterator PixelDigiCollection::ContainerIterator

Definition at line 11 of file PixelDigiCollection.h.

◆ IndexRange

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

Definition at line 13 of file PixelDigiCollection.h.

◆ Range

Definition at line 12 of file PixelDigiCollection.h.

◆ Registry

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

Definition at line 14 of file PixelDigiCollection.h.

◆ RegistryIterator

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

Definition at line 15 of file PixelDigiCollection.h.

Constructor & Destructor Documentation

◆ PixelDigiCollection()

PixelDigiCollection::PixelDigiCollection ( )
inline

Definition at line 17 of file PixelDigiCollection.h.

17 {}

Member Function Documentation

◆ detIDs()

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

Definition at line 55 of file PixelDigiCollection.cc.

55  {
56  // returns vector of detIDs in map
57 
60 
61  std::vector<unsigned int> output;
62 
63  for (; begin != end; ++begin) {
64  output.push_back(begin->first);
65  }
66 
67  return output;
68 }

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

◆ get()

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

◆ put()

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

Definition at line 5 of file PixelDigiCollection.cc.

5  {
6  // put in Digis of detID
7 
8  // store size of vector before put
10 
11  // put in PixelDigis from input
12  bool first = true;
13 
14  // fill input in temporary vector for sorting
15  std::vector<PixelDigi> temporary;
18  for (; sort_begin != sort_end; ++sort_begin) {
19  temporary.push_back(*sort_begin);
20  }
21  std::sort(temporary.begin(), temporary.end());
22 
23  // iterators over input
24  PixelDigiCollection::ContainerIterator begin = temporary.begin();
26  for (; begin != end; ++begin) {
27  container_.push_back(*begin);
28  if (first) {
29  inputRange.first = container_.size() - 1;
30  first = false;
31  }
32  }
33  inputRange.second = container_.size() - 1;
34 
35  // fill map
36  map_[detID] = inputRange;
37 }

References container_, mps_fire::end, dqmdumpme::first, input, pileupCalc::inputRange, and map_.

Member Data Documentation

◆ container_

std::vector<PixelDigi> PixelDigiCollection::container_
private

Definition at line 24 of file PixelDigiCollection.h.

Referenced by get(), and put().

◆ map_

Registry PixelDigiCollection::map_
private

Definition at line 25 of file PixelDigiCollection.h.

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

PixelDigiCollection::IndexRange
std::pair< unsigned int, unsigned int > IndexRange
Definition: PixelDigiCollection.h:13
input
static const std::string input
Definition: EdmProvDump.cc:48
PixelDigiCollection::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: PixelDigiCollection.h:12
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
PixelDigiCollection::RegistryIterator
std::map< unsigned int, IndexRange >::const_iterator RegistryIterator
Definition: PixelDigiCollection.h:15
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
dqmdumpme.first
first
Definition: dqmdumpme.py:55
pileupCalc.inputRange
inputRange
Definition: pileupCalc.py:218
mps_fire.end
end
Definition: mps_fire.py:242
PixelDigiCollection::map_
Registry map_
Definition: PixelDigiCollection.h:25
PixelDigiCollection::ContainerIterator
std::vector< PixelDigi >::const_iterator ContainerIterator
Definition: PixelDigiCollection.h:11
PixelDigiCollection::container_
std::vector< PixelDigi > container_
Definition: PixelDigiCollection.h:24