8 #include <vxd/dataobjects/VxdID.h>
9 #include <gtest/gtest.h>
26 EXPECT_EQ((
string)l,
"1.1.1");
33 for (
int layer = 0; layer <= VxdID::MaxLayer; ++layer) {
34 for (
int ladder = 0; ladder <= VxdID::MaxLadder; ++ladder) {
35 for (
int sensor = 0; sensor <= VxdID::MaxSensor; ++sensor) {
36 for (
int segment = 0; segment <= VxdID::MaxSegment; ++segment) {
37 string sid = (string)
VxdID(layer, ladder, sensor, segment);
38 VxdID id(layer, ladder, sensor, segment);
39 EXPECT_EQ(
id,
VxdID(sid));
40 EXPECT_EQ(
id.getLayerNumber(), layer);
41 EXPECT_EQ(
id.getLadderNumber(), ladder);
42 EXPECT_EQ(
id.getSensorNumber(), sensor);
43 EXPECT_EQ(
id.getSegmentNumber(), segment);
50 EXPECT_THROW(
VxdID(
"1.f"), invalid_argument);
51 EXPECT_THROW(
VxdID(
"1.1.f"), invalid_argument);
52 EXPECT_THROW(
VxdID(
"1.*.f"), invalid_argument);
53 EXPECT_THROW(
VxdID(
"1.1.1 and some more"), invalid_argument);
Class to uniquely identify a any structure of the PXD and SVD.
TEST(VxdID, FromString)
Check the string conversion of the VxdID in both directions.
Abstract base class for different kinds of events.