Helper class for configuring the builder test.
More...
#include <proto/Config.hh>
|
| Config (int rank, int nprocs, int buffer_count, size_t max_payload_size, int argc, char *argv[]) |
| Config Constructor. More...
|
|
int | destCount () const |
| Get the number of destinations for this process. More...
|
|
int | destStart () const |
| Get the rank of the first destination for this process. More...
|
|
int | srcCount () const |
| Get the number of sources for this process. More...
|
|
int | srcStart () const |
| Get the rank of the first source for this process. More...
|
|
int | getDestFriend () const |
| Get the corresponding destination for this source. More...
|
|
int | getSrcFriend () const |
| Get the corresponding source for this destination. More...
|
|
int | getArtArgc (int argc, char *argv[]) const |
| Gets the count of arguments after a – delimiter. More...
|
|
char ** | getArtArgv (int argc, char *argv[]) const |
| Get the array of arguments after a – delimiter. More...
|
|
std::string | typeName () const |
| Get the name of the type of this process. More...
|
|
void | writeInfo () const |
| Write information about this Config class to a file.
|
|
void | print (std::ostream &ost) const |
| Dump configuration information (space delimited) to a stream. More...
|
|
void | printHeader (std::ostream &ost) const |
| Write configuration parameter names to a stream. More...
|
|
fhicl::ParameterSet | makeParameterSet () const |
| Write a ParameterSet using configuration. More...
|
|
fhicl::ParameterSet | getArtPset () |
| Get the ParameterSet to use to configure art. More...
|
|
|
static void | throwUsage (char *argv0, const std::string &msg) |
| Write the usage to cerr and throw an exception. More...
|
|
static double | getArgDetectors (int argc, char *argv[]) |
| Get the detectors count from the command line. More...
|
|
static double | getArgSinks (int argc, char *argv[]) |
| Get the sink count from the command line. More...
|
|
static int | getArgQueueSize (int argc, char *argv[]) |
| Get the Queue Size from the command line. More...
|
|
static int | getArgRun (int argc, char *argv[]) |
| Get the Run number from the command line. More...
|
|
static std::string | getProcessorName () |
| Call MPI_Get_processor_name. More...
|
|
|
static const char * | usage = "DetectorsPerNode SinksPerNode Run" |
| String for command-line arguments.
|
|
Helper class for configuring the builder test.
Definition at line 21 of file Config.hh.
Type of the builder instance.
Enumerator |
---|
TaskSink |
This Builder is a "Sink".
|
TaskSource |
This Builder is a "Source".
|
TaskDetector |
This Builder is a "Detector".
|
Definition at line 32 of file Config.hh.
artdaq::Config::Config |
( |
int |
rank, |
|
|
int |
nprocs, |
|
|
int |
buffer_count, |
|
|
size_t |
max_payload_size, |
|
|
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Config Constructor.
- Parameters
-
rank | Rank of this process |
nprocs | Total number of processes in the test |
buffer_count | Number of Fragments that may be in-flight simultaneously |
max_payload_size | Maximum size of the Fragments |
argc | Number of arguments |
argv | Array of arguments, as strings |
Definition at line 26 of file Config.cc.
int artdaq::Config::destCount |
( |
| ) |
const |
Get the number of destinations for this process.
- Returns
- The number of destinations for this process
Definition at line 63 of file Config.cc.
int artdaq::Config::destStart |
( |
| ) |
const |
Get the rank of the first destination for this process.
- Returns
- The rank of the first destination for this process
Definition at line 69 of file Config.cc.
static double artdaq::Config::getArgDetectors |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
inlinestatic |
Get the detectors count from the command line.
- Parameters
-
argc | Argument count |
argv | Array of arguments as strings |
- Returns
- Detector count
Definition at line 187 of file Config.hh.
static int artdaq::Config::getArgQueueSize |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
inlinestatic |
Get the Queue Size from the command line.
- Parameters
-
argc | Argument count |
argv | Array of arguments as strings |
- Returns
- Queue size
Definition at line 211 of file Config.hh.
static int artdaq::Config::getArgRun |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
inlinestatic |
Get the Run number from the command line.
- Parameters
-
argc | Argument count |
argv | Array of arguments as strings |
- Returns
- Run number
Definition at line 223 of file Config.hh.
static double artdaq::Config::getArgSinks |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
inlinestatic |
Get the sink count from the command line.
- Parameters
-
argc | Argument count |
argv | Array of arguments as strings |
- Returns
- Sink count
Definition at line 199 of file Config.hh.
int artdaq::Config::getArtArgc |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| const |
Gets the count of arguments after a – delimiter.
- Parameters
-
argc | Original argc |
argv | Original argv |
- Returns
- argc of arguments after –
Definition at line 103 of file Config.cc.
char ** artdaq::Config::getArtArgv |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| const |
Get the array of arguments after a – delimiter.
- Parameters
-
argc | Original argc |
argv | Original argv |
- Returns
- argv of arguments after –
Definition at line 114 of file Config.cc.
fhicl::ParameterSet artdaq::Config::getArtPset |
( |
| ) |
|
Get the ParameterSet to use to configure art.
- Returns
- The ParameterSet used to configure art
* The ParameterSet is read for the following Parameters:
* "daq" (REQUIRED): DAQ config FHiCL table
* "buffer_count" (Default: buffer_count): Maximum number of simulatneous Fragments
* "max_fragment_size_words" (Default: max_payload_size): Maximum size of Fragments to create/transfer
*
Definition at line 181 of file Config.cc.
int artdaq::Config::getDestFriend |
( |
| ) |
const |
Get the corresponding destination for this source.
- Returns
- The corresponding destiantion for this source
Definition at line 93 of file Config.cc.
static std::string artdaq::Config::getProcessorName |
( |
| ) |
|
|
inlinestatic |
Call MPI_Get_processor_name.
- Returns
- The result of MPI_Get_processor_name
Definition at line 233 of file Config.hh.
int artdaq::Config::getSrcFriend |
( |
| ) |
const |
Get the corresponding source for this destination.
- Returns
- The corresponding source for this destination
Definition at line 98 of file Config.cc.
fhicl::ParameterSet artdaq::Config::makeParameterSet |
( |
| ) |
const |
Write a ParameterSet using configuration.
- Returns
- A ParameterSet with sources and destinations blocks, as appropriate for the Task
Definition at line 148 of file Config.cc.
void artdaq::Config::print |
( |
std::ostream & |
ost | ) |
const |
Dump configuration information (space delimited) to a stream.
- Parameters
-
ost | Stream to dump configuration to |
Definition at line 132 of file Config.cc.
void artdaq::Config::printHeader |
( |
std::ostream & |
ost | ) |
const |
Write configuration parameter names to a stream.
- Parameters
-
ost | Stream to write configuration parameter names to |
Definition at line 119 of file Config.cc.
int artdaq::Config::srcCount |
( |
| ) |
const |
Get the number of sources for this process.
- Returns
- The number of sources for this process
Definition at line 75 of file Config.cc.
int artdaq::Config::srcStart |
( |
| ) |
const |
Get the rank of the first source for this process.
- Returns
- The rank of the first source for this process
Definition at line 81 of file Config.cc.
static void artdaq::Config::throwUsage |
( |
char * |
argv0, |
|
|
const std::string & |
msg |
|
) |
| |
|
inlinestatic |
Write the usage to cerr and throw an exception.
- Parameters
-
argv0 | First parameter in argv |
msg | Exception message |
Definition at line 175 of file Config.hh.
std::string artdaq::Config::typeName |
( |
| ) |
const |
Get the name of the type of this process.
- Returns
- The name of the type of this process (one of "Sink", "Source" or "Detector")
Definition at line 87 of file Config.cc.
The documentation for this class was generated from the following files: