DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
disabled-components.cpp File Reference
Include dependency graph for disabled-components.cpp:

Go to the source code of this file.

Namespaces

namespace  dunedaq
 Including Qt Headers.
 

Functions

static void fill (const ResourceSet &rs, std::vector< const ResourceSetOR * > &rs_or, std::vector< const ResourceSetAND * > &rs_and, TestCircularDependency &cd_fuse)
 
static void fill (const Segment &s, std::vector< const ResourceSetOR * > &rs_or, std::vector< const ResourceSetAND * > &rs_and, TestCircularDependency &cd_fuse)
 
static void fill (const Session &session, std::vector< const ResourceSetOR * > &rs_or, std::vector< const ResourceSetAND * > &rs_and, TestCircularDependency &cd_fuse)
 

Function Documentation

◆ fill() [1/3]

static void fill ( const ResourceSet & rs,
std::vector< const ResourceSetOR * > & rs_or,
std::vector< const ResourceSetAND * > & rs_and,
TestCircularDependency & cd_fuse )
static

Definition at line 139 of file disabled-components.cpp.

145{
146 if (const ResourceSetAND * r1 = rs.cast<ResourceSetAND>())
147 {
148 rs_and.push_back(r1);
149 }
150 else if (const ResourceSetOR * r2 = rs.cast<ResourceSetOR>())
151 {
152 rs_or.push_back(r2);
153 }
154
155 for (auto & i : rs.get_contains())
156 {
157 AddTestOnCircularDependency add_fuse_test(cd_fuse, i);
158 if (const ResourceSet * rs2 = i->cast<ResourceSet>())
159 {
160 fill(*rs2, rs_or, rs_and, cd_fuse);
161 }
162 }
163}
const TARGET * cast() const noexcept
Casts object to different class.
const std::vector< const dunedaq::confmodel::ResourceBase * > & get_contains() const
Get "contains" relationship value. A resource set is a container of resources to easily implement gro...
static void fill(const ResourceSet &rs, std::vector< const ResourceSetOR * > &rs_or, std::vector< const ResourceSetAND * > &rs_and, TestCircularDependency &cd_fuse)

◆ fill() [2/3]

static void fill ( const Segment & s,
std::vector< const ResourceSetOR * > & rs_or,
std::vector< const ResourceSetAND * > & rs_and,
TestCircularDependency & cd_fuse )
static

Definition at line 168 of file disabled-components.cpp.

174{
175 for (auto & app : s.get_applications()) {
176 AddTestOnCircularDependency add_fuse_test(cd_fuse, app);
177 if (const ResourceSet * rs = app->cast<ResourceSet>()) {
178 fill(*rs, rs_or, rs_and, cd_fuse);
179 }
180 }
181
182 for (auto & seg : s.get_segments()) {
183 TLOG_DEBUG(6) << "Filling segment " << seg->UID();
184 AddTestOnCircularDependency add_fuse_test(cd_fuse, seg);
185 fill(*seg, rs_or, rs_and, cd_fuse);
186 }
187}
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ fill() [3/3]

static void fill ( const Session & session,
std::vector< const ResourceSetOR * > & rs_or,
std::vector< const ResourceSetAND * > & rs_and,
TestCircularDependency & cd_fuse )
static

Definition at line 192 of file disabled-components.cpp.

198{
199#if 0
200 if (const OnlineSegment * onlseg = p.get_OnlineInfrastructure())
201 {
202 AddTestOnCircularDependency add_fuse_test(cd_fuse, onlseg);
203 fill(*onlseg, rs_or, rs_and, cd_fuse);
204
205 // NOTE: normally application may not be ResourceSet, but for some "exotic" cases put this code
206 for (auto &a : p.get_OnlineInfrastructureApplications())
207 {
208 if (const ResourceSet * rs = a->cast<ResourceSet>())
209 {
210 fill(*rs, rs_or, rs_and, cd_fuse);
211 }
212 }
213 }
214#endif
215
216 auto seg = session.get_segment();
217 AddTestOnCircularDependency add_fuse_test(cd_fuse, seg);
218 fill(*seg, rs_or, rs_and, cd_fuse);
219}