artdaq Namespace Reference

The artdaq namespace. More...

Namespaces

namespace  detail
 

artdaq implementation details namespace


namespace  TimeUtils
 

Namespace to hold useful time-converting functions.


Classes

struct  FailIfFull
 ConcurrentQueue policy to throw an exception when the queue is full. More...
struct  KeepNewest
 ConcurrentQueue policy to discard oldest elements when the queue is full. More...
struct  RejectNewest
 ConcurrentQueue policy to discard new elements when the queue is full. More...
class  ConcurrentQueue
struct  MonitoredQuantityStats
 struct containing MonitoredQuantity data More...
class  MonitoredQuantity
 This class keeps track of statistics for a set of sample values and provides timing information on the samples. More...
struct  QuickVec
 A QuickVec behaves like a std::vector, but does no initialization of its data, making it faster at the cost of having to ensure that uninitialized data is not read. More...
class  SharedMemoryEventReceiver
 SharedMemoryEventReceiver can receive events (as written by SharedMemoryEventManager) from Shared Memory. More...
class  SharedMemoryFragmentManager
 The SharedMemoryFragmentManager is a SharedMemoryManager that deals with Fragment transfers using a SharedMemoryManager. More...
class  SharedMemoryManager
 The SharedMemoryManager creates a Shared Memory area which is divided into a number of fixed-size buffers. It provides for multiple readers and multiple writers through a dual semaphore system. More...
class  SimpleMemoryReader
 SimpleMemoryReader will continue to read RawEvent objects off the queue until it encounters a null pointer, at which point it stops. More...
class  SimpleQueueReader
 SimpleQueueReader will continue to read RawEvent objects off the queue until it encounters a null pointer, at which point it stops. More...
class  StatisticsCollection
 A collection of MonitoredQuantity instances describing low-level statistics of the _artdaq_ system. More...
class  ContainerFragment
 The artdaq::ContainerFragment class represents a Fragment which contains other Fragments. More...
class  ContainerFragmentLoader
 A Read-Write version of the ContainerFragment, used for filling ContainerFragment objects with other Fragment objects. More...
class  Fragment
 A Fragment contains the data from one piece of the DAQ system for one event The artdaq::Fragment is the main data storage class in artdaq. Each Fragment represents the data from one piece of the readout, for one artdaq event. BoardReaders create Fragments and send them to the EventBuilders, where they are assembled into artdaq::RawEvent objects. More...
class  PackageBuildInfo
 Class holding information about the _artdaq_ package build. More...
class  RawEvent
 RawEvent is the artdaq view of a generic event, containing a header and zero or more Fragments. More...
class  FragmentGenerator
 Base class for all FragmentGenerators. More...
class  SimpleLookupPolicy
 This class is intended to find files using a set lookup order. More...

Typedefs

typedef std::shared_ptr< RawEventRawEvent_ptr
 A smart pointer to a RawEvent object.
typedef
artdaq::ConcurrentQueue
< RawEvent_ptr
RawEventQueue
 A ConcurrentQueue of RawEvent objects.
typedef std::shared_ptr
< MonitoredQuantity
MonitoredQuantityPtr
 A shared_ptr to a MonitoredQuantity instance.
typedef
detail::RawFragmentHeader::RawDataType 
RawDataType
 The RawDataType (currently a 64-bit integer) is the basic unit of data representation within _artdaq_.
typedef std::vector< FragmentFragments
 A std::vector of Fragment objects.
typedef std::unique_ptr< FragmentFragmentPtr
 A std::unique_ptr to a Fragment object.
typedef std::list< FragmentPtrFragmentPtrs
 A std::list of FragmentPtrs.
typedef std::unique_ptr
< artdaq::FragmentGenerator
makeFunc_t (fhicl::ParameterSet const &ps)
 Constructs a FragmentGenerator instance, and returns a pointer to it.

Enumerations

enum  ExceptionHandlerRethrow { yes, no }
 

Controls whether the ExceptionHandler will rethrow after printing exception details.

More...

Functions

RawEventQueuegetGlobalQueue (RawEventQueue::SizeType maxSize=std::numeric_limits< RawEventQueue::SizeType >::max())
 The first thread to call getGlobalQueue() causes the creation of the queue. The queue will be destroyed at static destruction time.
int SimpleMemoryReaderApp (int argc, char **argv)
 An application which pops items off a RawEventQueue using the SimpleMemoryReader.
int simpleQueueReaderApp (int argc, char **argv)
 An application which pops items off a RawEventQueue using the SimpleQueueReader.
bool fragmentSequenceIDCompare (Fragment i, Fragment j)
 Comparator for Fragment objects, based on their sequence_id.
std::ostream & operator<< (std::ostream &os, Fragment const &f)
 Prints the given Fragment to the stream.
std::ostream & operator<< (std::ostream &os, RawEvent const &ev)
 Prints the RawEvent to the given stream.
std::unique_ptr
< FragmentGenerator
makeFragmentGenerator (std::string const &generator_plugin_spec, fhicl::ParameterSet const &ps)
 Instantiates the FragmentGenerator plugin with the given name, using the given ParameterSet.
std::string generateMessageFacilityConfiguration (char const *progname, bool useConsole=true, bool printDebug=false)
 Create the MessageFacility configuration Fhicl string.
void configureTRACE (fhicl::ParameterSet &trace_pset)
 Configure TRACE.
void configureMessageFacility (char const *progname, bool useConsole=true, bool printDebug=false)
 Configure and start the message facility. Provide the program name so that messages will be appropriately tagged.
std::string setMsgFacAppName (const std::string &appType, unsigned short port)
 Set the message facility application name using the specified application type and port number.
void ExceptionHandler (ExceptionHandlerRethrow decision, std::string optional_message="")
 The ExceptionHandler class prints out all available information about an excection, then optionally re-throws.

Detailed Description

The artdaq namespace.


Typedef Documentation

typedef std::unique_ptr<Fragment> artdaq::FragmentPtr

A std::unique_ptr to a Fragment object.

To reduce move or copy operations, most artdaq processing is done using FragmentPtr objects.

Definition at line 53 of file Fragment.hh.

typedef std::unique_ptr<artdaq::FragmentGenerator> artdaq::makeFunc_t(fhicl::ParameterSet const &ps)

Constructs a FragmentGenerator instance, and returns a pointer to it.

Parameters:
ps Parameter set for initializing the FragmentGenerator
Returns:
A smart pointer to the FragmentGenerator

Definition at line 17 of file GeneratorMacros.hh.

The RawDataType (currently a 64-bit integer) is the basic unit of data representation within _artdaq_.

The RawDataType (currently a 64-bit integer) is the basic unit of data representation within _artdaq_ Copied from RawFragmentHeader into Fragment

Definition at line 39 of file Fragment.hh.

typedef std::shared_ptr< RawEvent > artdaq::RawEvent_ptr

A smart pointer to a RawEvent object.

A shared_ptr to a RawEvent.

Definition at line 13 of file GlobalQueue.hh.


Enumeration Type Documentation

Controls whether the ExceptionHandler will rethrow after printing exception details.

Enumerator:
yes 

Rethrow the exception after sending details to MessageFacility.

no 

Consume the exception and proceed.

Definition at line 11 of file ExceptionHandler.hh.


Function Documentation

void artdaq::configureMessageFacility ( char const *  progname,
bool  useConsole = true,
bool  printDebug = false 
)

Configure and start the message facility. Provide the program name so that messages will be appropriately tagged.

Parameters:
progname The name of the program
useConsole Should console output be activated? Default = true
printDebug Whether Debug-level messages should be printed to console. Default = false

Definition at line 257 of file configureMessageFacility.cc.

void artdaq::configureTRACE ( fhicl::ParameterSet &  trace_pset  ) 

Configure TRACE.

Parameters:
trace_pset A fhicl::ParameterSet with the contents of the TRACE table

Definition at line 181 of file configureMessageFacility.cc.

void artdaq::ExceptionHandler ( ExceptionHandlerRethrow  decision,
std::string  optional_message = "" 
)

The ExceptionHandler class prints out all available information about an excection, then optionally re-throws.

Parameters:
decision Controls whether the ExceptionHandler will rethrow (ExceptionHandlerRethrow::yes) or not (ExceptionHandlerRethow::no)
optional_message An optional std::string giving more information about where the exception was originally caught

JCF, 5/28/15

The ExceptionHandler() function is designed to be called within a catch-all block: ~~~~~~~~{.cpp} try { // ...Code that might throw an exception... } catch (...) { ExceptionHandler(artdaq::ExceptionHandlerRethrow::yes, "Optional string providing additional info"); } ~~~~~~~~

Where above, you could switch out `artdaqExceptionHandlerRethrow::yes` with `artdaqExceptionHandlerRethrow::no`, depending on what you wish to do

The details of ExceptionHandler() are as follows:

  • If an optional string is passed to it, use messagefacility to write the string with mf::LogError()
  • Apply a set of different catch-blocks to the original exception, printing out as much information as possible contained within the different exception types (art::Exception, cet::exception, boost::exception and std::exception), again using mf::LogError()
  • If artdaq::ExceptionHandlerRethrow::yes was passed to ExceptionHandler(), re-throw the exception rather than swallow it
bool artdaq::fragmentSequenceIDCompare ( Fragment  i,
Fragment  j 
)

Comparator for Fragment objects, based on their sequence_id.

Parameters:
i First Fragment to compare
j Second Fragment to comapre
Returns:
i.sequenceID() < j.sequenceID()

Definition at line 8 of file Fragment.cc.

std::string artdaq::generateMessageFacilityConfiguration ( char const *  progname,
bool  useConsole = true,
bool  printDebug = false 
)

Create the MessageFacility configuration Fhicl string.

Parameters:
progname The name of the program
useConsole Should console output be activated? Default = true
printDebug Whether Debug-level messages should be printed to console. Default = false
Returns:
Fhicl string with generated MessageFacility configuration
Exceptions:
cet::exception if log path or ARTDAQ_LOG_FHICL do not exist

Definition at line 17 of file configureMessageFacility.cc.

RawEventQueue & artdaq::getGlobalQueue ( RawEventQueue::SizeType  maxSize = std::numeric_limits< RawEventQueue::SizeType >::max()  ) 

The first thread to call getGlobalQueue() causes the creation of the queue. The queue will be destroyed at static destruction time.

Parameters:
maxSize Maximum number of elements in the queue
Returns:
Reference to the global RawEventQueue
std::unique_ptr< artdaq::FragmentGenerator > artdaq::makeFragmentGenerator ( std::string const &  generator_plugin_spec,
fhicl::ParameterSet const &  ps 
)

Instantiates the FragmentGenerator plugin with the given name, using the given ParameterSet.

Parameters:
generator_plugin_spec Name of the Generator plugin (omit _generator.so)
ps The ParameterSet used to initialize the FragmentGenerator
Returns:
A smart pointer to the FragmentGenerator instance

Definition at line 8 of file makeFragmentGenerator.cc.

std::ostream& artdaq::operator<< ( std::ostream &  os,
RawEvent const &  ev 
) [inline]

Prints the RawEvent to the given stream.

Parameters:
os Stream to print RawEvent to
ev RawEvent to print
Returns:
Stream reference

Definition at line 302 of file RawEvent.hh.

std::ostream & artdaq::operator<< ( std::ostream &  os,
artdaq::Fragment const &  f 
) [inline]

Prints the given Fragment to the stream.

Parameters:
os Stream to print Fragment to
f Fragment to print
Returns:
Reference to the stream

Definition at line 1199 of file Fragment.hh.

std::string artdaq::setMsgFacAppName ( const std::string &  appType,
unsigned short  port 
)

Set the message facility application name using the specified application type and port number.

Parameters:
appType Application name
port XMLRPC port of this application instance
Returns:
Name of the application as set for MessageFacility

Definition at line 289 of file configureMessageFacility.cc.

int artdaq::SimpleMemoryReaderApp ( int  argc,
char **  argv 
)

An application which pops items off a RawEventQueue using the SimpleMemoryReader.

Parameters:
argc Number of arguments (OS-provided)
argv Array of argument strings (OS-provided)
Returns:
Status code: 0 success, 1 for any error

SimpleMemoryReaderApp is a function that can be used in place of artapp(), to read RawEvent objects from the shared RawEvent queue. Note that it ignores both of its arguments.

int artdaq::simpleQueueReaderApp ( int  argc,
char **  argv 
)

An application which pops items off a RawEventQueue using the SimpleQueueReader.

Parameters:
argc Number of arguments (OS-provided)
argv Array of argument strings (OS-provided)
Returns:
Status code: 0 success, 1 for any error

simpleQueueReaderApp is a function that can be used in place of artapp(), to read RawEvent objects from the shared RawEvent queue. Note that it ignores both of its arguments.


Generated on 25 Sep 2018 for artdaq_core by  doxygen 1.6.1