Skip to content
Snippets Groups Projects
Commit 8e88752c authored by Norbert Herrmann's avatar Norbert Herrmann
Browse files

add component selection flag

git-svn-id: https://subversion.gsi.de/cbmsoft/cbmroot/trunk@15656 5a1b234a-d7ce-0410-9a93-fd649a8fa65c
parent ad21f999
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,8 @@ try
if (0 == fMaxTimeslices) fMaxTimeslices = UINT_MAX;
fiSelectComponents = fConfig->GetValue<uint64_t>("SelectComponents");
if (0 == fMaxTimeslices) fMaxTimeslices = UINT_MAX;
// Check which input is defined
// Posibilities
// filename && ! dirname : single file
......@@ -91,6 +93,9 @@ try
} else if ( 0 == fFileName.size() && 0 == fDirName.size() && 0 != fHost.size() && 0 == fPort) {
isGoodInputCombi=true;
LOG(info) << "Host string: " << fHost;
} else if ( 0 == fFileName.size() && 0 == fDirName.size() && 0 != fHost.size() && 0 == fPort) {
isGoodInputCombi=true;
LOG(INFO) << "Host string: " << fHost;
} else {
isGoodInputCombi=false;
}
......@@ -242,6 +247,7 @@ bool CbmMQTsaMultiSamplerTof::ConditionalRun()
if (fComponentsToSend[idx]>0) {
fles::StorableTimeslice tss = fles::StorableTimeslice( ts );
std::stringstream oss;
boost::archive::binary_oarchive oa(oss);
oa << tss;
......@@ -422,8 +428,8 @@ bool CbmMQTsaMultiSamplerTof::CreateAndSendComponent(const fles::Timeslice& ts,
if (fComponentsToSend[idx]>0) {
LOG(debug) << "Create timeslice component for link " << nrComp;
fles::StorableTimeslice component{static_cast<uint32_t>(ts.num_microslices(nrComp), ts.index())};
component.append_component(ts.num_microslices(0));
fles::StorableTimeslice component{static_cast<uint32_t>(ts.num_core_microslices()), ts.index()};
component.append_component(ts.num_microslices(nrComp));
for (size_t m = 0; m < ts.num_microslices(nrComp); ++m) {
component.append_microslice( 0, m, ts.descriptor(nrComp, m), ts.content(nrComp, m) );
......
......@@ -6,11 +6,13 @@ namespace bpo = boost::program_options;
void addCustomOptions(bpo::options_description& options)
{
options.add_options()
("filename", bpo::value<std::string>()->default_value(""), "Filename of the input file")
("dirname", bpo::value<std::string>()->default_value(""), "Directory name where to find the input files")
("flib-host", bpo::value<std::string>()->default_value(""), "Host where the timeslice server is running")
("max-timeslices", bpo::value<uint64_t>()->default_value(0), "Maximum number of timeslices to process for Run/ConditionalRun/OnData (0 - infinite)")
("flib-port", bpo::value<uint64_t>()->default_value(0), "Port where the timeslice server is running");
("filename", bpo::value<std::string>()->default_value(""), "Filename of the input file")
("dirname", bpo::value<std::string>()->default_value(""), "Directory name where to find the input files")
("flib-host", bpo::value<std::string>()->default_value(""), "Host where the timeslice server is running")
("max-timeslices", bpo::value<uint64_t>()->default_value(0), "Maximum number of timeslices to process for Run/ConditionalRun/OnData (0 - infinite)")
("flib-port", bpo::value<uint64_t>()->default_value(0), "Port where the timeslice server is running")
("SelectComponents", bpo::value<uint64_t>()->default_value(0), "Select components for transport");
}
FairMQDevicePtr getDevice(const FairMQProgOptions& /*config*/)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment