DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DalFactory.hxx
Go to the documentation of this file.
1#if !defined(__DUNEDAQ_CONFFWK_DALFACTORY_HXX__)
2#define __DUNEDAQ_CONFFWK_DALFACTORY_HXX__
3
4namespace dunedaq {
5namespace conffwk {
6
8template<class T>
9void
10DalFactory::register_dal_class(const std::string& name)
11{
12 std::lock_guard<std::mutex> scoped_lock(m_class_mutex);
13
14 TLOG_DEBUG(50) << "register class " << name;
15
16 if (m_creators.emplace(name, [](conffwk::DalRegistry& db, const conffwk::ConfigObject& o) { return new T(db, o); })
17 .second == false) {
18 TLOG() << "class " << name << " was already registered";
19 }
20}
21
22} // namespace conffwk
23} // namespace dunedaq
24
25#endif // __DUNEDAQ_CONFFWK_DALFACTORY_HXX__
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:116
#define TLOG(...)
Definition macro.hpp:21
The DUNE-DAQ namespace.