DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DFOApplication.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DFOApplication_0_dunedaq__appmodel_0_appmodel_H_
4#define _DFOApplication_0_dunedaq__appmodel_0_appmodel_H_
5
6#include <stdint.h> // to define 64 bits types
7#include <iostream>
8#include <sstream>
9#include <string>
10#include <map>
11#include <vector>
12
14#include "conffwk/DalObject.hpp"
15
16 // include files for classes used in inheritance hierarchy
17
19
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace appmodel {
24 class DFOConf;
25 }
26 namespace confmodel {
27 class DaqModule;
28 class Session;
29 }
30}
31
32
33namespace dunedaq {
34 namespace appmodel {
35
37
38 friend class conffwk::Configuration;
39 friend class conffwk::DalObject;
40 friend class conffwk::DalFactory;
41 friend class conffwk::DalRegistry;
42
43 protected:
44
46 virtual ~DFOApplication() noexcept;
47 virtual void init(bool init_children);
48
49 public:
50
53 static const std::string& s_class_name;
54
55
65 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
66
67
77 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
78
79
80 protected:
81
82 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
83
84
85 private:
86
88
89
90 public:
91
92 // relationship names
93
94 inline static const std::string s_dfo = "dfo";
95
96 static const std::string& __get_dfo_str() noexcept { return s_dfo; }
97
98
106 get_dfo() const
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 if (!m_dfo)
112 {
113 std::ostringstream text;
114 text << "relationship \"" << s_dfo << "\" of object " << this << " is not set";
115 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
116 }
117 return m_dfo;
118 }
119
120
127 void
129
130
131 public:
132
133 // user-defined algorithms
134
139 std::vector<const dunedaq::confmodel::DaqModule*> generate_modules(const confmodel::Session*) const override;
140 };
141
142 // out stream operator
143
144 inline std::ostream& operator<<(std::ostream& s, const DFOApplication& obj)
145 {
146 return obj.print_object(s);
147 }
148
149 typedef std::vector<const DFOApplication*>::const_iterator DFOApplicationIterator;
150
151 }
152}
153
154#endif
#define ERS_HERE
std::vector< const dunedaq::confmodel::DaqModule * > generate_modules(const confmodel::Session *) const override
static const std::string & s_class_name
virtual ~DFOApplication() noexcept
const dunedaq::appmodel::DFOConf * get_dfo() const
Get "dfo" relationship value.
virtual void init(bool init_children)
void set_dfo(const dunedaq::appmodel::DFOConf *value)
Set "dfo" relationship value.
const dunedaq::appmodel::DFOConf * m_dfo
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
DFOApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_dfo_str() noexcept
static const std::string s_dfo
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL object.
void check_init() const
Check and initialize object if necessary.
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
Generic configuration exception.
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constDFOApplication * >::const_iterator DFOApplicationIterator
Including Qt Headers.