Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conversion from string to seconds #5386

Merged
merged 1 commit into from Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Detectors/DCS/src/DataPointGenerator.cxx
Expand Up @@ -34,10 +34,10 @@ std::pair<uint32_t, uint16_t> getDate(const std::string& refDate)
std::tm t{};
std::istringstream ss(refDate);
ss >> std::get_time(&t, "%Y-%b-%d %H:%M:%S");
if (ss.fail()) { // let's see if it was passed as a TDatime
if (ss.fail()) { // let's see if it was passed as a TDatime, as SQL string
std::tm tt{};
std::istringstream sss(refDate);
sss >> std::get_time(&tt, "%a %b %d %H:%M:%S %Y");
sss >> std::get_time(&tt, "%Y-%m-%d %H:%M:%S");
if (sss.fail()) {
LOG(ERROR) << "We cannot parse the date";
}
Expand Down
Expand Up @@ -70,7 +70,7 @@ std::vector<o2::dcs::DataPointCompositeObject> generate(const std::vector<o2::dc
dsec += tfid;
d.Set(dsec);

std::string refDate = d.AsString();
std::string refDate = d.AsSQLString();

auto GenerateVisitor = [refDate](const auto& t) {
return o2::dcs::generateRandomDataPoints({t.aliasPattern}, t.minValue, t.maxValue, refDate);
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TOF/calibration/testWorkflow/README.md
Expand Up @@ -14,7 +14,7 @@ aliases. You can specify the path of CCDB also with `--ccdb-path`.
YOu can also specify to run in verbose mode (`--use-verbose-mode`)

```shell
o2-calibration-tof-sim-workflow --max-timeframes 3 --delta-fraction 0.5 -b |
o2-calibration-tof-dcs-sim-workflow --max-timeframes 3 --delta-fraction 0.5 -b |
o2-calibration-tof-dcs-workflow --use-ccdb-to-configure -b |
o2-calibration-ccdb-populator-workflow --ccdb-path="http://localhost:8080" -b
```
Expand Down