25 #ifndef genfit_MeasurementFactory_h
26 #define genfit_MeasurementFactory_h
50 template <
class measurement_T>
53 std::map<int, AbsMeasurementProducer<measurement_T>*>
hitProdMap_;
96 template <
class measurement_T>
98 typename std::map<int, AbsMeasurementProducer<measurement_T>*>::iterator
it = hitProdMap_.find(detID);
99 if(it == hitProdMap_.end()) {
100 hitProdMap_[detID] = hitProd;
102 Exception exc(
"MeasurementFactory: detID already in use",__LINE__,__FILE__);
104 std::vector<double> numbers;
105 numbers.push_back(detID);
111 template <
class measurement_T>
113 typename std::map<int, AbsMeasurementProducer<measurement_T>*>::iterator
it=hitProdMap_.begin();
114 while(it!=hitProdMap_.end()){
121 template <
class measurement_T>
123 typename std::map<int, AbsMeasurementProducer<measurement_T>*>::const_iterator
it = hitProdMap_.find(detID);
125 if(it != hitProdMap_.end()) {
126 return it->second->produce(index, hit);
128 Exception exc(
"MeasurementFactory: no hitProducer for this detID available",__LINE__,__FILE__);
130 std::vector<double> numbers;
131 numbers.push_back(detID);
137 template <
class measurement_T>
139 typename std::vector<measurement_T*> hitVec;
141 for(
unsigned int i=0;
i<nHits;
i++) {
154 #endif // genfit_MeasurementFactory_h