Jpp 21.0.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JAANET::JAAnetDictionary Class Reference

Simple wrapper class around JROOT::JRootDictionary so that other classes are included by construction,. More...

#include <JAAnetDictionary.hh>

Inheritance diagram for JAANET::JAAnetDictionary:
JROOT::JRootDictionary JROOT::JRootDictionary_t JLANG::JSingleton< T > std::map< std::string, std::shared_ptr< JROOT::JAbstractStreamer > >

Public Types

typedef T data_type
 

Public Member Functions

template<class T >
void add ()
 Addition of class and container classes.
 
template<class T >
void operator() (const JType< T > &type)
 Addition of class.
 
template<class T >
void operator() (const char *const name, const JType< T > &type)
 Addition of class.
 

Static Public Member Functions

static JRootDictionary & getInstance ()
 Get reference to unique instance of this class object.
 

Private Member Functions

 JAAnetDictionary ()
 Default constructor.
 

Detailed Description

Simple wrapper class around JROOT::JRootDictionary so that other classes are included by construction,.

Definition at line 80 of file JAAnetDictionary.hh.

Member Typedef Documentation

◆ data_type

template<class T >
T JLANG::JSingleton< T >::data_type
inherited

Definition at line 20 of file JSingleton.hh.

Constructor & Destructor Documentation

◆ JAAnetDictionary()

JAANET::JAAnetDictionary::JAAnetDictionary ( )
inlineprivate

Default constructor.

Definition at line 87 of file JAAnetDictionary.hh.

87 :
89 {
90 add<Vec>();
99 }
void add()
Addition of class and container classes.
JRootDictionary()
Default constructor.
static data_type & getInstance()
Get unique instance of template class.
Definition JSingleton.hh:27

Member Function Documentation

◆ getInstance()

static JRootDictionary & JAANET::JAAnetDictionary::getInstance ( )
inlinestatic

Get reference to unique instance of this class object.

This JROOT::JRootDictionary object includes the various Monte Carlo data types.

Returns
reference to this class object

Definition at line 108 of file JAAnetDictionary.hh.

109 {
110 static JAAnetDictionary dictionary;
111
112 return dictionary;
113 }
JAAnetDictionary()
Default constructor.

◆ add()

template<class T >
void JROOT::JRootDictionary::add ( )
inlineinherited

Addition of class and container classes.

Definition at line 54 of file JRootDictionary.hh.

55 {
56 using namespace JPP;
57
58 for_each<typename JTYPELIST< T, std::vector<T> >::typelist>(*this);
59 }
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ operator()() [1/2]

template<class T >
void JROOT::JRootDictionary::operator() ( const JType< T > & type)
inlineinherited

Addition of class.

Parameters
typedata type

Definition at line 68 of file JRootDictionary.hh.

69 {
70 const TDictionary* pDictionary = TDictionary::GetDictionary(typeid(T));
71
72 if (pDictionary != NULL)
73 (*this)(pDictionary->GetName(), type);
74 else
75 THROW(JException, "ROOT TDictionary unknown data type.");
76 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.

◆ operator()() [2/2]

template<class T >
void JROOT::JRootDictionary::operator() ( const char *const name,
const JType< T > & type )
inlineinherited

Addition of class.

Parameters
namedata name
typedata type

Definition at line 86 of file JRootDictionary.hh.

87 {
88 this->insert(value_type(name, new JObjectStreamer<T>()));
89 }

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