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

#include <GFBookkeeping.h>

Inheritance diagram for genf::GFBookkeeping:

Public Member Functions

void reset ()
 
void setNhits (int n)
 
void bookMatrices (std::string key)
 
void bookGFDetPlanes (std::string key)
 
void bookNumbers (std::string key, double val=0.)
 
void setMatrix (std::string key, unsigned int index, const TMatrixT< Double_t > &mat)
 
void setDetPlane (std::string key, unsigned int index, const GFDetPlane &pl)
 
void setNumber (std::string key, unsigned int index, const double &num)
 
bool getMatrix (std::string key, unsigned int index, TMatrixT< Double_t > &mat) const
 
bool getDetPlane (std::string key, unsigned int index, GFDetPlane &pl) const
 
bool getNumber (std::string key, unsigned int index, double &num) const
 
std::vector< std::string > getMatrixKeys () const
 
std::vector< std::string > getGFDetPlaneKeys () const
 
std::vector< std::string > getNumberKeys () const
 
void addFailedHit (unsigned int)
 
unsigned int hitFailed (unsigned int)
 
unsigned int getNumFailed ()
 
 GFBookkeeping ()
 
 GFBookkeeping (const GFBookkeeping &)
 
virtual ~GFBookkeeping ()
 
void Streamer (TBuffer &)
 
void clearAll ()
 
void clearFailedHits ()
 
void Print (std::ostream &out=std::cout) const
 

Private Member Functions

GFBookkeepingoperator= (const GFBookkeeping &)=delete
 
virtual void Print (Option_t *) const
 

Private Attributes

std::map< std::string,
TMatrixT< Double_t > * > 
fMatrices
 
std::map< std::string,
GFDetPlane * > 
fPlanes
 
std::map< std::string,
TMatrixT< Double_t > * > 
fNumbers
 
std::vector< unsigned int > fFailedHits
 
int fNhits
 

Detailed Description

Definition at line 34 of file GFBookkeeping.h.

Constructor & Destructor Documentation

genf::GFBookkeeping::GFBookkeeping ( )
inline

Definition at line 72 of file GFBookkeeping.h.

72 : fNhits(-1) {}
genf::GFBookkeeping::GFBookkeeping ( const GFBookkeeping bk)

Definition at line 26 of file GFBookkeeping.cxx.

26  : TObject(bk) {
27  fNhits = bk.fNhits;
28  fMatrices = bk.fMatrices; //implicit copy constructor call
29  fNumbers = bk.fNumbers;
30  fPlanes = bk.fPlanes;
31  fFailedHits = bk.fFailedHits;
32 
33  //deep copy
34 
35  std::map<std::string,TMatrixT<Double_t>*>::const_iterator it;
36  std::map<std::string,TMatrixT<Double_t>*>::iterator it_here;
37 
38  it = bk.fMatrices.begin();
39  it_here = fMatrices.begin();
40  while(it!=bk.fMatrices.end()){
41  it_here->second = new TMatrixT<Double_t>[fNhits];
42  for(int i=0;i<fNhits;++i){
43  (it_here->second)[i] = (it->second)[i];
44  }
45  it++;
46  it_here++;
47  }
48 
49  it = bk.fNumbers.begin();
50  it_here = fNumbers.begin();
51  while(it!=bk.fNumbers.end()){
52  it_here->second = new TMatrixT<Double_t>[fNhits];
53  for(int i=0;i<fNhits;++i){
54  (it_here->second)[i] = (it->second)[i];
55  }
56  it++;
57  it_here++;
58  }
59 
60  std::map<std::string,genf::GFDetPlane*>::const_iterator ip;
61  std::map<std::string,genf::GFDetPlane*>::iterator ip_here;
62 
63  ip = bk.fPlanes.begin();
64  ip_here = fPlanes.begin();
65  while(ip!=bk.fPlanes.end()){
66  ip_here->second = new genf::GFDetPlane[fNhits];
67  for(int i=0;i<fNhits;++i){
68  (ip_here->second)[i] = ((ip->second)[i]);
69  }
70  ip++;
71  ip_here++;
72  }
73 
74 
75 }
std::map< std::string, TMatrixT< Double_t > * > fNumbers
Definition: GFBookkeeping.h:44
std::map< std::string, TMatrixT< Double_t > * > fMatrices
Definition: GFBookkeeping.h:39
std::vector< unsigned int > fFailedHits
Definition: GFBookkeeping.h:45
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40
virtual genf::GFBookkeeping::~GFBookkeeping ( )
inlinevirtual

Definition at line 74 of file GFBookkeeping.h.

74 {clearAll();}

Member Function Documentation

void genf::GFBookkeeping::addFailedHit ( unsigned int  id)

Definition at line 364 of file GFBookkeeping.cxx.

364  {
365  fFailedHits.push_back( id );
366 }
std::vector< unsigned int > fFailedHits
Definition: GFBookkeeping.h:45
void genf::GFBookkeeping::bookGFDetPlanes ( std::string  key)

Definition at line 212 of file GFBookkeeping.cxx.

212  {
213  if(fNhits<0){
214  GFException exc("fNhits not defined",__LINE__,__FILE__);
215  throw exc;
216  }
217  if(fPlanes[key] != NULL){
218  std::ostringstream ostr;
219  ostr << "The key " << key
220  << " is already occupied in genf::GFBookkeeping::bookGFDetPlanes()";
221  GFException exc(ostr.str(),__LINE__,__FILE__);
222  throw exc;
223  }
224  fPlanes[key] = new genf::GFDetPlane[fNhits];
225 }
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40
void genf::GFBookkeeping::bookMatrices ( std::string  key)

Definition at line 197 of file GFBookkeeping.cxx.

197  {
198  if(fNhits<0){
199  GFException exc("fNhits not defined",__LINE__,__FILE__);
200  throw exc;
201  }
202  if(fMatrices[key] != NULL){
203  std::ostringstream ostr;
204  ostr << "The key " << key
205  << " is already occupied in genf::GFBookkeeping::bookMatrices()";
206  GFException exc(ostr.str(),__LINE__,__FILE__);
207  throw exc;
208  }
209  fMatrices[key] = new TMatrixT<Double_t>[fNhits];
210 }
std::map< std::string, TMatrixT< Double_t > * > fMatrices
Definition: GFBookkeeping.h:39
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
void genf::GFBookkeeping::bookNumbers ( std::string  key,
double  val = 0. 
)

Definition at line 228 of file GFBookkeeping.cxx.

228  {
229  if(fNhits<0){
230  GFException exc("fNhits not defined",__LINE__,__FILE__);
231  throw exc;
232  }
233  if(fPlanes[key] != NULL){
234  std::ostringstream ostr;
235  ostr << "The key " << key
236  << " is already occupied in genf::GFBookkeeping::bookNumbers()";
237  GFException exc(ostr.str(),__LINE__,__FILE__);
238  throw exc;
239  }
240  fNumbers[key] = new TMatrixT<Double_t>[fNhits];
241  for(int i=0;i<fNhits;++i){
242  ((fNumbers[key])[i]).ResizeTo(1,1);
243  ((fNumbers[key])[i])[0][0] = val;
244  }
245 
246 }
std::map< std::string, TMatrixT< Double_t > * > fNumbers
Definition: GFBookkeeping.h:44
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40
void genf::GFBookkeeping::clearAll ( )

Definition at line 406 of file GFBookkeeping.cxx.

406  {
407  std::map<std::string, TMatrixT<Double_t>* >::iterator itMat;
408  for(itMat=fMatrices.begin();itMat!=fMatrices.end();itMat++){
409  if(itMat->second!=NULL) delete [] itMat->second;
410  }
411  std::map<std::string, genf::GFDetPlane* >::iterator itPl;
412  for(itPl=fPlanes.begin();itPl!=fPlanes.end();itPl++){
413  if(itPl->second!=NULL) delete [] itPl->second;
414  }
415  std::map<std::string, TMatrixT<Double_t>* >::iterator itNum;
416  for(itNum=fNumbers.begin();itNum!=fNumbers.end();itNum++){
417  if(itNum->second!=NULL) delete [] itNum->second;
418  }
419  fMatrices.clear();
420  fPlanes.clear();
421  fNumbers.clear();
422 }
std::map< std::string, TMatrixT< Double_t > * > fNumbers
Definition: GFBookkeeping.h:44
std::map< std::string, TMatrixT< Double_t > * > fMatrices
Definition: GFBookkeeping.h:39
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40
void genf::GFBookkeeping::clearFailedHits ( )

Definition at line 382 of file GFBookkeeping.cxx.

382  {
383  fFailedHits.clear();
384 }
std::vector< unsigned int > fFailedHits
Definition: GFBookkeeping.h:45
bool genf::GFBookkeeping::getDetPlane ( std::string  key,
unsigned int  index,
genf::GFDetPlane pl 
) const

Definition at line 322 of file GFBookkeeping.cxx.

324  {
325 
326  auto iPlane = fPlanes.find(key);
327  if(iPlane == fPlanes.end()){
328  std::ostringstream ostr;
329  ostr << "The key " << key << " is unknown in genf::GFBookkeeping::getGFDetPlane()";
330  GFException exc(ostr.str(),__LINE__,__FILE__);
331  throw exc;
332  }
333  if(index>=(unsigned int)fNhits){
334  std::ostringstream ostr;
335  ostr << "The index " << index
336  << " is out of range in genf::GFBookkeeping::getGFDetPlane()";
337  GFException exc(ostr.str(),__LINE__,__FILE__);
338  throw exc;
339  }
340  pl = iPlane->second[index];
341  return true;
342 }
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40
std::vector< std::string > genf::GFBookkeeping::getGFDetPlaneKeys ( ) const

Definition at line 432 of file GFBookkeeping.cxx.

432  {
433  std::vector< std::string > keys;
434  std::map<std::string, genf::GFDetPlane* >::const_iterator it;
435  for(it=fPlanes.begin();it!=fPlanes.end();it++){
436  if(it->second!=NULL) keys.push_back(it->first);
437  }
438  return keys;
439 }
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40
bool genf::GFBookkeeping::getMatrix ( std::string  key,
unsigned int  index,
TMatrixT< Double_t > &  mat 
) const

Definition at line 301 of file GFBookkeeping.cxx.

303  {
304  auto iMatrix = fMatrices.find(key);
305  if(iMatrix == fMatrices.end()){
306  std::ostringstream ostr;
307  ostr << "The key " << key << " is unknown in genf::GFBookkeeping::getMatrix()";
308  GFException exc(ostr.str(),__LINE__,__FILE__);
309  throw exc;
310  }
311  if(index>=(unsigned int)fNhits){
312  std::ostringstream ostr;
313  ostr << "The index " << index
314  << " is out of range in genf::GFBookkeeping::getMatrix()";
315  GFException exc(ostr.str(),__LINE__,__FILE__);
316  throw exc;
317  }
318  mat.ResizeTo(iMatrix->second[index]);
319  mat = iMatrix->second[index];
320  return true;
321 }
std::map< std::string, TMatrixT< Double_t > * > fMatrices
Definition: GFBookkeeping.h:39
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
std::vector< std::string > genf::GFBookkeeping::getMatrixKeys ( ) const

Definition at line 424 of file GFBookkeeping.cxx.

424  {
425  std::vector< std::string > keys;
426  std::map<std::string, TMatrixT<Double_t>* >::const_iterator it;
427  for(it=fMatrices.begin();it!=fMatrices.end();it++){
428  if(it->second!=NULL) keys.push_back(it->first);
429  }
430  return keys;
431 }
std::map< std::string, TMatrixT< Double_t > * > fMatrices
Definition: GFBookkeeping.h:39
bool genf::GFBookkeeping::getNumber ( std::string  key,
unsigned int  index,
double &  num 
) const

Definition at line 343 of file GFBookkeeping.cxx.

345  {
346  auto iNumber = fNumbers.find(key);
347  if(iNumber == fNumbers.end()){
348  std::ostringstream ostr;
349  ostr << "The key " << key << " is unknown in genf::GFBookkeeping::getNumber()";
350  GFException exc(ostr.str(),__LINE__,__FILE__);
351  throw exc;
352  }
353  if(index>=(unsigned int)fNhits){
354  std::ostringstream ostr;
355  ostr << "The index " << index
356  << " is out of range in genf::GFBookkeeping::getNumber()";
357  GFException exc(ostr.str(),__LINE__,__FILE__);
358  throw exc;
359  }
360  num = iNumber->second[index][0][0];
361  return true;
362 }
std::map< std::string, TMatrixT< Double_t > * > fNumbers
Definition: GFBookkeeping.h:44
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
std::vector< std::string > genf::GFBookkeeping::getNumberKeys ( ) const

Definition at line 440 of file GFBookkeeping.cxx.

440  {
441  std::vector< std::string > keys;
442  std::map<std::string, TMatrixT<Double_t>* >::const_iterator it;
443  for(it=fNumbers.begin();it!=fNumbers.end();it++){
444  if(it->second!=NULL) keys.push_back(it->first);
445  }
446  return keys;
447 }
std::map< std::string, TMatrixT< Double_t > * > fNumbers
Definition: GFBookkeeping.h:44
unsigned int genf::GFBookkeeping::getNumFailed ( )

Definition at line 368 of file GFBookkeeping.cxx.

368  {
369  return fFailedHits.size();
370 }
std::vector< unsigned int > fFailedHits
Definition: GFBookkeeping.h:45
unsigned int genf::GFBookkeeping::hitFailed ( unsigned int  id)

Definition at line 372 of file GFBookkeeping.cxx.

372  {
373  unsigned int retVal = 0;
374  for(unsigned int i=0;i<fFailedHits.size();++i){
375  if(fFailedHits.at(i) == id){
376  ++retVal;
377  }
378  }
379  return retVal;
380 }
std::vector< unsigned int > fFailedHits
Definition: GFBookkeeping.h:45
GFBookkeeping& genf::GFBookkeeping::operator= ( const GFBookkeeping )
privatedelete
void genf::GFBookkeeping::Print ( std::ostream &  out = std::cout) const

Definition at line 450 of file GFBookkeeping.cxx.

450  {
451  out << "=============genf::GFBookkeeping::print()==============" << std::endl;
452  out << "-----printing all matrices:------" << std::endl;
453  std::vector<std::string> keys = getMatrixKeys();
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;
459  getMatrix(keys.at(i),j,m);
460  m.Print(); // TODO print the matrix outself
461  }
462  }
463  out << "-----printing all GFDetPlanes:------" << std::endl;
464  keys = getGFDetPlaneKeys();
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){
470  getDetPlane(keys.at(i),j,p);
471  p.Print(out);
472  }
473  }
474  out << "-----printing all numbers:------" << std::endl;
475  keys = getNumberKeys();
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){
480  double n(-1111.);
481  getNumber(keys.at(i),j,n);
482  out << n << std::endl;
483  }
484  }
485  out << "-----failed hits:------" << std::endl;
486  for(unsigned int i=0;i<fFailedHits.size();++i){
487  out << fFailedHits.at(i) << " ";
488  }
489  out << std::endl;
490 }
pdgs p
Definition: selectors.fcl:22
void Print(std::ostream &out=std::cout) const
Definition: GFDetPlane.cxx:247
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...
std::vector< unsigned int > fFailedHits
Definition: GFBookkeeping.h:45
bool getNumber(std::string key, unsigned int index, double &num) const
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
std::vector< std::string > getNumberKeys() const
bool getDetPlane(std::string key, unsigned int index, GFDetPlane &pl) const
virtual void genf::GFBookkeeping::Print ( Option_t *  ) const
inlineprivatevirtual

Definition at line 86 of file GFBookkeeping.h.

87  { throw GFException(std::string(__func__) + "::Print(Option_t*) not available", __LINE__, __FILE__).setFatal(); }
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
Definition: GFException.h:78
void genf::GFBookkeeping::reset ( )

Definition at line 386 of file GFBookkeeping.cxx.

386  {
387  std::vector<std::string> matKeys = getMatrixKeys();
388  std::vector<std::string> planeKeys = getGFDetPlaneKeys();
389  std::vector<std::string> numKeys = getNumberKeys();
390 
391  clearAll();
392  clearFailedHits();
393 
394  for(unsigned int i=0;i<matKeys.size();++i){
395  bookMatrices(matKeys.at(i));
396  }
397  for(unsigned int i=0;i<planeKeys.size();++i){
398  bookGFDetPlanes(planeKeys.at(i));
399  }
400  for(unsigned int i=0;i<numKeys.size();++i){
401  bookNumbers(numKeys.at(i));
402  }
403 
404 }
void bookGFDetPlanes(std::string key)
void bookMatrices(std::string key)
std::vector< std::string > getMatrixKeys() const
std::vector< std::string > getGFDetPlaneKeys() const
void bookNumbers(std::string key, double val=0.)
std::vector< std::string > getNumberKeys() const
void genf::GFBookkeeping::setDetPlane ( std::string  key,
unsigned int  index,
const GFDetPlane pl 
)

Definition at line 266 of file GFBookkeeping.cxx.

267  {
268  if(fPlanes[key] == NULL){
269  std::ostringstream ostr;
270  ostr << "The key " << key << " is unknown in genf::GFBookkeeping::setGFDetPlane()";
271  GFException exc(ostr.str(),__LINE__,__FILE__);
272  throw exc;
273  }
274  if(index>=(unsigned int)fNhits){
275  std::ostringstream ostr;
276  ostr << "The index " << index
277  << " is out of range in genf::GFBookkeeping::setGFDetPlane()";
278  GFException exc(ostr.str(),__LINE__,__FILE__);
279  throw exc;
280  }
281  (fPlanes[key])[index] = pl;
282 }
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40
void genf::GFBookkeeping::setMatrix ( std::string  key,
unsigned int  index,
const TMatrixT< Double_t > &  mat 
)

Definition at line 248 of file GFBookkeeping.cxx.

249  {
250  if(fMatrices[key] == NULL){
251  std::ostringstream ostr;
252  ostr << "The key " << key << " is unknown in genf::GFBookkeeping::setMatrix()";
253  GFException exc(ostr.str(),__LINE__,__FILE__);
254  throw exc;
255  }
256  if(index>=(unsigned int)fNhits){
257  std::ostringstream ostr;
258  ostr << "The index " << index
259  << " is out of range in genf::GFBookkeeping::setMatrix()";
260  GFException exc(ostr.str(),__LINE__,__FILE__);
261  throw exc;
262  }
263  (fMatrices[key])[index].ResizeTo(mat);
264  (fMatrices[key])[index] = mat;
265 }
std::map< std::string, TMatrixT< Double_t > * > fMatrices
Definition: GFBookkeeping.h:39
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
void genf::GFBookkeeping::setNhits ( int  n)
inline
void genf::GFBookkeeping::setNumber ( std::string  key,
unsigned int  index,
const double &  num 
)

Definition at line 283 of file GFBookkeeping.cxx.

284  {
285  if(fNumbers[key] == NULL){
286  std::ostringstream ostr;
287  ostr << "The key " << key << " is unknown in genf::GFBookkeeping::setNumber()";
288  GFException exc(ostr.str(),__LINE__,__FILE__);
289  throw exc;
290  }
291  if(index>=(unsigned int)fNhits){
292  std::ostringstream ostr;
293  ostr << "The index " << index
294  << " is out of range in genf::GFBookkeeping::setNumber()";
295  GFException exc(ostr.str(),__LINE__,__FILE__);
296  throw exc;
297  }
298  ((fNumbers[key])[index])[0][0] = num;
299 }
std::map< std::string, TMatrixT< Double_t > * > fNumbers
Definition: GFBookkeeping.h:44
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:48
void genf::GFBookkeeping::Streamer ( TBuffer &  R__b)

Definition at line 78 of file GFBookkeeping.cxx.

79 {
80 
81 
82  // Stream an object of class GFBookkeeping.
83  if (R__b.IsReading()) {
84 
85  // Version_t R__v = R__b.ReadVersion();
86  TObject::Streamer(R__b);
87 
88  clearAll();
89 
90  R__b >> fNhits;
91 
92  TString s;
93  std::string key;
94  unsigned int nkeys;
95  TMatrixT<Double_t> mat;
97 
98  {//reading matrices
99  R__b >> nkeys;
100  for(unsigned int i=0;i<nkeys;++i){
101  s.Streamer(R__b);
102  key = s.Data();
103  bookMatrices(key);
104  for(int j=0;j<fNhits;++j){
105  mat.Streamer(R__b);
106  setMatrix(key,j,mat);
107  }
108  }
109  }//done reading matrices
110  {//reading planes
111  R__b >> nkeys;
112  for(unsigned int i=0;i<nkeys;++i){
113  s.Streamer(R__b);
114  key = s.Data();
115  bookGFDetPlanes(key);
116  for(int j=0;j<fNhits;++j){
117  pl.Streamer(R__b);
118  setDetPlane(key,j,pl);
119  }
120  }
121  }//done reading planes
122  {//reading numbers
123  R__b >> nkeys;
124  for(unsigned int i=0;i<nkeys;++i){
125  s.Streamer(R__b);
126  key = s.Data();
127  bookNumbers(key);
128  for(int j=0;j<fNhits;++j){
129  mat.Streamer(R__b);
130  setNumber(key,j,mat[0][0]);
131  }
132  }
133  }//done reading numbers
134  {//read failed hits
135  clearFailedHits();
136  unsigned int nFailedHits;
137  R__b >> nFailedHits;
138  unsigned int aFailedHit;
139  for(unsigned int i=0;i<nFailedHits;++i){
140  R__b >> aFailedHit;
141  fFailedHits.push_back(aFailedHit);
142  }
143  }//done reading failed hits
144  } else {
145  // R__b.WriteVersion(genf::GFBookkeeping::IsA());
146  TObject::Streamer(R__b);
147 
148  //write number of hits
149  R__b << fNhits;
150 
151  std::vector<std::string> keys;
152  {//save matrices
153  keys = getMatrixKeys();
154  R__b << (unsigned int)(keys.size());
155  for(unsigned int i=0;i<keys.size();++i){
156  TString s(keys.at(i));
157  s.Streamer(R__b);
158  for(int j=0;j<fNhits;++j){
159  ((fMatrices[keys.at(i)])[j]).Streamer(R__b);
160  }
161  }
162  }
163  keys.clear();
164  {//save GFDetPlanes
165  keys = getGFDetPlaneKeys();
166  R__b << (unsigned int)(keys.size());
167  for(unsigned int i=0;i<keys.size();++i){
168  TString s(keys.at(i));
169  s.Streamer(R__b);
170  for(int j=0;j<fNhits;++j){
171  ((fPlanes[keys.at(i)])[j]).Streamer(R__b);
172  }
173  }
174  }//done saving GFDetPlanes
175  keys.clear();
176  {//save numbers
177  keys = getNumberKeys();
178  R__b << (unsigned int)(keys.size());
179  for(unsigned int i=0;i<keys.size();++i){
180  TString s(keys.at(i));
181  s.Streamer(R__b);
182  for(int j=0;j<fNhits;++j){
183  ((fNumbers[keys.at(i)])[j]).Streamer(R__b);
184  }
185  }
186  }//done saving numbers
187  {//save failedHits
188  R__b << ((unsigned int) fFailedHits.size());
189  for(unsigned int i=0;i<fFailedHits.size();++i){
190  R__b << fFailedHits.at(i);
191  }
192  }//done saving failed Hits
193  }
194 
195 }
void setDetPlane(std::string key, unsigned int index, const GFDetPlane &pl)
std::map< std::string, TMatrixT< Double_t > * > fNumbers
Definition: GFBookkeeping.h:44
std::map< std::string, TMatrixT< Double_t > * > fMatrices
Definition: GFBookkeeping.h:39
void setNumber(std::string key, unsigned int index, const double &num)
void setMatrix(std::string key, unsigned int index, const TMatrixT< Double_t > &mat)
void bookGFDetPlanes(std::string key)
std::vector< unsigned int > fFailedHits
Definition: GFBookkeeping.h:45
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
void bookMatrices(std::string key)
std::vector< std::string > getMatrixKeys() const
std::vector< std::string > getGFDetPlaneKeys() const
void bookNumbers(std::string key, double val=0.)
std::vector< std::string > getNumberKeys() const
std::map< std::string, GFDetPlane * > fPlanes
Definition: GFBookkeeping.h:40

Member Data Documentation

std::vector< unsigned int > genf::GFBookkeeping::fFailedHits
private

Definition at line 45 of file GFBookkeeping.h.

std::map<std::string, TMatrixT<Double_t>* > genf::GFBookkeeping::fMatrices
private

Definition at line 39 of file GFBookkeeping.h.

int genf::GFBookkeeping::fNhits
private

Definition at line 46 of file GFBookkeeping.h.

std::map<std::string, TMatrixT<Double_t>* > genf::GFBookkeeping::fNumbers
private

Definition at line 44 of file GFBookkeeping.h.

std::map<std::string, GFDetPlane* > genf::GFBookkeeping::fPlanes
private

Definition at line 40 of file GFBookkeeping.h.


The documentation for this class was generated from the following files: