Jpp 19.3.0-rc.2
the software that should make you happy
|
Auxiliary class to copy input data to corresponding TTree. More...
#include <JAutoTreeWriter.hh>
Classes | |
struct | JElement_t |
Auxiliary class for element insertion. More... | |
Public Types | |
typedef JAutoMap< JKey_t, JTreeCopyWriterInterface * >::map_type | map_type |
typedef JAutoMap< JKey_t, JTreeCopyWriterInterface * >::value_type | value_type |
typedef map_type::const_iterator | const_iterator |
typedef map_type::iterator | iterator |
typedef map_type::const_reverse_iterator | const_reverse_iterator |
typedef map_type::reverse_iterator | reverse_iterator |
typedef JPointer< JClass_t > | pointer_type |
typedef JMemory_t< JClass_t > | memory_type |
Public Member Functions | |
JAutoTreeWriter () | |
Default constrtuctor. | |
template<class T > | |
JAutoTreeWriter (JType< T > type) | |
Constructor. | |
template<class T > | |
void | insert () |
Insert (list of) data type(s). | |
virtual void | open (const char *file_name) override |
Open file. | |
virtual void | close () override |
Close file. | |
JNET::JTag | getKey (JLANG::JType< T > type) |
Get key for given DAQ data type. | |
int | getKey (JLANG::JType< T > type) |
Get key for given DAQ data type. | |
template<class T , class JElement_t > | |
void | insert (const JAutomate< JElement_t > &automate) |
Insert list of data types. | |
TFile * | getFile () const |
Get file. | |
virtual bool | is_open () const override |
Check is file is open. | |
virtual void | reset () override |
Reset pointer. | |
template<class T > | |
void | reset (const JPointer< T > &pointer) |
Reset pointer. | |
void | reset (JClass_t *p) |
Reset pointer. | |
void | recreate () |
Recreate object in memory. | |
void | create () |
Create object in memory. | |
void | create (const unsigned int size) |
Create array of objects in memory. | |
virtual JClass_t * | get () const override |
Get pointer. | |
virtual void | set (JClass_t *p) override |
Set pointer. | |
template<class T > | |
void | set (const JPointer< T > &pointer) |
Set pointer. | |
JClass_t *const & | getReference () const |
Get rereference to internal pointer. | |
JClass_t *& | getReference () |
Get rereference to internal pointer. | |
virtual bool | equals (const JAbstractPointer &object) const |
Equals. | |
bool | is_valid () const |
Check validity of pointer. | |
JClass_t * | operator-> () const |
Smart pointer operator. | |
operator JClass_t * () const | |
Type conversion operator. | |
Static Public Member Functions | |
template<class T > | |
static JKey_t | getKey (JType< T > type) |
Get key. | |
template<class T > | |
static value_type | getAutoElement (JType< T > type) |
Creation of a map element for given data type. | |
static void | Throw (const bool option) |
Enable/disable throw option. | |
static int | Throw (const JException_t &error, const int value=-1) |
Throw exception or return error. | |
static void | release (JClass_t *p) |
Release memory. | |
Protected Member Functions | |
template<class T , class JElement_t > | |
void | insert (JType< T > type, const JAutomate< JElement_t > &automate) |
Insertion of single data type. | |
template<class JHead_t , class JTail_t , class JElement_t > | |
void | insert (JType< JTypeList< JHead_t, JTail_t > > typelist, const JAutomate< JElement_t > &automate) |
Recursive insertion of data types. | |
template<class JElement_t > | |
void | insert (JType< JNullType > type, const JAutomate< JElement_t > &automate) |
Template specialisation to terminate insertion of data types. | |
void | release () |
Release memory. | |
Protected Attributes | |
JClass_t * | __p |
pointer to object | |
Static Protected Attributes | |
static bool | do_throw |
throw option | |
Private Member Functions | |
void | do_open (const char *file_name) |
Open file. | |
void | do_close () |
Close file. | |
Auxiliary class to copy input data to corresponding TTree.
This class derives from JROOT::JRootOutputFile. It re-implements the methods open and close of the underlying JLANG::JAccessible class so that each TTree is properly attached to and detached from the corresponding TDirectory, respectively.
Definition at line 33 of file JAutoTreeWriter.hh.
JAutoMap<JKey_t,JTreeCopyWriterInterface*>::map_type JSUPPORT::JAutoTreeWriter< JKey_t >::map_type |
Definition at line 39 of file JAutoTreeWriter.hh.
JAutoMap<JKey_t,JTreeCopyWriterInterface*>::value_type JSUPPORT::JAutoTreeWriter< JKey_t >::value_type |
Definition at line 40 of file JAutoTreeWriter.hh.
map_type::const_iterator JSUPPORT::JAutoTreeWriter< JKey_t >::const_iterator |
Definition at line 42 of file JAutoTreeWriter.hh.
map_type::iterator JSUPPORT::JAutoTreeWriter< JKey_t >::iterator |
Definition at line 43 of file JAutoTreeWriter.hh.
map_type::const_reverse_iterator JSUPPORT::JAutoTreeWriter< JKey_t >::const_reverse_iterator |
Definition at line 44 of file JAutoTreeWriter.hh.
map_type::reverse_iterator JSUPPORT::JAutoTreeWriter< JKey_t >::reverse_iterator |
Definition at line 45 of file JAutoTreeWriter.hh.
|
inherited |
Definition at line 32 of file JStorage.hh.
|
inherited |
Definition at line 33 of file JStorage.hh.
|
inline |
|
inline |
Constructor.
type | data type |
Definition at line 63 of file JAutoTreeWriter.hh.
|
static |
Get key.
This method should be overloaded for the requested data types.
type | data type |
|
inline |
|
inlineoverridevirtual |
Open file.
file_name | file name |
Reimplemented from JROOT::JRootOutputFile.
Definition at line 96 of file JAutoTreeWriter.hh.
|
inlineoverridevirtual |
Close file.
Reimplemented from JROOT::JRootOutputFile.
Definition at line 111 of file JAutoTreeWriter.hh.
JNET::JTag JSUPPORT::JAutoTreeWriter< JNET::JTag >::getKey | ( | JLANG::JType< T > | type | ) |
Get key for given DAQ data type.
type | data type |
Definition at line 48 of file JDataWriter.cc.
int JSUPPORT::JAutoTreeWriter< int >::getKey | ( | JLANG::JType< T > | type | ) |
Get key for given DAQ data type.
type | data type |
Definition at line 37 of file JRoot.cc.
|
staticinherited |
Creation of a map element for given data type.
This method should be overloaded for the requested data types if the method insert() is used without argument.
type | data type |
|
inlineinherited |
Insert list of data types.
automate | type defined element |
Definition at line 137 of file JAutoMap.hh.
|
inlineprotectedinherited |
Insertion of single data type.
type | data type |
automate | element automate by data type |
Definition at line 150 of file JAutoMap.hh.
|
inlineprotectedinherited |
Recursive insertion of data types.
typelist | type list |
automate | element automate by data type |
Definition at line 164 of file JAutoMap.hh.
|
inlineprotectedinherited |
Template specialisation to terminate insertion of data types.
type | null type |
automate | element automate by data type |
Definition at line 179 of file JAutoMap.hh.
|
inlineprivateinherited |
Open file.
The file is not opened when a file exists with the given name.
file_name | file name |
Definition at line 260 of file JRootFile.hh.
|
inlineprivateinherited |
|
inlineinherited |
|
inlineoverridevirtualinherited |
Check is file is open.
Implements JLANG::JAccessible.
Definition at line 77 of file JRootFile.hh.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlineoverridevirtualinherited |
Reset pointer.
The allocated memory is released.
Reimplemented from JLANG::JPointer< JClass_t >.
Reimplemented in JLANG::JSharedPointer< JClass_t, JMemory_t >, JLANG::JSharedPointer< JAbstractAutoPointer< JBase_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< Evt > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JDAQSummaryslice > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JHead_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTail_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTypeList< JDAQEvent, JNullType > > >, JLANG::JSharedPointer< JAccessibleObjectIterator< KM3NETDAQ::JDAQEvent > >, JLANG::JSharedPointer< JAccessibleObjectIterator< T > >, JLANG::JSharedPointer< JAccessibleObjectOutput< T > >, JLANG::JSharedPointer< JBase_t >, JLANG::JSharedPointer< JFIT::JMEstimator >, JLANG::JSharedPointer< JLOGGER::JLogger >, JLANG::JSharedPointer< JNET::JControlHost >, JLANG::JSharedPointer< JObjectIterator< T > >, JLANG::JSharedPointer< JObjectOutput< JHead_t > >, JLANG::JSharedPointer< JObjectOutput< JTail_t > >, JLANG::JSharedPointer< JObjectOutput< T > >, JLANG::JSharedPointer< JParserElementInterface >, JLANG::JSharedPointer< JPropertiesElementInterface >, JLANG::JSharedPointer< JRadiation >, JLANG::JSharedPointer< JRewindableObjectIterator< const event_type > >, JLANG::JSharedPointer< JRewindableObjectIterator< JHead_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JTail_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< T > >, JLANG::JSharedPointer< JTOOLS::JMultiMapTransformer >, JLANG::JSharedPointer< JTRIGGER::JDAQHitSelector >, JLANG::JSharedPointer< JTRIGGER::JMatch >, and JLANG::JSharedPointer< match_type >.
Definition at line 42 of file JStorage.hh.
|
inlineinherited |
|
inlineinherited |
Reset pointer.
p | pointer to object |
Definition at line 94 of file JAbstractPointer.hh.
|
inlineinherited |
Recreate object in memory.
A new object is created if no memory is allocated yet, else the previously created object is maintained.
Definition at line 57 of file JStorage.hh.
|
inlineinherited |
Create object in memory.
The memory allocated by a previously created object will be released.
Definition at line 69 of file JStorage.hh.
|
inlineinherited |
Create array of objects in memory.
The memory allocated by previously created objects will be released.
size | number of elements |
Definition at line 81 of file JStorage.hh.
|
inlineprotectedinherited |
Release memory.
Definition at line 91 of file JStorage.hh.
|
inlinestaticinherited |
Release memory.
p | pointer to data |
Definition at line 41 of file JMemory.hh.
|
inlineoverridevirtualinherited |
Get pointer.
Implements JLANG::JAbstractPointer< JClass_t >.
Reimplemented in JLANG::JMultiPointer< JClass_t >, JLANG::JMultiPointer< JHead_t >, JLANG::JMultiPointer< JTail_t >, JLANG::JMultiPointer< JTypeList< JDAQEvent, JNullType > >, JLANG::JMultiPointer< JTypeList< JHead_t, JTail_t > >, and JLANG::JMultiPointer< T >.
Definition at line 64 of file JPointer.hh.
|
inlineoverridevirtualinherited |
Set pointer.
p | pointer to object |
Implements JLANG::JAbstractPointer< JClass_t >.
Reimplemented in JLANG::JSharedPointer< JClass_t, JMemory_t >, JLANG::JSharedPointer< JAbstractAutoPointer< JBase_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< Evt > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JDAQSummaryslice > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JHead_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTail_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTypeList< JDAQEvent, JNullType > > >, JLANG::JSharedPointer< JAccessibleObjectIterator< KM3NETDAQ::JDAQEvent > >, JLANG::JSharedPointer< JAccessibleObjectIterator< T > >, JLANG::JSharedPointer< JAccessibleObjectOutput< T > >, JLANG::JSharedPointer< JBase_t >, JLANG::JSharedPointer< JFIT::JMEstimator >, JLANG::JSharedPointer< JLOGGER::JLogger >, JLANG::JSharedPointer< JNET::JControlHost >, JLANG::JSharedPointer< JObjectIterator< T > >, JLANG::JSharedPointer< JObjectOutput< JHead_t > >, JLANG::JSharedPointer< JObjectOutput< JTail_t > >, JLANG::JSharedPointer< JObjectOutput< T > >, JLANG::JSharedPointer< JParserElementInterface >, JLANG::JSharedPointer< JPropertiesElementInterface >, JLANG::JSharedPointer< JRadiation >, JLANG::JSharedPointer< JRewindableObjectIterator< const event_type > >, JLANG::JSharedPointer< JRewindableObjectIterator< JHead_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JTail_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< T > >, JLANG::JSharedPointer< JTOOLS::JMultiMapTransformer >, JLANG::JSharedPointer< JTRIGGER::JDAQHitSelector >, JLANG::JSharedPointer< JTRIGGER::JMatch >, and JLANG::JSharedPointer< match_type >.
Definition at line 75 of file JPointer.hh.
|
inlineinherited |
|
inlineinherited |
Get rereference to internal pointer.
Definition at line 119 of file JPointer.hh.
|
inlineinherited |
Get rereference to internal pointer.
Definition at line 130 of file JPointer.hh.
|
inlinevirtualinherited |
Equals.
The equality is evaluated by comparison of the internal pointers.
object | abstract pointer |
Definition at line 50 of file JAbstractPointer.hh.
|
inlineinherited |
Check validity of pointer.
Definition at line 83 of file JAbstractPointer.hh.
|
inlineinherited |
Smart pointer operator.
Definition at line 112 of file JAbstractPointer.hh.
|
inlineinherited |
Type conversion operator.
Definition at line 126 of file JAbstractPointer.hh.
|
staticprotectedinherited |
|
protectedinherited |
pointer to object
Definition at line 136 of file JPointer.hh.