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;
36 DataStore::Instance().setInitializeActive(true);
37 evtPtr.registerInDataStore();
38 DataStore::Instance().setInitializeActive(false);
39 evtPtr.construct(1, 0, 0);
40
41 auto& conf = Conditions::Configuration::getInstance();
42 conf.setNewPayloadLocation(m_tmpDir->getTempDir() + "/testPayloads/TestDatabase.txt");
43 conf.prependTestingPayloadLocation(m_tmpDir->getTempDir() + "/testPayloads/TestDatabase.txt");
44 }

◆ TearDown()

void TearDown ( )
inlineprivate

Destroy the DB and the DataStore.

Definition at line 47 of file softwareTriggerDBHandler.cc.

48 {
49 Database::reset();
50 DBStore::Instance().reset();
51 DataStore::Instance().reset();
52
53 delete m_tmpDir;
54 }

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: