Belle II Software development
SoftwareTriggerDBHandlerTest Class Reference

Class to test the down- and upload of trigger cuts to the DB. More...

Inheritance diagram for SoftwareTriggerDBHandlerTest:

Private Member Functions

void SetUp ()
 Setup the local DB and the datastore with the event meta data.
 
void TearDown ()
 Destroy the DB and the DataStore.
 

Private Attributes

TestHelpers::TempDirCreatorm_tmpDir = nullptr
 Do everything in a temporary dir.
 

Detailed Description

Class to test the down- and upload of trigger cuts to the DB.

Definition at line 26 of file softwareTriggerDBHandler.cc.

Member Function Documentation

◆ SetUp()

void SetUp ( )
inlineprivate

Setup the local DB and the datastore with the event meta data.

Definition at line 31 of file softwareTriggerDBHandler.cc.

32 {
33 m_tmpDir = new TestHelpers::TempDirCreator;
34
35 StoreObjPtr<EventMetaData> evtPtr;
37 evtPtr.registerInDataStore();
39 evtPtr.construct(1, 0, 0);
40
42 conf.setNewPayloadLocation(m_tmpDir->getTempDir() + "/testPayloads/TestDatabase.txt");
43 conf.prependTestingPayloadLocation(m_tmpDir->getTempDir() + "/testPayloads/TestDatabase.txt");
44 }
static Configuration & getInstance()
Get a reference to the instance which will be used when the Database is initialized.
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
void setInitializeActive(bool active)
Setter for m_initializeActive.
Definition: DataStore.cc:94
TestHelpers::TempDirCreator * m_tmpDir
Do everything in a temporary dir.
std::string getTempDir() const
Returns path of temporary directory.
Definition: TestHelpers.cc:66

◆ TearDown()

void TearDown ( )
inlineprivate

Destroy the DB and the DataStore.

Definition at line 47 of file softwareTriggerDBHandler.cc.

48 {
52
53 delete m_tmpDir;
54 }
void reset(EDurability durability)
Frees memory occupied by data store items and removes all objects from the map.
Definition: DataStore.cc:86
void reset(bool keepEntries=false)
Invalidate all payloads.
Definition: DBStore.cc:177
static DBStore & Instance()
Instance of a singleton DBStore.
Definition: DBStore.cc:28
static void reset(bool keepConfig=false)
Reset the database instance.
Definition: Database.cc:50

Member Data Documentation

◆ m_tmpDir

TestHelpers::TempDirCreator* m_tmpDir = nullptr
private

Do everything in a temporary dir.

Definition at line 28 of file softwareTriggerDBHandler.cc.


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