9 #include <framework/database/DBImportBase.h>
10 #include <framework/database/EventDependency.h>
11 #include <framework/database/Database.h>
12 #include <framework/logging/Logger.h>
17 void DBImportBase::addIntraRunDependency(
unsigned long long int tag,
21 if (!m_object)
return;
23 if (m_dependency == c_None) m_dependency = dependency;
24 if (dependency == m_dependency) {
25 m_objects.push_back(m_object);
26 m_tags.push_back(tag);
29 B2FATAL(
"DBImportBase::addIntraRunDependency: " <<
30 "intra run dependency cannot be of mixed types");
39 switch (m_dependency) {
41 return import<EventDependency>(iov);
43 B2ERROR(
"DBImportBase::import: " <<
44 "intra run dependency of type 'time stamp' not supported yet");
47 B2ERROR(
"DBImportBase::import: " <<
48 "intra run dependency of type 'subrun' not supported yet");
51 if (!m_object)
return false;
52 return Database::Instance().storeData(m_name, m_object, iov);
58 void DBImportBase::clear()
65 m_dependency = c_None;
66 for (
auto&
object : m_objects)
delete object;
73 return Database::Instance().storeData(m_name, intraRun, iov);
76 DBImportBase::~DBImportBase()
78 for (
auto&
object : m_objects)
delete object;
EIntraRunDependency
Intra run dependency types (used only internaly)
A class that describes the interval of experiments/runs for which an object in the database is valid.
Abstract base class for different kinds of events.