Simple data structure for DAQ run.
More...
#include <JRuncontrolToolkit.hh>
Simple data structure for DAQ run.
Definition at line 254 of file JRuncontrolToolkit.hh.
◆ JDAQRun() [1/4]
KM3NETDAQ::JDAQRun::JDAQRun |
( |
| ) |
|
|
inline |
◆ JDAQRun() [2/4]
KM3NETDAQ::JDAQRun::JDAQRun |
( |
const std::string & |
path, |
|
|
const int |
run, |
|
|
const std::string & |
extension = "root" |
|
) |
| |
|
inline |
Constructor .
- Parameters
-
path | directory path |
run | run number |
extension | file name extension |
Definition at line 271 of file JRuncontrolToolkit.hh.
◆ JDAQRun() [3/4]
KM3NETDAQ::JDAQRun::JDAQRun |
( |
const std::string & |
path, |
|
|
const int |
unique_id, |
|
|
const int |
run, |
|
|
const std::string & |
extension = "root" |
|
) |
| |
|
inline |
Constructor .
- Parameters
-
path | directory path |
unique_id | unique identifier |
run | run number |
extension | file name extension |
Definition at line 290 of file JRuncontrolToolkit.hh.
◆ JDAQRun() [4/4]
KM3NETDAQ::JDAQRun::JDAQRun |
( |
const char * |
file_name | ) |
|
|
inline |
◆ getPrefix()
static const char* KM3NETDAQ::JDAQRun::getPrefix |
( |
| ) |
|
|
inlinestatic |
◆ valueOf()
static JDAQRun KM3NETDAQ::JDAQRun::valueOf |
( |
const std::string & |
file_name | ) |
|
|
inlinestatic |
Extract DAQ run parameters.
- Parameters
-
- Returns
- DAQ run parameters
Definition at line 330 of file JRuncontrolToolkit.hh.
336 string buffer(file_name);
338 for (string::iterator i = buffer.begin(); i != buffer.end(); ++i) {
344 istringstream is(buffer);
350 if (pos == string::npos) {
351 pos =
result.path.rfind(
"/");
354 if (pos != string::npos) {
358 if (!(is >>
result.run)) {
368 if (!
result.extension.empty() &&
result.extension[0] ==
'.') {
369 result.extension.erase(0, 1);
375 throw JIOException(
"JDAQRun::valueOf() error parsing " + buffer);
◆ toString()
std::string KM3NETDAQ::JDAQRun::toString |
( |
| ) |
const |
|
inline |
Convert DAQ run to string.
- Returns
- string
Definition at line 384 of file JRuncontrolToolkit.hh.
394 if (*
path.rbegin() !=
'/') {
400 <<
"_" << setw(8) << setfill(
'0') <<
unique_id
401 <<
"_" << setw(8) << setfill(
'0') <<
run
◆ getFilename()
static std::string KM3NETDAQ::JDAQRun::getFilename |
( |
const std::string & |
path, |
|
|
const int |
unique_id, |
|
|
const int |
run |
|
) |
| |
|
inlinestatic |
Get file name of run.
- Parameters
-
path | directory path |
unique_id | unique identifier |
run | run number |
- Returns
- file name
Definition at line 416 of file JRuncontrolToolkit.hh.
◆ path
std::string KM3NETDAQ::JDAQRun::path |
◆ unique_id
int KM3NETDAQ::JDAQRun::unique_id |
◆ run
int KM3NETDAQ::JDAQRun::run |
◆ extension
std::string KM3NETDAQ::JDAQRun::extension |
The documentation for this struct was generated from the following file: