EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbExceptionLog.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairDbExceptionLog.cxx
1 
2 #include <iostream>
3 
4 #include "FairDbExceptionLog.h"
5 
6 using namespace std;
7 
9 
11 
12 
14  : fEntries()
15 {
16 
17  if ( e ) { this->AddEntry(*e); }
18 
19 }
20 
21 
23 {
24 
25 
26 
27 }
28 
29 
30 std::ostream& operator<<(std::ostream& os, const FairDbExceptionLog& el)
31 {
32 
33  if ( el.IsEmpty() ) {
34  os << "The database exception log is empty" << endl;
35  } else {
36  os << "Database exception log:-" << endl;
37  std::vector<FairDbException>::const_iterator itr(el.GetEntries().begin()),
38  itrEnd(el.GetEntries().end());
39  while ( itr != itrEnd ) {
40  os << *itr << endl;
41  ++itr;
42  }
43  }
44 
45  return os;
46 
47 }
48 
49 
51 {
52 
53  const std::vector<FairDbException>& ve = el.GetEntries();
54  std::vector<FairDbException>::const_iterator itr(ve.begin()), itrEnd(ve.end());
55  while ( itr != itrEnd ) { this->AddEntry(*itr++); }
56 
57 }
58 
59 
61 {
62 
63  UInt_t maxEntry = fEntries.size();
64  while (start <= maxEntry ) { that.AddEntry(fEntries[start++]); }
65 
66 }
67 
69 {
70  return;
71  std::cout << *this << std::endl;
72 
73 }
74 
75 
76