Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ Versatile DAQ engine for physics detectors, event mode and otherwise, with a var
## The future

You can see current tickets and their priorities on the [Kanban board](https://github.com/ess-dmsc/daquiri/projects/1)

Please send any feature requests you have to ([email protected]).
2 changes: 2 additions & 0 deletions cmake/QtLibraryConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)

find_package(Qt5 COMPONENTS Widgets PrintSupport Network Test REQUIRED)
message(STATUS "Detected QT version = ${Qt5Widgets_VERSION_STRING}")

2 changes: 1 addition & 1 deletion documentation/installation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Requirements

Supported (continuously tested) platforms:
- Ubuntu 18.04
- Ubuntu 20.04
- macOS Catalina
- Centos 7

Expand Down
20 changes: 9 additions & 11 deletions documentation/manual_building.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In case you want to do everything manually, here are some of the gory details.
## Requirements

Supported platforms:
- Ubuntu 18.04
- Ubuntu 20.04
- macOS High Sierra
- Centos 7

Expand All @@ -14,28 +14,26 @@ You definitely need these:
- recent C++ compiler
- CMake 3.0
- Qt5
- conan 1.0 (via pip)
- conan (via pip)

## Conan setup
To avoid C++ dependency hell, we use `conan`. The following repos need to be added:
```
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
conan remote add ecdc https://artifactoryconan.esss.dk/artifactory/api/conan/ecdc
```
If you are on a `linux` sytem you also need to ensure that `conan` builds everything using the c++11 standard. Edit your `~/.conan/profiles/default` to replace `compiler.libcxx=libstdc++` with `compiler.libcxx=libstdc++11`.
If said file does not exists, you are likely yet to run `conan` for the first time. Do the following to generate the above-mentioned file:
```
To avoid C++ dependency hell, we use `conan`. After you install it, run:

```bash
conan profile new --detect default
conan profile update settings.compiler.libcxx=libstdc++11 default
```

For the most up-to-date remotes, see the standard `ESS` configuration for conan in [this repository](https://github.com/ess-dmsc/conan-configuration)

## Installation of Qt

There is currently no fully portable conan package of Qt so it should be installed in
a platform-specific way. For each platform it's the following:

- Ubuntu: `qt5-default` package from apt
- Centos: `qt5-qtbase-devel` package from yum
- macOS: whatever default qt package from brew
- macOS: whatever default qt5 package from brew

It is easiest if you have Qt installed via brew or apt.

Expand Down
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include(BuildInfo)
find_package(date REQUIRED)
find_package(spdlog REQUIRED)
find_package(fmt REQUIRED)
find_package(h5cpp 0.4.0 REQUIRED)
find_package(h5cpp 0.4.1 REQUIRED)
find_package(Threads REQUIRED)

add_subdirectory(core)
Expand Down
4 changes: 2 additions & 2 deletions source/consumers/Histogram2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Histogram2D::Histogram2D()

SettingMeta app("appearance", SettingType::text, "Appearance");
app.set_flag("gradient-name");
base_options.branches.add(app);
base_options.branches.add(Setting(app));

SettingMeta flip("flip-y", SettingType::boolean, "Flip Y axis");
base_options.branches.add(flip);
base_options.branches.add(Setting(flip));

base_options.branches.add_a(value_latch_x_.settings(0, "X value"));
base_options.branches.add_a(value_latch_y_.settings(1, "Y value"));
Expand Down
4 changes: 2 additions & 2 deletions source/consumers/Image2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Image2D::Image2D()

SettingMeta app("appearance", SettingType::text, "Appearance");
app.set_flag("gradient-name");
base_options.branches.add(app);
base_options.branches.add(Setting(app));

SettingMeta flip("flip-y", SettingType::boolean, "Flip Y axis");
base_options.branches.add(flip);
base_options.branches.add(Setting(flip));

base_options.branches.add_a(value_latch_x_.settings(0, "X value"));
base_options.branches.add_a(value_latch_y_.settings(1, "Y value"));
Expand Down
6 changes: 3 additions & 3 deletions source/consumers/Prebinned1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ Prebinned1D::Prebinned1D()

SettingMeta app("appearance", SettingType::text, "Appearance");
app.set_flag("color");
base_options.branches.add(app);
base_options.branches.add(Setting(app));

SettingMeta val_name("trace_id", SettingType::text);
val_name.set_flag("preset");
val_name.set_flag("event_trace");
val_name.set_val("description", "Name of event trace to bin");
base_options.branches.add(val_name);
base_options.branches.add(Setting(val_name));

SettingMeta mds("downsample", SettingType::integer, "Downsample by");
mds.set_val("units", "bits");
mds.set_flag("preset");
mds.set_val("min", 0);
mds.set_val("max", 31);
base_options.branches.add(mds);
base_options.branches.add(Setting(mds));

metadata_.overwrite_all_attributes(base_options);
}
Expand Down
18 changes: 9 additions & 9 deletions source/consumers/Spectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ Spectrum::Spectrum()
Setting base_options = metadata_.attributes();

SettingMeta name("name", SettingType::text, "Name");
base_options.branches.add(name);
base_options.branches.add(Setting(name));

SettingMeta altaxisname("alt_axis_name", SettingType::text, "Axis alias");
base_options.branches.add(altaxisname);
base_options.branches.add(Setting(altaxisname));

SettingMeta vis("visible", SettingType::boolean, "Visible");
base_options.branches.add(vis);
base_options.branches.add(Setting(vis));

SettingMeta grp("window_group", SettingType::integer, "Window group");
grp.set_val("min", 0);
grp.set_val("max", 100);
base_options.branches.add(grp);
base_options.branches.add(Setting(grp));

SettingMeta sca("preferred_scale", SettingType::menu, "Plot scale for counts");
sca.set_enum(0, "Linear");
sca.set_enum(1, "Logarithmic");
base_options.branches.add(sca);
base_options.branches.add(Setting(sca));

SettingMeta totalcount("total_count", SettingType::precise, "Total count");
totalcount.set_flag("readonly");
totalcount.set_val("min", 0);
base_options.branches.add(totalcount);
base_options.branches.add(Setting(totalcount));

SettingMeta start_time("start_time", SettingType::time, "Start time");
start_time.set_flag("readonly");
base_options.branches.add(start_time);
base_options.branches.add(Setting(start_time));

SettingMeta live_time("live_time", SettingType::duration, "Live time");
live_time.set_flag("readonly");
base_options.branches.add(live_time);
base_options.branches.add(Setting(live_time));

SettingMeta real_time("real_time", SettingType::duration, "Real time");
real_time.set_flag("readonly");
base_options.branches.add(real_time);
base_options.branches.add(Setting(real_time));

base_options.branches.add(recent_rate_.update(Status(), 0));

Expand Down
2 changes: 1 addition & 1 deletion source/consumers/StatsScalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ StatsScalar::StatsScalar()

SettingMeta app("appearance", SettingType::text, "Appearance");
app.set_flag("gradient-name");
base_options.branches.add(app);
base_options.branches.add(Setting(app));

SettingMeta stat("what_stats", SettingType::text, "Stat of choice");
stat.set_flag("stat_value");
Expand Down
4 changes: 2 additions & 2 deletions source/consumers/TOF1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ TOF1D::TOF1D()
res.set_flag("preset");
res.set_val("min", 1);
res.set_val("units", "units (see below)");
base_options.branches.add(res);
base_options.branches.add(Setting(res));

SettingMeta units("time_units", SettingType::menu, "Time units (domain)");
units.set_flag("preset");
units.set_enum(0, "ns");
units.set_enum(3, "\u03BCs");
units.set_enum(6, "ms");
units.set_enum(9, "s");
base_options.branches.add(units);
base_options.branches.add(Setting(units));

metadata_.overwrite_all_attributes(base_options);
}
Expand Down
6 changes: 3 additions & 3 deletions source/consumers/TOF1DCorrelate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ TOF1DCorrelate::TOF1DCorrelate()
res.set_flag("preset");
res.set_val("min", 1);
res.set_val("units", "units (see below)");
base_options.branches.add(res);
base_options.branches.add(Setting(res));

SettingMeta units("time_units", SettingType::menu, "Time units (domain)");
units.set_flag("preset");
units.set_enum(0, "ns");
units.set_enum(3, "\u03BCs");
units.set_enum(6, "ms");
units.set_enum(9, "s");
base_options.branches.add(units);
base_options.branches.add(Setting(units));

SettingMeta stream("chopper_stream_id", SettingType::text, "Chopper stream ID");
stream.set_flag("preset");
stream.set_flag("stream");
base_options.branches.add(stream);
base_options.branches.add(Setting(stream));

metadata_.overwrite_all_attributes(base_options);
}
Expand Down
8 changes: 4 additions & 4 deletions source/consumers/TOFVal2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ TOFVal2D::TOFVal2D()

SettingMeta app("appearance", SettingType::text, "Plot appearance");
app.set_flag("gradient-name");
base_options.branches.add(app);
base_options.branches.add(Setting(app));

SettingMeta flip("flip-y", SettingType::boolean, "Flip Y axis");
base_options.branches.add(flip);
base_options.branches.add(Setting(flip));

SettingMeta res("time_resolution", SettingType::floating, "Time resolution");
res.set_flag("preset");
res.set_val("min", 1);
res.set_val("units", "units (see below)");
base_options.branches.add(res);
base_options.branches.add(Setting(res));

SettingMeta units("time_units", SettingType::menu, "Time units (domain)");
units.set_flag("preset");
units.set_enum(0, "ns");
units.set_enum(3, "\u03BCs");
units.set_enum(6, "ms");
units.set_enum(9, "s");
base_options.branches.add(units);
base_options.branches.add(Setting(units));

base_options.branches.add(value_latch_.settings(-1, "Value to bin"));

Expand Down
10 changes: 5 additions & 5 deletions source/consumers/TOFVal2DCorrelate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ TOFVal2DCorrelate::TOFVal2DCorrelate()

SettingMeta app("appearance", SettingType::text, "Plot appearance");
app.set_flag("gradient-name");
base_options.branches.add(app);
base_options.branches.add(Setting(app));

SettingMeta flip("flip-y", SettingType::boolean, "Flip Y axis");
base_options.branches.add(flip);
base_options.branches.add(Setting(flip));

SettingMeta res("time_resolution", SettingType::floating, "Time resolution");
res.set_flag("preset");
res.set_val("min", 1);
res.set_val("units", "units (see below)");
base_options.branches.add(res);
base_options.branches.add(Setting(res));

SettingMeta units("time_units", SettingType::menu, "Time units (domain)");
units.set_flag("preset");
units.set_enum(0, "ns");
units.set_enum(3, "\u03BCs");
units.set_enum(6, "ms");
units.set_enum(9, "s");
base_options.branches.add(units);
base_options.branches.add(Setting(units));

SettingMeta stream("chopper_stream_id", SettingType::text, "Chopper stream ID");
stream.set_flag("preset");
stream.set_flag("stream");
base_options.branches.add(stream);
base_options.branches.add(Setting(stream));

base_options.branches.add(value_latch_.settings(-1, "Value to bin"));

Expand Down
4 changes: 2 additions & 2 deletions source/consumers/TimeDelta1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ TimeDelta1D::TimeDelta1D()
res.set_flag("preset");
res.set_val("min", 1);
res.set_val("units", "units (see below)");
base_options.branches.add(res);
base_options.branches.add(Setting(res));

SettingMeta units("time_units", SettingType::menu, "Time units (domain)");
units.set_flag("preset");
units.set_enum(0, "ns");
units.set_enum(3, "\u03BCs");
units.set_enum(6, "ms");
units.set_enum(9, "s");
base_options.branches.add(units);
base_options.branches.add(Setting(units));

metadata_.overwrite_all_attributes(base_options);
}
Expand Down
8 changes: 4 additions & 4 deletions source/consumers/TimeDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ TimeDomain::TimeDomain()
win.set_val("min", 1);
win.set_val("units", "units (see below)");
win.set_val("description", "Infinite if =0");
base_options.branches.add(win);
base_options.branches.add(Setting(win));

SettingMeta res("time_resolution", SettingType::floating, "Time resolution");
res.set_flag("preset");
res.set_val("min", 1);
res.set_val("units", "units (see below)");
base_options.branches.add(res);
base_options.branches.add(Setting(res));

SettingMeta units("time_units", SettingType::menu, "Time units (domain)");
units.set_flag("preset");
units.set_enum(0, "ns");
units.set_enum(3, "\u03BCs");
units.set_enum(6, "ms");
units.set_enum(9, "s");
base_options.branches.add(units);
base_options.branches.add(Setting(units));

SettingMeta trim("trim", SettingType::boolean, "Trim last bin");
base_options.branches.add(trim);
base_options.branches.add(Setting(trim));

metadata_.overwrite_all_attributes(base_options);
}
Expand Down
8 changes: 4 additions & 4 deletions source/consumers/TimeSpectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ TimeSpectrum::TimeSpectrum()

SettingMeta app("appearance", SettingType::text, "Plot appearance");
app.set_flag("gradient-name");
base_options.branches.add(app);
base_options.branches.add(Setting(app));

SettingMeta flip("flip-y", SettingType::boolean, "Flip Y axis");
base_options.branches.add(flip);
base_options.branches.add(Setting(flip));

SettingMeta res("time_resolution", SettingType::floating, "Time resolution");
res.set_flag("preset");
res.set_val("min", 1);
res.set_val("units", "Time units (see below)");
base_options.branches.add(res);
base_options.branches.add(Setting(res));

SettingMeta units("time_units", SettingType::menu, "Time units (domain)");
units.set_flag("preset");
units.set_enum(0, "ns");
units.set_enum(3, "\u03BCs");
units.set_enum(6, "ms");
units.set_enum(9, "s");
base_options.branches.add(units);
base_options.branches.add(Setting(units));

base_options.branches.add(value_latch_.settings(-1, "Value to bin"));

Expand Down
2 changes: 1 addition & 1 deletion source/core/Consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Consumer::Consumer()
SettingMeta stream("stream_id", SettingType::text, "Stream ID");
stream.set_flag("preset");
stream.set_flag("stream");
attributes.branches.add(stream);
attributes.branches.add(Setting(stream));

metadata_.overwrite_all_attributes(attributes);
}
Expand Down
2 changes: 1 addition & 1 deletion source/core/Detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void Detector::add_optimizations(const std::list<Setting>& l,

Setting Detector::get_setting(std::string id) const
{
return settings_.find({id}, Match::id);
return settings_.find(Setting(id), Match::id);
}

void Detector::clear_optimizations()
Expand Down
Loading