CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
RecoCollectionFP420 Class Reference

#include <RecoCollectionFP420.h>

Public Types

typedef std::vector< RecoFP420 >
::const_iterator 
ContainerIterator
 
typedef std::pair< unsigned
int, unsigned int > 
IndexRange
 
typedef std::pair
< ContainerIterator,
ContainerIterator
Range
 
typedef std::map< unsigned int,
std::vector< RecoFP420 > > 
RecoFP420Container
 
typedef std::map< unsigned int,
IndexRange
Registry
 
typedef std::map< unsigned int,
IndexRange >::const_iterator 
RegistryIterator
 

Public Member Functions

void clear ()
 
const Range get (unsigned int stationID) const
 
void put (Range input, unsigned int stationID)
 
void putclear (Range input, unsigned int stationID)
 
 RecoCollectionFP420 ()
 
const std::vector< unsigned int > stationIDs () const
 

Private Attributes

std::vector< RecoFP420container_
 
Registry map_
 
RecoFP420Container trackMap_
 

Detailed Description

Definition at line 9 of file RecoCollectionFP420.h.

Member Typedef Documentation

typedef std::vector<RecoFP420>::const_iterator RecoCollectionFP420::ContainerIterator

Definition at line 11 of file RecoCollectionFP420.h.

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

Definition at line 13 of file RecoCollectionFP420.h.

Definition at line 12 of file RecoCollectionFP420.h.

typedef std::map<unsigned int, std::vector<RecoFP420> > RecoCollectionFP420::RecoFP420Container

Definition at line 16 of file RecoCollectionFP420.h.

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

Definition at line 14 of file RecoCollectionFP420.h.

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

Definition at line 15 of file RecoCollectionFP420.h.

Constructor & Destructor Documentation

RecoCollectionFP420::RecoCollectionFP420 ( )
inline

Definition at line 18 of file RecoCollectionFP420.h.

18 {}

Member Function Documentation

void RecoCollectionFP420::clear ( void  )

Definition at line 98 of file RecoCollectionFP420.cc.

Referenced by BeautifulSoup.Tag::setString().

98 { container_.clear(); }
std::vector< RecoFP420 > container_
const RecoCollectionFP420::Range RecoCollectionFP420::get ( unsigned int  stationID) const

Definition at line 70 of file RecoCollectionFP420.cc.

References gather_cfg::cout.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), FP420RecoMain::run(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().

70  {
71  // get RecHits of stationID
72 
73 #ifdef mydigidebug
74  std::cout << "RecoCollectionFP420::get:stationID= " << stationID << std::endl;
75 #endif
76  RecoCollectionFP420::RegistryIterator returnIndex = map_.find(stationID);
77  RecoCollectionFP420::IndexRange returnIndexRange = returnIndex->second;
78 #ifdef mydigidebug
79  std::cout << "RecoCollectionFP420::get1: returnIndexRange.first= " << returnIndexRange.first << std::endl;
80  std::cout << "RecoCollectionFP420::get1: returnIndexRange.second= " << returnIndexRange.second << std::endl;
81 #endif
82 
83  RecoCollectionFP420::Range returnRange;
84  returnRange.first = container_.begin() + returnIndexRange.first;
85  if (returnIndexRange.second != 0) {
86  returnRange.second = container_.begin() + returnIndexRange.second + 1;
87  } else {
88  returnRange.second = container_.begin() + returnIndexRange.second;
89  }
90 #ifdef mydigidebug
91  std::cout << "RecoCollectionFP420::get2: container_.size() = " << container_.size() << std::endl;
92  std::cout << "RecoCollectionFP420::get2: returnIndexRange.first= " << returnIndexRange.first << std::endl;
93  std::cout << "RecoCollectionFP420::get2: returnIndexRange.second= " << returnIndexRange.second << std::endl;
94 #endif
95  return returnRange;
96 }
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< RecoFP420 > container_
std::pair< unsigned int, unsigned int > IndexRange
std::map< unsigned int, IndexRange >::const_iterator RegistryIterator
tuple cout
Definition: gather_cfg.py:144
void RecoCollectionFP420::put ( RecoCollectionFP420::Range  input,
unsigned int  stationID 
)

Definition at line 13 of file RecoCollectionFP420.cc.

References SplitLinear::begin, gather_cfg::cout, dataset::end, first, and pileupCalc::inputRange.

Referenced by FP420RecoMain::run().

13  {
14  // put in RecHits of stationID
15 
16  // store size of vector before put
18 
19  // put in RecoFP420s from input
20  bool first = true;
21 
22  // fill input in temporary vector for sorting
23  std::vector<RecoFP420> temporary;
26 #ifdef mydigidebug
27  std::cout << " !!!!!!!!!!!!!!!! RecoCollectionFP420:: !!!! put !!!! start " << std::endl;
28 #endif
29  for (; sort_begin != sort_end; ++sort_begin) {
30 #ifdef mydigidebug
31  std::cout << "put: temporary.push_back " << std::endl;
32 #endif
33  temporary.push_back(*sort_begin);
34  }
35  std::sort(temporary.begin(), temporary.end());
36 
37  // iterators over input
40  for (; begin != end; ++begin) {
41  container_.push_back(*begin);
42  if (first) {
43  inputRange.first = container_.size() - 1;
44  // inputRange.first = container_.size();
45  first = false;
46  }
47  }
48 
49  // since we start from 0, then the last element will be size-1
50  if (!container_.empty()) {
51  inputRange.second = container_.size() - 1;
52  } else {
53  inputRange.first = container_.size();
54  inputRange.second = container_.size();
55  }
56 
57  // inputRange.second = container_.size()-1;
58  // //inputRange.second = container_.size();
59 
60 #ifdef mydigidebug
61  std::cout << "put: container_.size() = " << container_.size() << std::endl;
62  std::cout << "put: inputRange.first = " << inputRange.first << std::endl;
63  std::cout << "put: inputRange.second = " << inputRange.second << std::endl;
64 #endif
65 
66  // fill map
67  map_[stationID] = inputRange;
68 }
std::vector< RecoFP420 > container_
static std::string const input
Definition: EdmProvDump.cc:47
std::vector< RecoFP420 >::const_iterator ContainerIterator
std::pair< unsigned int, unsigned int > IndexRange
tuple inputRange
Definition: pileupCalc.py:168
string end
Definition: dataset.py:937
tuple cout
Definition: gather_cfg.py:144
void RecoCollectionFP420::putclear ( RecoCollectionFP420::Range  input,
unsigned int  stationID 
)

Definition at line 99 of file RecoCollectionFP420.cc.

References SplitLinear::begin, gather_cfg::cout, dataset::end, and pileupCalc::inputRange.

99  {
101 
102  std::vector<RecoFP420> temporary;
105  for (; sort_begin != sort_end; ++sort_begin) {
106  temporary.push_back(*sort_begin);
107  }
108  std::sort(temporary.begin(), temporary.end());
109 
110  // temporary.clear();
111  RecoCollectionFP420::ContainerIterator begin = temporary.begin();
113  for (; begin != end; ++begin) {
114  container_.push_back(*begin);
115  }
116  //container_.clear();
117  inputRange.first = container_.size() - container_.size();
118  inputRange.second = container_.size() - container_.size();
119 
120 #ifdef mydigidebug
121  std::cout << "putclear: container_.size() = " << container_.size() << std::endl;
122  std::cout << "putclear: inputRange.first = " << inputRange.first << std::endl;
123  std::cout << "putclear: inputRange.second = " << inputRange.second << std::endl;
124 #endif
125 
126  map_[stationID] = inputRange;
127 }
std::vector< RecoFP420 > container_
static std::string const input
Definition: EdmProvDump.cc:47
std::vector< RecoFP420 >::const_iterator ContainerIterator
std::pair< unsigned int, unsigned int > IndexRange
tuple inputRange
Definition: pileupCalc.py:168
string end
Definition: dataset.py:937
tuple cout
Definition: gather_cfg.py:144
const std::vector< unsigned int > RecoCollectionFP420::stationIDs ( ) const

Definition at line 129 of file RecoCollectionFP420.cc.

References SplitLinear::begin, gather_cfg::cout, dataset::end, and convertSQLitetoXML_cfg::output.

129  {
130  // returns vector of stationIDs in map
131 
132 #ifdef mydigidebug
133  std::cout << "RecoCollectionFP420::stationIDs:start " << std::endl;
134 #endif
137 
138  std::vector<unsigned int> output;
139 
140  for (; begin != end; ++begin) {
141  output.push_back(begin->first);
142  }
143 
144  return output;
145 }
string end
Definition: dataset.py:937
std::map< unsigned int, IndexRange >::const_iterator RegistryIterator
tuple cout
Definition: gather_cfg.py:144

Member Data Documentation

std::vector<RecoFP420> RecoCollectionFP420::container_
private

Definition at line 35 of file RecoCollectionFP420.h.

Registry RecoCollectionFP420::map_
private

Definition at line 36 of file RecoCollectionFP420.h.

RecoFP420Container RecoCollectionFP420::trackMap_
private

Definition at line 38 of file RecoCollectionFP420.h.