otsdaq
v2_04_02
Return to top level
Main Page
Namespaces
Classes
Files
File List
ARTDAQBuilderTable_table.cc
1
2
3
#include "otsdaq/Macros/TablePluginMacros.h"
4
#include "otsdaq/TablePlugins/ARTDAQBuilderTable.h"
5
#include "otsdaq/TablePlugins/XDAQContextTable.h"
6
7
#include <stdio.h>
8
#include <sys/stat.h>
//for mkdir
9
#include <fstream>
// std::fstream
10
#include <iostream>
11
12
using namespace
ots;
13
14
#define ARTDAQ_FILE_PREAMBLE "builder"
15
16
//========================================================================================================================
17
ARTDAQBuilderTable::ARTDAQBuilderTable(
void
) :
ARTDAQTableBase
(
"ARTDAQBuilderTable"
)
18
{
20
// WARNING: the names used in C++ MUST match the Table INFO //
22
}
23
24
//========================================================================================================================
25
ARTDAQBuilderTable::~ARTDAQBuilderTable(
void
) {}
26
27
//========================================================================================================================
28
void
ARTDAQBuilderTable::init(
ConfigurationManager
* configManager)
29
{
30
// // use isFirstAppInContext to only run once per context, for example to avoid
31
// // generating files on local disk multiple times.
32
// bool isFirstAppInContext = configManager->isOwnerFirstAppInContext();
33
//
34
// //__COUTV__(isFirstAppInContext);
35
// if(!isFirstAppInContext)
36
// return;
37
//
38
// __COUT__ << "*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*" << __E__;
39
// __COUT__ << configManager->__SELF_NODE__ << __E__;
40
//
41
// const XDAQContextTable* contextConfig =
42
// configManager->__GET_CONFIG__(XDAQContextTable);
43
//
44
// std::vector<const XDAQContextTable::XDAQContext*> builderContexts =
45
// contextConfig->getEventBuilderContexts();
46
//
47
// // for each builder context
48
// // output associated fcl config file
49
// for(auto& builderContext : builderContexts)
50
// {
51
// ConfigurationTree builderAppNode = contextConfig->getApplicationNode(
52
// configManager,
53
// builderContext->contextUID_,
54
// builderContext->applications_[0].applicationUID_);
55
// ConfigurationTree builderConfigNode = contextConfig->getSupervisorConfigNode(
56
// configManager,
57
// builderContext->contextUID_,
58
// builderContext->applications_[0].applicationUID_);
59
//
60
// __COUT__ << "Path for this EventBuilder config is " <<
61
//builderContext->contextUID_
62
// << "/" << builderContext->applications_[0].applicationUID_ << "/"
63
// << builderConfigNode.getValueAsString() << __E__;
64
//
65
// outputFHICL(
66
// configManager,
67
// builderConfigNode,
68
// contextConfig->getARTDAQAppRank(builderContext->contextUID_),
69
// contextConfig->getContextAddress(builderContext->contextUID_),
70
// contextConfig->getARTDAQDataPort(configManager,
71
//builderContext->contextUID_), contextConfig, 0);
72
//
73
// flattenFHICL(ARTDAQ_FILE_PREAMBLE, builderConfigNode.getValue());
74
// }
75
}
// end init()
76
//
78
// void ARTDAQBuilderTable::outputFHICL(
79
// const ConfigurationTree& builderNode,
80
// unsigned int selfRank,
81
// const std::string& selfHost,
82
// unsigned int selfPort,
83
// size_t maxFragmentSizeBytes)
84
//{
85
// ARTDAQTableBase::outputDataReceiverFHICL(
86
// builderNode,
87
// selfRank,
88
// selfHost,
89
// selfPort,
90
// ARTDAQTableBase::DataReceiverAppType::EventBuilder,
91
// maxFragmentSizeBytes);
92
//} // end outputFHICL()
93
94
DEFINE_OTS_TABLE(
ARTDAQBuilderTable
)
ots::ARTDAQTableBase
Definition:
ARTDAQTableBase.h:17
ots::ARTDAQBuilderTable
Definition:
ARTDAQBuilderTable.h:10
ots::ConfigurationManager
Definition:
ConfigurationManager.h:18
src
otsdaq
TablePlugins
ARTDAQBuilderTable_table.cc
Generated on Wed Oct 2 2019 09:36:56 for otsdaq by
1.8.5