Belle II Software  release-05-01-25
relations_internal.cc
1 #include <framework/datastore/RelationIndex.h>
2 #include <framework/dataobjects/EventMetaData.h>
3 #include <framework/dataobjects/ProfileInfo.h>
4 #include <framework/datastore/RelationsObject.h>
5 #include <framework/utilities/TestHelpers.h>
6 
7 #include <gtest/gtest.h>
8 
9 using namespace std;
10 using namespace Belle2;
11 
12 namespace {
14  class RelationsInternal : public ::testing::Test {
15  protected:
17  void SetUp() override
18  {
19  DataStore::Instance().setInitializeActive(true);
20  evtData.registerInDataStore();
21  profileData.registerInDataStore();
22  relObjData.registerInDataStore();
23  DataStore::Instance().setInitializeActive(false);
24 
25  for (int i = 0; i < 10; ++i) {
26  evtData.appendNew();
27  profileData.appendNew();
28  relObjData.appendNew();
29  }
30  }
31 
33  void TearDown() override
34  {
35  DataStore::Instance().reset();
36  }
37 
38  void findRelationsCheckContents();
39 
41  StoreArray<ProfileInfo> profileData;
42  StoreArray<RelationsObject> relObjData;
43  };
44 
46  TEST_F(RelationsInternal, RelationCreate)
47  {
48  DataStore::Instance().setInitializeActive(true);
49  evtData.registerRelationTo(profileData);
50  DataStore::Instance().setInitializeActive(false);
51 
52  RelationArray relation(evtData, profileData);
53  EXPECT_FALSE(relation); //creation only happens on write access or explicitly
54  //since we provided arguments to constructor, these should be available even before create()
55  EXPECT_TRUE(relation.getFromAccessorParams() == evtData.getAccessorParams());
56  EXPECT_TRUE(relation.getToAccessorParams() == profileData.getAccessorParams());
57 
58  relation.create();
59  EXPECT_TRUE(relation);
60  EXPECT_TRUE(relation.getFromAccessorParams() == evtData.getAccessorParams());
61  EXPECT_TRUE(relation.getToAccessorParams() == profileData.getAccessorParams());
62  }
63 
65  TEST_F(RelationsInternal, RelationFind)
66  {
67  DataStore::Instance().setInitializeActive(true);
68  EXPECT_FALSE(evtData.optionalRelationTo(profileData));
69  EXPECT_FALSE(evtData.requireRelationTo(profileData));
70 
72  evtData.registerRelationTo(profileData);
73  evtData2.registerInDataStore("OwnName");
74  evtData2.registerRelationTo(profileData);
75  DataStore::Instance().setInitializeActive(false);
76 
77  RelationArray relation(evtData, profileData);
78  EXPECT_FALSE(RelationArray(DataStore::relationName(evtData.getName(), profileData.getName()), DataStore::c_Event));
79  relation.create();
80  EXPECT_TRUE(RelationArray(evtData, profileData, "", DataStore::c_Event));
81  string name = relation.getName();
82 
83  EXPECT_EQ("OwnName", evtData2.getName());
84 
85 
86  RelationArray relationAttachedUsingName(name, DataStore::c_Event);
87  //trying to get the accessor params should cause the array to attach (and thus get the appropriate data)
88  EXPECT_TRUE(relationAttachedUsingName.getFromAccessorParams() == evtData.getAccessorParams());
89  EXPECT_TRUE(relationAttachedUsingName.getToAccessorParams() == profileData.getAccessorParams());
90  EXPECT_TRUE(relationAttachedUsingName);
91 
92  //check for OwnNameToProfileInfos
93  EXPECT_FALSE(RelationArray(DataStore::relationName(evtData2.getName(), profileData.getName()), DataStore::c_Event));
94  EXPECT_FALSE(RelationArray("OwnNameToProfileInfos", DataStore::c_Event));
95  RelationArray relation2(evtData2, profileData);
96  relation2.create();
97  EXPECT_TRUE(relation2.getName() == "OwnNameToProfileInfos");
98  EXPECT_TRUE(RelationArray(evtData2, profileData));
99 
100  //outside of initialize() this should fail
101  EXPECT_B2FATAL(evtData.requireRelationTo(profileData));
102  }
103 
105  TEST_F(RelationsInternal, RelationWrongDeathTest)
106  {
107  DataStore::Instance().setInitializeActive(true);
108  RelationArray relation1(evtData, profileData, "test");
109  relation1.registerInDataStore();
110  DataStore::Instance().setInitializeActive(false);
111 
112  relation1.create();
113  EXPECT_B2FATAL(RelationArray(profileData, evtData, "test").isValid());
114  EXPECT_B2FATAL(RelationArray(profileData, evtData, "test").add(0, 0, 1.0));
115  EXPECT_B2FATAL(RelationArray(profileData, evtData, "test")[0]);
116  EXPECT_B2FATAL(RelationArray(profileData, evtData, "test").getModified());
117  }
118 
120  TEST_F(RelationsInternal, RegistrationWithDefaultNames)
121  {
122  //not registered yet
123  EXPECT_B2FATAL(relObjData[0]->addRelationTo(profileData[3]));
124  EXPECT_B2FATAL(DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[1], 2.0));
125 
126  DataStore::Instance().setInitializeActive(true);
127  relObjData.registerRelationTo(profileData);
128  evtData.registerRelationTo(profileData);
129  DataStore::Instance().setInitializeActive(false);
130 
131  //profileData has default name, so this should be ok now
132  relObjData[0]->addRelationTo(profileData[4]);
133  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[3], 2.0);
134  }
135 
140  TEST_F(RelationsInternal, RelationDefaultConstructed)
141  {
142  DataStore::Instance().setInitializeActive(true);
143  RelationArray array(evtData, profileData);
144  array.registerInDataStore();
145  DataStore::Instance().setInitializeActive(false);
146 
147  auto* rel = new RelationContainer(); //default constructed object, as written to file
148  ASSERT_TRUE(DataStore::Instance().createObject(rel, false, array));
149 
150  EXPECT_FALSE(array.isValid());
151 
152  //shouldn't die here
153  RelationIndex<EventMetaData, ProfileInfo> index(evtData, profileData);
154  }
155 
157  TEST_F(RelationsInternal, BuildIndex)
158  {
159  DataStore::Instance().setInitializeActive(true);
160  evtData.registerRelationTo(profileData);
161  DataStore::Instance().setInitializeActive(false);
162 
163  RelationArray relation(evtData, profileData);
164  relation.add(0, 0, 1.0);
165  relation.add(0, 1, 2.0);
166  relation.add(0, 2, 3.0);
167  relation.consolidate();
168  EXPECT_EQ(relation.getEntries(), 1);
169 
171  EXPECT_EQ(relIndex.size(), 3u);
172 
173  relation.add(1, 0, 1.0);
175  EXPECT_EQ(relIndex2.size(), 4u);
176  //Rebuilding index will affect old index. Should we copy index?
177  //Copy could be expensive and this should be a corner-case anyway
178  EXPECT_EQ(relIndex.size(), 4u);
179 
180  //check elements of last relation (both from objects point to to_obj)
181  const EventMetaData* first_from_obj = (evtData)[0];
182  const EventMetaData* from_obj = (evtData)[1];
183  const ProfileInfo* to_obj = (profileData)[0];
184  EXPECT_TRUE(first_from_obj == relIndex.getFirstElementTo(to_obj)->from);
185  EXPECT_TRUE(to_obj == relIndex.getFirstElementTo(to_obj)->to);
186  EXPECT_FLOAT_EQ(1.0, relIndex.getFirstElementTo(to_obj)->weight);
187  EXPECT_TRUE(first_from_obj == relIndex.getFirstElementTo(*to_obj)->from);
188  EXPECT_TRUE(to_obj == relIndex.getFirstElementFrom(from_obj)->to);
189  EXPECT_TRUE(to_obj == relIndex.getFirstElementFrom(*from_obj)->to);
190  EXPECT_TRUE(to_obj == relIndex.getFirstElementFrom(first_from_obj)->to);
191 
192  //check search for non-existing relations
193  EXPECT_TRUE(relIndex.getFirstElementTo(nullptr) == nullptr);
194  EXPECT_TRUE(relIndex.getFirstElementFrom(nullptr) == nullptr);
195  EXPECT_TRUE(relIndex.getFirstElementFrom(nullptr) == nullptr);
196  EXPECT_TRUE(relIndex.getFirstElementFrom((evtData)[4]) == nullptr);
197  EXPECT_TRUE(relIndex.getFirstElementTo((profileData)[3]) == nullptr);
198 
199  //check size of found element lists
200  {
201  int size(0);
202  double allweights(0);
203  for (auto& e : relIndex.getElementsFrom((evtData)[0])) {
204  ++size;
205  allweights += e.weight;
206  }
207  EXPECT_EQ(size, 3);
208  EXPECT_DOUBLE_EQ(allweights, 6.0);
209  }
210  {
211  int size(0);
212  double allweights(0);
213  for (auto& e : relIndex.getElementsTo((profileData)[0])) {
214  ++size;
215  allweights += e.weight;
216  }
217  EXPECT_EQ(size, 2);
218  EXPECT_DOUBLE_EQ(allweights, 2.0);
219  }
220  {
221  int size(0);
222  double allweights(0);
223  for (const auto& e : relIndex.getElementsTo((profileData)[4])) {
224  ++size;
225  allweights += e.weight;
226  }
227  EXPECT_EQ(size, 0);
228  EXPECT_DOUBLE_EQ(allweights, 0.0);
229  }
230  }
231 
233  TEST_F(RelationsInternal, InconsistentIndexDeathTest)
234  {
235  DataStore::Instance().setInitializeActive(true);
236  evtData.registerRelationTo(profileData);
237  DataStore::Instance().setInitializeActive(false);
238 
239  RelationArray relation(evtData, profileData);
240  relation.add(0, 10, 1.0);
242  EXPECT_B2FATAL(rel_t relIndex);
243  relation.clear();
244  relation.add(10, 0, 1.0);
245  EXPECT_B2FATAL(rel_t relIndex);
246  }
247 
248 
250  TEST_F(RelationsInternal, EmptyIndex)
251  {
252  DataStore::Instance().setInitializeActive(true);
253  evtData.registerRelationTo(profileData);
254  DataStore::Instance().setInitializeActive(false);
255 
257  EXPECT_FALSE(index);
258  EXPECT_EQ(index.size(), 0u);
259  EXPECT_EQ(index.getFromAccessorParams().first, "");
260  EXPECT_EQ(index.getToAccessorParams().first, "");
261  }
262 
264  TEST_F(RelationsInternal, WrongRelationIndexDeathTest)
265  {
266  StoreArray<EventMetaData> eventData("evts");
267 
268  DataStore::Instance().setInitializeActive(true);
269  RelationArray relation(profileData, evtData, "test");
270  relation.registerInDataStore();
271  RelationArray(evtData, profileData).registerInDataStore();
272  eventData.registerInDataStore();
273  RelationArray relation2(evtData, profileData, "test2");
274  relation2.registerInDataStore();
275  DataStore::Instance().setInitializeActive(false);
276 
277  relation.create();
279  EXPECT_B2FATAL(rel_t(evtData, profileData, "test"));
280  EXPECT_B2FATAL(rel_t("test"));
281 
282  relation2.create();
283  EXPECT_B2FATAL(rel_t(eventData, profileData, "test2"));
284 
285  //This relation works and points to evtData, not eventData.
286  //no check is performed, user is responsible to check
287  //using getFromAccessorParams and getToAccessorParams
288  EXPECT_TRUE(rel_t("test2"));
289  }
290 
292  void RelationsInternal::findRelationsCheckContents()
293  {
294  const EventMetaData* fromObj = (evtData)[0];
295  RelationVector<ProfileInfo> toRels = DataStore::getRelationsWithObj<ProfileInfo>(fromObj);
296  EXPECT_EQ(toRels.size(), 3u);
297  //this is assuming stable order, correct?
298  EXPECT_DOUBLE_EQ(toRels.weight(0), 1.0);
299  EXPECT_DOUBLE_EQ(toRels.weight(1), 2.0);
300  EXPECT_DOUBLE_EQ(toRels.weight(2), -3.0);
301 
302  EXPECT_TRUE(toRels.object(0) == (profileData)[0]);
303  EXPECT_TRUE(toRels.object(1) == (profileData)[1]);
304  EXPECT_TRUE(toRels.object(2) == (profileData)[2]);
305 
306  //test range-based for over RelationVector
307  int i = 0;
308  for (const ProfileInfo& prof : toRels) {
309  (void)prof; //variable unused
310  i++;
311  }
312  EXPECT_EQ(i, 3);
313 
314  const ProfileInfo* toObj = (profileData)[2];
315  RelationVector<EventMetaData> fromRels = DataStore::getRelationsWithObj<EventMetaData>(toObj);
316  EXPECT_EQ(fromRels.size(), 1u);
317  EXPECT_DOUBLE_EQ(fromRels.weight(0), -3.0);
318  EXPECT_TRUE(fromRels.object(0) == fromObj);
319  EXPECT_TRUE(fromRels[0] == fromObj);
320 
321  //some things that shouldn't return anything
322  EXPECT_EQ(DataStore::getRelationsWithObj<EventMetaData>(fromObj).size(), 0u);
323  }
324 
326  TEST_F(RelationsInternal, FindRelations)
327  {
328  DataStore::Instance().setInitializeActive(true);
329  evtData.registerRelationTo(profileData);
330  DataStore::Instance().setInitializeActive(false);
331 
332  //check non-existing relations (registered)
333  const EventMetaData* fromObj = (evtData)[0];
334  RelationVector<ProfileInfo> toRels = DataStore::getRelationsWithObj<ProfileInfo>(fromObj);
335  EXPECT_EQ(toRels.size(), 0u);
336  const ProfileInfo* toObj = (profileData)[2];
337  RelationVector<EventMetaData> fromRels = DataStore::getRelationsWithObj<EventMetaData>(toObj);
338  EXPECT_EQ(fromRels.size(), 0u);
339 
340  //check non-existing relations (unregistered)
341  RelationVector<EventMetaData> toRels2 = DataStore::getRelationsWithObj<EventMetaData>(fromObj);
342  EXPECT_EQ(toRels2.size(), 0u);
343  RelationVector<ProfileInfo> fromRels2 = DataStore::getRelationsWithObj<ProfileInfo>(toObj);
344  EXPECT_EQ(fromRels2.size(), 0u);
345 
346  RelationArray relation(evtData, profileData);
347  relation.add(0, 0, 1.0);
348  relation.add(0, 1, 2.0);
349  relation.add(0, 2, -3.0);
350 
351  findRelationsCheckContents();
352 
353 
354  //check that results don't change after consolidation
355  relation.consolidate();
356  findRelationsCheckContents();
357  }
358 
360  TEST_F(RelationsInternal, AddRelations)
361  {
362  DataStore::Instance().setInitializeActive(true);
363  evtData.registerRelationTo(profileData);
364  DataStore::Instance().setInitializeActive(false);
365 
366  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[0], 1.0);
367  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[1], 2.0);
368  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[2], -3.0);
369 
370  findRelationsCheckContents();
371  }
372 
374  TEST_F(RelationsInternal, GetRelationsWith)
375  {
376  DataStore::Instance().setInitializeActive(true);
377  evtData.registerRelationTo(profileData);
378  DataStore::Instance().setInitializeActive(false);
379 
380  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[0], 1.0);
381  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[1], 2.0);
382  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[2], 3.0);
383 
384  //some objects with no relations to given type
385  EXPECT_EQ(DataStore::getRelationsWithObj<EventMetaData>((evtData)[0]).size(), 0u);
386  EXPECT_EQ(DataStore::getRelationsWithObj<EventMetaData>((profileData)[3]).size(), 0u);
387 
388  RelationVector<ProfileInfo> profRels = DataStore::getRelationsWithObj<ProfileInfo>((evtData)[0]);
389  EXPECT_EQ(profRels.size(), 3u);
390  EXPECT_EQ(profRels.weight(0), 1.0); //should be positive
391 
392  RelationVector<EventMetaData> eventRels = DataStore::getRelationsWithObj<EventMetaData>((profileData)[0]);
393  EXPECT_EQ(eventRels.size(), 1u);
394  EXPECT_EQ(eventRels.weight(0), 1.0); //points to given object, same weight
395  }
396 
398  TEST_F(RelationsInternal, SearchAll)
399  {
400  //2nd array of this type
401  StoreArray<ProfileInfo> profileData2("ProfileInfos2");
402 
403  DataStore::Instance().setInitializeActive(true);
404  profileData2.registerInDataStore();
405  evtData.registerRelationTo(profileData);
406  evtData.registerRelationTo(profileData2);
407  DataStore::Instance().setInitializeActive(false);
408 
409  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[0], 1.0);
410  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[1], 2.0);
411  DataStore::Instance().addRelationFromTo((evtData)[0], (profileData)[2], -3.0);
412 
413  //add one object (plus relation) to the other array
414  profileData2.appendNew();
415  DataStore::Instance().addRelationFromTo((evtData)[0], profileData2[0], 42.0);
416 
417  //profileData2 shouldn't be searched by default when searching or EventMetaData objects
418  findRelationsCheckContents();
419 
420  //actually test "ALL" option
421  const EventMetaData* fromObj = (evtData)[0];
422  RelationVector<ProfileInfo> toRels = DataStore::getRelationsWithObj<ProfileInfo>(fromObj, "ALL");
423  EXPECT_EQ(toRels.size(), 4u);
424  //order might be anything, check sum of weights
425  double sum = 0.0;
426  for (int i = 0; i < (int)toRels.size(); i++) {
427  sum += toRels.weight(i);
428  }
429  EXPECT_DOUBLE_EQ(sum, 42.0 + 1 + 2 - 3);
430 
431  //finding with default TO name
432  EXPECT_EQ(DataStore::getRelationsWithObj<ProfileInfo>(fromObj, profileData.getName()).size(), 3u);
433  //finding with TO name of 2nd array
434  EXPECT_EQ(DataStore::getRelationsWithObj<ProfileInfo>(fromObj, profileData2.getName()).size(), 1u);
435  //and something that doesn't exist
436  EXPECT_EQ(DataStore::getRelationsWithObj<ProfileInfo>(fromObj, "DoesntExist").size(), 0u);
437 
438  const ProfileInfo* toObj = profileData2[0];
439  //object should also be found without specifying the name
440  EXPECT_EQ(DataStore::getRelationsWithObj<EventMetaData>(toObj).size(), 1u);
441  //or with 'ALL"
442  EXPECT_EQ(DataStore::getRelationsWithObj<EventMetaData>(toObj, "ALL").size(), 1u);
443  //and using a base class
444  EXPECT_EQ(DataStore::getRelationsWithObj<TObject>(toObj, "ALL").size(), 1u);
445 
446  //no relations to this type
447  EXPECT_EQ(DataStore::getRelationsWithObj<EventMetaData>(fromObj, "ALL").size(), 0u);
448  //should work again
449  EXPECT_EQ(DataStore::getRelationsWithObj<TObject>(fromObj, "ALL").size(), 4u);
450 
451  }
452 
453 
454  TEST_F(RelationsInternal, ListOfRelatedArrays)
455  {
456  //2nd array of this type
457  StoreArray<ProfileInfo> profileData2("ProfileInfos2");
458 
459  //nothing
460  EXPECT_EQ(0u, DataStore::Instance().getListOfRelatedArrays(profileData2).size());
461  EXPECT_EQ(0u, DataStore::Instance().getListOfRelatedArrays(profileData).size());
462  EXPECT_EQ(0u, DataStore::Instance().getListOfRelatedArrays(evtData).size());
463 
464  DataStore::Instance().setInitializeActive(true);
465  profileData2.registerInDataStore();
466  evtData.registerRelationTo(profileData);
467  evtData.registerRelationTo(profileData2);
468  DataStore::Instance().setInitializeActive(false);
469 
470  EXPECT_EQ(1u, DataStore::Instance().getListOfRelatedArrays(profileData2).size());
471  EXPECT_EQ(1u, DataStore::Instance().getListOfRelatedArrays(profileData).size());
472  EXPECT_EQ(2u, DataStore::Instance().getListOfRelatedArrays(evtData).size());
473 
474  EXPECT_EQ(evtData.getName(), DataStore::Instance().getListOfRelatedArrays(profileData2).at(0));
475  EXPECT_EQ(evtData.getName(), DataStore::Instance().getListOfRelatedArrays(profileData).at(0));
476  }
477 
478  TEST_F(RelationsInternal, StoreArray_clear_cleans_relations)
479  {
480  DataStore::Instance().setInitializeActive(true);
481  evtData.registerRelationTo(relObjData);
482  relObjData.registerRelationTo(profileData);
483  evtData.registerRelationTo(profileData);
484  DataStore::Instance().setInitializeActive(false);
485 
486  DataStore::Instance().addRelationFromTo((evtData)[0], (relObjData)[0], 1.0);
487  DataStore::Instance().addRelationFromTo((relObjData)[1], (profileData)[9], 1.0);
488  DataStore::Instance().addRelationFromTo((evtData)[1], (profileData)[1], 2.0);
489 
490  evtData.clear();
491  profileData.clear();
492 
493  EXPECT_EQ(DataStore::getRelationsWithObj<ProfileInfo>(relObjData[1]).size(), 0u);
494  EXPECT_EQ(DataStore::getRelationsWithObj<EventMetaData>(relObjData[0]).size(), 0u);
495  }
496 } // namespace
Belle2::RelationVector::size
size_t size() const
Get number of relations.
Definition: RelationVector.h:98
Belle2::RelationIndexContainer::Element::weight
RelationElement::weight_type weight
weight of the relation.
Definition: RelationIndexContainer.h:82
Belle2::RelationArray
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:72
Belle2::ProfileInfo
Store execution time and memory usage.
Definition: ProfileInfo.h:32
Belle2::StoreArray::registerRelationTo
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Definition: StoreArray.h:150
Belle2::RelationIndex::getFirstElementTo
const Element * getFirstElementTo(const TO &to) const
Return a pointer to the first relation Element of the given object.
Definition: RelationIndex.h:222
prepareAsicCrosstalkSimDB.e
e
aux.
Definition: prepareAsicCrosstalkSimDB.py:53
Belle2::RelationContainer
Class to store relations between StoreArrays in the DataStore.
Definition: RelationContainer.h:35
Belle2::RelationIndex
Provides access to fast ( O(log n) ) bi-directional lookups on a specified relation.
Definition: RelationIndex.h:84
Belle2::TrackFindingCDC::NForwardBackward::isValid
bool isValid(EForwardBackward eForwardBackward)
Check whether the given enum instance is one of the valid values.
Definition: EForwardBackward.h:55
Belle2::RelationIndex::getFirstElementFrom
const Element * getFirstElementFrom(const FROM &from) const
Return a pointer to the first relation Element of the given object.
Definition: RelationIndex.h:199
Belle2::RelationIndex::getElementsTo
range_to getElementsTo(const TO *to) const
Return a range of all elements pointing to the given object.
Definition: RelationIndex.h:179
Belle2::RelationIndexContainer::Element::from
const FROM * from
pointer of the element from which the relation points.
Definition: RelationIndexContainer.h:76
Belle2::RelationIndex::size
size_t size() const
Get the size of the index.
Definition: RelationIndex.h:248
Belle2::StoreAccessorBase::registerInDataStore
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Definition: StoreAccessorBase.h:54
Belle2::RelationIndexContainer::Element::to
const TO * to
pointer of the element to which the relation points.
Definition: RelationIndexContainer.h:79
Belle2::RelationIndex::getElementsFrom
range_from getElementsFrom(const FROM *from) const
Return a range of all elements pointing from the given object.
Definition: RelationIndex.h:157
Belle2::RelationVector
Class for type safe access to objects that are referred to in relations.
Definition: DataStore.h:38
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::RelationVector::object
T * object(int index) const
Get object with index.
Definition: RelationVector.h:106
Belle2::TEST_F
TEST_F(GlobalLabelTest, LargeNumberOfTimeDependentParameters)
Test large number of time-dep params for registration and retrieval.
Definition: globalLabel.cc:65
Belle2::EventMetaData
Store event, run, and experiment numbers.
Definition: EventMetaData.h:43
Belle2::RelationVector::weight
float weight(int index) const
Get weight with index.
Definition: RelationVector.h:120
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33