12#define BOOST_TEST_MODULE Test MCHConditions DCSNamer
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
16#include <boost/test/unit_test.hpp>
20#include <fmt/format.h>
45 return i1.side == i2.side &&
46 i1.chamber == i2.chamber &&
47 i1.number == i2.number &&
48 i1.measurement == i2.measurement &&
54 if (i1.plane == i2.plane) {
55 if (i1.measurement == i2.measurement) {
56 int s1 = i1.side == Side::Left ? 0 : 1;
57 int s2 = i2.side == Side::Left ? 0 : 1;
59 if (i1.chamber == i2.chamber) {
60 return i1.number < i2.number;
68 return (
int)i1.measurement < (int)i2.measurement;
71 return (
int)i1.plane < (int)i2.plane;
87BOOST_AUTO_TEST_SUITE(o2_mch_conditions)
89BOOST_AUTO_TEST_SUITE(dcsnamer)
139 std::map<size_t, int>
sizes;
140 constexpr size_t maxLen{62};
143 if (
a.size() > maxLen) {
144 std::cout << fmt::format(
"Alias is too long : {:2d} characters, while {:2d} max are allowed : {}\n",
145 a.size(), maxLen,
a);
150 for (
auto p :
sizes) {
151 std::cout << fmt::format(
"{:3d} aliases of size {:2d}\n",
153 len = std::max(
len, p.first);
167 {
"MchHvLvRight/Chamber06Right/Slat08.actual.vMon", {Chamber::Ch06, MeasurementType::HV_V, 8, Plane::Both, Side::Right}},
169 {
"MchHvLvLeft/Chamber06Left/Group02an.SenseVoltage", {Chamber::Ch06, MeasurementType::LV_V_FEE_ANALOG, 2, Plane::Both, Side::Left}},
171 {
"MchHvLvRight/Chamber01Right/Quad3Sect2.actual.iMon", {Chamber::Ch01, MeasurementType::HV_I, 32, Plane::Both, Side::Right}},
173 {
"MchHvLvRight/Chamber01Right/Group04an", {Chamber::Ch01, MeasurementType::LV_V_FEE_ANALOG, 4, Plane::NonBending, Side::Right}},
175 {
"MchHvLvLeft/Chamber00Left/SolCh00LCr01.SenseVoltage", {Chamber::Ch00, MeasurementType::LV_V_SOLAR, 1, Plane::Both, Side::Left}}
182 const auto alias =
e.first;
196BOOST_AUTO_TEST_SUITE_END()
197BOOST_AUTO_TEST_SUITE_END()
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLenum GLenum GLsizei len
GLboolean GLboolean GLboolean GLboolean a
MeasurementType aliasToMeasurementType(std::string_view alias)
std::vector< std::string > expectedHVAliasesVoltages
int toInt(Chamber chamber)
Side aliasToSide(std::string_view alias)
Chamber aliasToChamber(std::string_view alias)
std::optional< Chamber > chamber(int chamberId)
int aliasToNumber(std::string_view dcsAlias)
std::vector< std::string > expectedLVAliasesSolar
std::vector< std::string > aliases(std::vector< MeasurementType > types={ MeasurementType::HV_V, MeasurementType::HV_I, MeasurementType::LV_V_FEE_ANALOG, MeasurementType::LV_V_FEE_DIGITAL, MeasurementType::LV_V_SOLAR})
bool isValid(std::string_view dcsAlias)
Plane aliasToPlane(std::string_view alias)
std::vector< std::string > expectedHVAliasesCurrents
std::vector< std::string > expectedLVAliasesFeeAnalog
bool operator<(const Cathode &c1, const Cathode &c2)
std::vector< std::string > expectedLVAliasesFeeDigital
BOOST_AUTO_TEST_CASE(NumberOfHVAliasesVoltagesIs188)
std::map< std::string, ID > expected
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())