CbmRoot
LitFieldValue.h
Go to the documentation of this file.
1 
8 #ifndef LITFIELDVALUE_H_
9 #define LITFIELDVALUE_H_
10 
11 #include "LitTypes.h"
12 #include "LitUtils.h"
13 #include <sstream>
14 #include <string>
15 using std::ostream;
16 using std::string;
17 using std::stringstream;
18 
19 namespace lit {
20  namespace parallel {
21 
28  template<class T>
29  class LitFieldValue {
30  public:
34  LitFieldValue() : Bx(0.), By(0.), Bz(0.) {}
35 
40  string ToString() const {
41  stringstream ss;
42  ss << "LitFieldValue: Bx=" << Bx << ", By=" << By << ", Bz=" << Bz
43  << "\n";
44  return ss.str();
45  }
46 
51  friend ostream& operator<<(ostream& strm, const LitFieldValue& v) {
52  strm << v.ToString();
53  return strm;
54  }
55 
56  public:
57  T Bx, By, Bz; // components of the magnetic field
59 
65 
71 
72  } // namespace parallel
73 } // namespace lit
74 
75 #endif /* LITFIELDVALUE_H_ */
LitUtils.h
Useful classes and functions.
lit::parallel::_fvecalignment
class lit::parallel::LitDetectorLayout _fvecalignment
lit::parallel::LitFieldValue::Bx
T Bx
Definition: LitFieldValue.h:57
LitTypes.h
Header files for SSE operations.
lit::parallel::LitFieldValue::operator<<
friend ostream & operator<<(ostream &strm, const LitFieldValue &v)
Operator << for convenient output to ostream.
Definition: LitFieldValue.h:51
lit::parallel::LitFieldValue::LitFieldValue
LitFieldValue()
Constructor.
Definition: LitFieldValue.h:34
lit::parallel::LitFieldValue
Magnetic field value at a certain point in the space.
Definition: LitFieldValue.h:29
lit::parallel::LitFieldValue::ToString
string ToString() const
Return string representation of the class.
Definition: LitFieldValue.h:40
lit::parallel::LitFieldValueVec
LitFieldValue< fvec > LitFieldValueVec
Vector version of LitFieldValue.
Definition: LitFieldValue.h:70
lit::parallel::LitFieldValue::By
T By
Definition: LitFieldValue.h:57
v
__m128 v
Definition: L1/vectors/P4_F32vec4.h:1
lit::parallel::LitFieldValueScal
LitFieldValue< fscal > LitFieldValueScal
Scalar version of LitFieldValue.
Definition: LitFieldValue.h:64
lit::parallel::LitFieldValue::Bz
T Bz
Definition: LitFieldValue.h:57
lit
Definition: LitTrackFinderNNVecElectron.h:19