36 std::map<std::string,TMatrixT<Double_t>*>
::iterator it_here;
41 it_here->second =
new TMatrixT<Double_t>[
fNhits];
43 (it_here->second)[i] = (it->second)[i];
52 it_here->second =
new TMatrixT<Double_t>[
fNhits];
54 (it_here->second)[i] = (it->second)[i];
68 (ip_here->second)[i] = ((ip->second)[i]);
83 if (R__b.IsReading()) {
86 TObject::Streamer(R__b);
95 TMatrixT<Double_t>
mat;
100 for(
unsigned int i=0;i<nkeys;++i){
104 for(
int j=0;j<
fNhits;++j){
112 for(
unsigned int i=0;i<nkeys;++i){
116 for(
int j=0;j<
fNhits;++j){
124 for(
unsigned int i=0;i<nkeys;++i){
128 for(
int j=0;j<
fNhits;++j){
136 unsigned int nFailedHits;
138 unsigned int aFailedHit;
139 for(
unsigned int i=0;i<nFailedHits;++i){
146 TObject::Streamer(R__b);
151 std::vector<std::string> keys;
154 R__b << (
unsigned int)(keys.size());
155 for(
unsigned int i=0;i<keys.size();++i){
156 TString
s(keys.at(i));
158 for(
int j=0;j<
fNhits;++j){
159 ((
fMatrices[keys.at(i)])[j]).Streamer(R__b);
166 R__b << (
unsigned int)(keys.size());
167 for(
unsigned int i=0;i<keys.size();++i){
168 TString
s(keys.at(i));
170 for(
int j=0;j<
fNhits;++j){
171 ((
fPlanes[keys.at(i)])[j]).Streamer(R__b);
178 R__b << (
unsigned int)(keys.size());
179 for(
unsigned int i=0;i<keys.size();++i){
180 TString
s(keys.at(i));
182 for(
int j=0;j<
fNhits;++j){
183 ((
fNumbers[keys.at(i)])[j]).Streamer(R__b);
199 GFException exc(
"fNhits not defined",__LINE__,__FILE__);
203 std::ostringstream ostr;
204 ostr <<
"The key " << key
205 <<
" is already occupied in genf::GFBookkeeping::bookMatrices()";
214 GFException exc(
"fNhits not defined",__LINE__,__FILE__);
218 std::ostringstream ostr;
219 ostr <<
"The key " << key
220 <<
" is already occupied in genf::GFBookkeeping::bookGFDetPlanes()";
230 GFException exc(
"fNhits not defined",__LINE__,__FILE__);
234 std::ostringstream ostr;
235 ostr <<
"The key " << key
236 <<
" is already occupied in genf::GFBookkeeping::bookNumbers()";
241 for(
int i=0;i<
fNhits;++i){
249 const TMatrixT<Double_t>&
mat){
251 std::ostringstream ostr;
252 ostr <<
"The key " << key <<
" is unknown in genf::GFBookkeeping::setMatrix()";
256 if(index>=(
unsigned int)
fNhits){
257 std::ostringstream ostr;
258 ostr <<
"The index " << index
259 <<
" is out of range in genf::GFBookkeeping::setMatrix()";
269 std::ostringstream ostr;
270 ostr <<
"The key " << key <<
" is unknown in genf::GFBookkeeping::setGFDetPlane()";
274 if(index>=(
unsigned int)
fNhits){
275 std::ostringstream ostr;
276 ostr <<
"The index " << index
277 <<
" is out of range in genf::GFBookkeeping::setGFDetPlane()";
286 std::ostringstream ostr;
287 ostr <<
"The key " << key <<
" is unknown in genf::GFBookkeeping::setNumber()";
291 if(index>=(
unsigned int)
fNhits){
292 std::ostringstream ostr;
293 ostr <<
"The index " << index
294 <<
" is out of range in genf::GFBookkeeping::setNumber()";
298 ((
fNumbers[key])[index])[0][0] = num;
303 TMatrixT<Double_t>&
mat)
const {
306 std::ostringstream ostr;
307 ostr <<
"The key " << key <<
" is unknown in genf::GFBookkeeping::getMatrix()";
311 if(index>=(
unsigned int)
fNhits){
312 std::ostringstream ostr;
313 ostr <<
"The index " << index
314 <<
" is out of range in genf::GFBookkeeping::getMatrix()";
318 mat.ResizeTo(iMatrix->second[index]);
319 mat = iMatrix->second[index];
326 auto iPlane =
fPlanes.find(key);
328 std::ostringstream ostr;
329 ostr <<
"The key " << key <<
" is unknown in genf::GFBookkeeping::getGFDetPlane()";
333 if(index>=(
unsigned int)
fNhits){
334 std::ostringstream ostr;
335 ostr <<
"The index " << index
336 <<
" is out of range in genf::GFBookkeeping::getGFDetPlane()";
340 pl = iPlane->second[index];
348 std::ostringstream ostr;
349 ostr <<
"The key " << key <<
" is unknown in genf::GFBookkeeping::getNumber()";
353 if(index>=(
unsigned int)
fNhits){
354 std::ostringstream ostr;
355 ostr <<
"The index " << index
356 <<
" is out of range in genf::GFBookkeeping::getNumber()";
360 num = iNumber->second[index][0][0];
373 unsigned int retVal = 0;
394 for(
unsigned int i=0;i<matKeys.size();++i){
397 for(
unsigned int i=0;i<planeKeys.size();++i){
400 for(
unsigned int i=0;i<numKeys.size();++i){
407 std::map<std::string, TMatrixT<Double_t>* >
::iterator itMat;
409 if(itMat->second!=NULL)
delete [] itMat->second;
413 if(itPl->second!=NULL)
delete [] itPl->second;
415 std::map<std::string, TMatrixT<Double_t>* >
::iterator itNum;
417 if(itNum->second!=NULL)
delete [] itNum->second;
425 std::vector< std::string > keys;
428 if(it->second!=NULL) keys.push_back(it->first);
433 std::vector< std::string > keys;
436 if(it->second!=NULL) keys.push_back(it->first);
441 std::vector< std::string > keys;
444 if(it->second!=NULL) keys.push_back(it->first);
451 out <<
"=============genf::GFBookkeeping::print()==============" << std::endl;
452 out <<
"-----printing all matrices:------" << std::endl;
454 for(
unsigned int i=0;i<keys.size();++i){
455 out <<
"key " << keys.at(i) <<
" has " <<
fNhits 456 <<
" entries:" << std::endl;
457 for(
int j=0;j<
fNhits;++j){
458 TMatrixT<Double_t> m;
463 out <<
"-----printing all GFDetPlanes:------" << std::endl;
465 for(
unsigned int i=0;i<keys.size();++i){
466 out <<
"key " << keys.at(i) <<
" has " <<
fNhits 467 <<
" entries:" << std::endl;
468 for(
int j=0;j<
fNhits;++j){
474 out <<
"-----printing all numbers:------" << std::endl;
476 for(
unsigned int i=0;i<keys.size();++i){
477 out <<
"key " << keys.at(i) <<
" has " <<
fNhits 478 <<
" entries:" << std::endl;
479 for(
int j=0;j<
fNhits;++j){
482 out << n << std::endl;
485 out <<
"-----failed hits:------" << std::endl;
void setDetPlane(std::string key, unsigned int index, const GFDetPlane &pl)
std::map< std::string, TMatrixT< Double_t > * > fNumbers
void Print(std::ostream &out=std::cout) const
std::map< std::string, TMatrixT< Double_t > * > fMatrices
void setNumber(std::string key, unsigned int index, const double &num)
void Print(std::ostream &out=std::cout) const
void setMatrix(std::string key, unsigned int index, const TMatrixT< Double_t > &mat)
void addFailedHit(unsigned int)
void bookGFDetPlanes(std::string key)
unsigned int hitFailed(unsigned int)
std::vector< unsigned int > fFailedHits
bool getNumber(std::string key, unsigned int index, double &num) const
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
void bookMatrices(std::string key)
std::vector< std::string > getMatrixKeys() const
std::vector< std::string > getGFDetPlaneKeys() const
bool getMatrix(std::string key, unsigned int index, TMatrixT< Double_t > &mat) const
void bookNumbers(std::string key, double val=0.)
std::vector< std::string > getNumberKeys() const
std::map< std::string, GFDetPlane * > fPlanes
bool getDetPlane(std::string key, unsigned int index, GFDetPlane &pl) const
unsigned int getNumFailed()