ant
A2 ant: class-based analysis framework
ant::ExpConfig::Setup Class Reference

#include <ExpConfig.h>

Public Member Functions

 Setup ()=delete
 

Static Public Member Functions

static const expconfig::Setup_traitsGet ()
 Get returns the currently set setup. More...
 
template<typename SetupType >
static const SetupType & GetByType ()
 the templated version of Get() for specialized setups (typically used by unpackers) More...
 
static std::shared_ptr< Detector_tGetDetector (Detector_t::Type_t type)
 GetDetector ask for detector by type. More...
 
template<typename DetectorType >
static std::shared_ptr< DetectorType > GetDetector ()
 
static void SetByName (const std::string &setupname)
 SetByName override current setup to this name, SetByTID won't have any effect then. More...
 
static void SetByTID (const TID &tid)
 SetByTID automatically search setup by using their Matches() method. More...
 
static std::list< std::string > GetNames ()
 
static void Cleanup ()
 

Constructor & Destructor Documentation

◆ Setup()

ant::ExpConfig::Setup::Setup ( )
delete

Member Function Documentation

◆ Cleanup()

void ExpConfig::Setup::Cleanup ( )
static

◆ Get()

const expconfig::Setup_traits & ExpConfig::Setup::Get ( )
static

Get returns the currently set setup.

Returns
the Setup_traits instance, see also GetByType if specific cast is needed
Exceptions
ExceptionNoSetupif no setup if found (see also SetByName and SetByTID)

◆ GetByType()

template<typename SetupType >
const SetupType & ant::ExpConfig::Setup::GetByType ( )
static

the templated version of Get() for specialized setups (typically used by unpackers)

◆ GetDetector() [1/2]

shared_ptr< Detector_t > ExpConfig::Setup::GetDetector ( Detector_t::Type_t  type)
static

GetDetector ask for detector by type.

Parameters
typethe requested type
Returns
detector pointer, never nullptr
Exceptions
ExceptionNoDetectorif no detector was found
See also
the templated version to get type-safe detector

◆ GetDetector() [2/2]

template<typename DetectorType >
std::shared_ptr< DetectorType > ant::ExpConfig::Setup::GetDetector ( )
static

◆ GetNames()

std::list< string > ExpConfig::Setup::GetNames ( )
static

◆ SetByName()

void ExpConfig::Setup::SetByName ( const std::string &  setupname)
static

SetByName override current setup to this name, SetByTID won't have any effect then.

Parameters
setupnamethe setup's name
Exceptions
ExceptionNoSetupif no setup was found with that name

◆ SetByTID()

void ExpConfig::Setup::SetByTID ( const TID tid)
static

SetByTID automatically search setup by using their Matches() method.

Parameters
tidTID for searching (usually provided/generated by unpacker)

The documentation for this class was generated from the following files: