Database object for signal propagation speed along the wire.
More...
#include <CDCPropSpeeds.h>
|
| enum | { c_nSlayers = 56
} |
| | Constant. More...
|
| |
|
| | CDCPropSpeeds () |
| | Default constructor.
|
| |
| void | setSpeed (unsigned short iCLayer, float speed) |
| | Set the speed in the list.
|
| |
| void | addSpeed (unsigned short iCLayer, float delta) |
| | Update the speed in the list.
|
| |
| unsigned short | getEntries () const |
| | Get the no.
|
| |
| std::vector< float > | getSpeeds () const |
| | Get the whole list.
|
| |
| float | getSpeed (unsigned short iCLayer) const |
| | Get the speed for the specified layer.
|
| |
| void | dump () const |
| | Print out contents.
|
| |
| void | outputToFile (std::string fileName) const |
| | Output the contents in text file format.
|
| |
|
| std::vector< float > | m_speeds = std::vector<float>(c_nSlayers) |
| | list of speed
|
| |
Database object for signal propagation speed along the wire.
Definition at line 25 of file CDCPropSpeeds.h.
◆ anonymous enum
◆ CDCPropSpeeds()
◆ addSpeed()
| void addSpeed |
( |
unsigned short |
iCLayer, |
|
|
float |
delta |
|
) |
| |
|
inline |
Update the speed in the list.
- Parameters
-
| iCLayer | (continuous) layer-id, |
| delta | delta-speed for the layer |
Definition at line 53 of file CDCPropSpeeds.h.
54 {
56 }
std::vector< float > m_speeds
list of speed
◆ dump()
Print out contents.
Definition at line 87 of file CDCPropSpeeds.h.
88 {
89 std::cout << " " << std::endl;
90 std::cout << "PropSpeed list" << std::endl;
91 std::cout <<
"#entries= " <<
m_speeds.size() << std::endl;
92 std::cout << "in order of clayer and speed (cm/ns)" << std::endl;
93
94 for (
unsigned short iCL = 0; iCL <
m_speeds.size(); ++iCL) {
95 std::cout << iCL <<
" " <<
m_speeds[iCL] << std::endl;
96 }
97 }
◆ getEntries()
| unsigned short getEntries |
( |
| ) |
const |
|
inline |
◆ getSpeed()
| float getSpeed |
( |
unsigned short |
iCLayer | ) |
const |
|
inline |
Get the speed for the specified layer.
- Parameters
-
| iCLayer | (continuous) layer-id. |
- Returns
- propagation speed for the layer
Definition at line 79 of file CDCPropSpeeds.h.
◆ getSpeeds()
| std::vector< float > getSpeeds |
( |
| ) |
const |
|
inline |
◆ outputToFile()
| void outputToFile |
( |
std::string |
fileName | ) |
const |
|
inline |
Output the contents in text file format.
Definition at line 102 of file CDCPropSpeeds.h.
103 {
104 std::ofstream fout(fileName);
105
106 if (fout.bad()) {
107 B2ERROR("Specified output file could not be opened!");
108 } else {
109 for (
unsigned short iCL = 0; iCL <
m_speeds.size(); ++iCL) {
110 fout << std::setw(2) << std::right << iCL << " " << std::setw(15) << std::scientific << std::setprecision(
112 }
113 fout.close();
114 }
115 }
◆ setSpeed()
| void setSpeed |
( |
unsigned short |
iCLayer, |
|
|
float |
speed |
|
) |
| |
|
inline |
Set the speed in the list.
- Parameters
-
| iCLayer | (continuous) layer-id, |
| speed | propagation speed for the layer |
Definition at line 43 of file CDCPropSpeeds.h.
◆ m_speeds
| std::vector<float> m_speeds = std::vector<float>(c_nSlayers) |
|
private |
The documentation for this class was generated from the following file: