Belle II Software development
CDCGeometryLoader Class Reference

Load the CDC geometry from the conditions database. More...

#include <CDCGeometryLoader.h>

Static Public Member Functions

static void loadDatabase ()
 Helper function to open the database - only for tests offside the standard event processing.
 
static void closeDatabase ()
 Helper function to close and reset the database - only for tests offside the standard event processing.
 

Detailed Description

Load the CDC geometry from the conditions database.

Definition at line 18 of file CDCGeometryLoader.h.

Member Function Documentation

◆ closeDatabase()

void closeDatabase ( )
static

Helper function to close and reset the database - only for tests offside the standard event processing.

Definition at line 47 of file CDCGeometryLoader.cc.

48{
51}
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
void reset(EDurability durability)
Frees memory occupied by data store items and removes all objects from the map.
Definition: DataStore.cc:86
static void reset(bool keepConfig=false)
Reset the database instance.
Definition: Database.cc:50

◆ loadDatabase()

void loadDatabase ( )
static

Helper function to open the database - only for tests offside the standard event processing.

Definition at line 21 of file CDCGeometryLoader.cc.

22{
23 // Setup the DataStore and
24 // create the default event number to be used for the DB parameter
28 evtPtr.registerInDataStore();
30 // use experiment 0 for MC-only events
31 evtPtr.construct(1, 0, 0);
32
34 // load database content for IoV in EventMetaData
36
37 DBObjPtr<CDCGeometry> cdcGeometry;
38 if (!cdcGeometry) {
39 B2FATAL("No CDC configuration can be loaded!");
40 } else {
41 B2INFO("CDC Geometry loaded from DB");
42 }
43
44 CDC::CDCGeometryPar::Instance(&(*cdcGeometry));
45}
static CDCGeometryPar & Instance(const CDCGeometry *=nullptr)
Static method to get a reference to the CDCGeometryPar instance.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
void setInitializeActive(bool active)
Setter for m_initializeActive.
Definition: DataStore.cc:94
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
bool construct(Args &&... params)
Construct an object of type T in this StoreObjPtr, using the provided constructor arguments.
Definition: StoreObjPtr.h:119
static DBStore & Instance()
Instance of a singleton DBStore.
Definition: DBStore.cc:28
void update()
Updates all objects that are outside their interval of validity.
Definition: DBStore.cc:79

The documentation for this class was generated from the following files: