CbmRoot
Loading...
Searching...
No Matches
LitFieldValue.h
Go to the documentation of this file.
1/* Copyright (C) 2009-2013 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef LITFIELDVALUE_H_
13#define LITFIELDVALUE_H_
14
15#include "LitTypes.h"
16#include "LitUtils.h"
17
18#include <sstream>
19#include <string>
20using std::ostream;
21using std::string;
22using std::stringstream;
23
24namespace lit
25{
26 namespace parallel
27 {
28
35 template<class T>
37 public:
41 LitFieldValue() : Bx(0.), By(0.), Bz(0.) {}
42
47 string ToString() const
48 {
49 stringstream ss;
50 ss << "LitFieldValue: Bx=" << Bx << ", By=" << By << ", Bz=" << Bz << "\n";
51 return ss.str();
52 }
53
58 friend ostream& operator<<(ostream& strm, const LitFieldValue& v)
59 {
60 strm << v.ToString();
61 return strm;
62 }
63
64 public:
65 T Bx, By, Bz; // components of the magnetic field
67
73
79
80 } // namespace parallel
81} // namespace lit
82
83#endif /* LITFIELDVALUE_H_ */
fscal v[fmask::Size]
Definition KfSimdPseudo.h:4
Header files for SSE operations.
Useful classes and functions.
Magnetic field value at a certain point in the space.
friend ostream & operator<<(ostream &strm, const LitFieldValue &v)
Operator << for convenient output to ostream.
string ToString() const
Return string representation of the class.
class lit::parallel::LitDetectorLayout _fvecalignment
LitFieldValue< fscal > LitFieldValueScal
Scalar version of LitFieldValue.
LitFieldValue< fvec > LitFieldValueVec
Vector version of LitFieldValue.