DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TPStreamWriterApplication.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TPStreamWriterApplication_0_dunedaq__appmodel_0_appmodel_H_
4#define _TPStreamWriterApplication_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
20
21 // forward declaration for classes used in relationships and algorithms
22
23namespace dunedaq {
24 namespace appmodel {
25 class TPStreamWriterConf;
26 }
27 namespace confmodel {
28 class Session;
29 }
30}
31
32
33namespace dunedaq {
34 namespace appmodel {
35
36 class TPStreamWriterApplication : public dunedaq::appmodel::SmartDaqApplication, public dunedaq::confmodel::Resource {
37
39 friend class conffwk::DalObject;
40 friend class conffwk::DalFactory;
42
43 protected:
44
46 virtual ~TPStreamWriterApplication() 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_tp_writer = "tp_writer";
95
96 static const std::string& __get_tp_writer_str() noexcept { return s_tp_writer; }
97
98
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 if (!m_tp_writer)
112 {
113 std::ostringstream text;
114 text << "relationship \"" << s_tp_writer << "\" of object " << this << " is not set";
115 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
116 }
117 return m_tp_writer;
118 }
119
120
127 void
129
130
131 public:
132
133 // user-defined algorithms
134
139 void generate_modules(const confmodel::Session*) const override;
140 };
141
142 // out stream operator
143
144 inline std::ostream& operator<<(std::ostream& s, const TPStreamWriterApplication& obj)
145 {
146 return obj.print_object(s);
147 }
148
149 typedef std::vector<const TPStreamWriterApplication*>::const_iterator TPStreamWriterApplicationIterator;
150
151 }
152}
153
154#endif
#define ERS_HERE
const dunedaq::appmodel::TPStreamWriterConf * get_tp_writer() const
Get "tp_writer" relationship value.
TPStreamWriterApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
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...
static const std::string & __get_tp_writer_str() noexcept
void generate_modules(const confmodel::Session *) const override
void set_tp_writer(const dunedaq::appmodel::TPStreamWriterConf *value)
Set "tp_writer" relationship value.
const dunedaq::appmodel::TPStreamWriterConf * m_tp_writer
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< constTPStreamWriterApplication * >::const_iterator TPStreamWriterApplicationIterator
The DUNE-DAQ namespace.
msgpack::object obj