Gaudi Framework, version v23r2

Home   Generated: Thu Jun 28 2012
Public Member Functions | Protected Attributes | Private Member Functions

NTuple::TupleImp Class Reference

#include <NTupleImplementation.h>

Inheritance diagram for NTuple::TupleImp:
Inheritance graph
[legend]
Collaboration diagram for NTuple::TupleImp:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual INTupleItemi_find (const std::string &name) const
 Internally used by abstract classes.
 TupleImp (const std::string &title)
 Standard Constructor.
virtual ~TupleImp ()
 Standard Destructor.
ItemContaineritems ()
 Access item container.
const ItemContaineritems () const
 Access item container (CONST)
virtual const std::stringtitle () const
 Object title.
virtual const INTupleItemfind (const std::string &name) const
 Find an item row of the Ntuple (CONST)
virtual INTupleItemfind (const std::string &name)
 Find an item row of the Ntuple.
char * buffer ()
 Access N tuple data buffer.
const char * buffer () const
 Access N tuple data buffer (CONST)
IConversionSvcconversionService () const
 Access conversion service.
void setConversionService (IConversionSvc *svc)
 Access conversion service.
INTupleSvctupleService () const
 Access conversion service.
void setTupleService (INTupleSvc *svc)
 Access conversion service.
virtual StatusCode attachSelector (ISelectStatement *sel)
 Attach selector.
virtual ISelectStatementselector ()
 Access selector.
virtual void setBuffer (char *buff)
 Set N tuple data buffer.
virtual void reset ()
 Reset all entries to their default values.
virtual StatusCode add (INTupleItem *item)
 Add an item row to the N tuple.
virtual StatusCode remove (INTupleItem *item)
 Remove an item row (identified by pointer) from the N tuple.
virtual StatusCode remove (const std::string &name)
 Remove an item row (identified by name) from the N tuple.
virtual StatusCode write ()
 Write record of the NTuple (Shortcut of writeRecord)
virtual StatusCode writeRecord ()
 Write record of the NTuple.
virtual StatusCode read ()
 Read record of the NTuple (Shortcut of readRecord)
virtual StatusCode readRecord ()
 Read record of the NTuple.
virtual StatusCode save ()
 Save the NTuple.

Protected Attributes

ItemContainer m_items
 Container with N tuple _Columns.
bool m_isBooked
 Flag wether N tuple is booked.
std::string m_title
 N tuple title.
ISelectStatementm_pSelector
 Possibly hanging selector.
char * m_buffer
 Buffer size.
INTupleSvcm_ntupleSvc
 Reference to N-tuple service used.
IConversionSvcm_cnvSvc
 Reference to the conversion service used.

Private Member Functions

 TupleImp (const TupleImp &)
 Standard Copy Constructor.

Detailed Description

Definition at line 15 of file NTupleImplementation.h.


Constructor & Destructor Documentation

NTuple::TupleImp::TupleImp ( const TupleImp  ) [private]

Standard Copy Constructor.

NTuple::TupleImp::TupleImp ( const std::string title )

Standard Constructor.

Definition at line 27 of file NTupleImplementation.cpp.

NTuple::TupleImp::~TupleImp (  ) [virtual]

Standard Destructor.

Definition at line 38 of file NTupleImplementation.cpp.

                         {
    for (ItemContainer::iterator i = m_items.begin(); i != m_items.end(); i++) {
      (*i)->release();
    }
    m_items.erase(m_items.begin(), m_items.end());
    delete  [] m_buffer;
    m_buffer = 0;
  }

Member Function Documentation

StatusCode NTuple::TupleImp::add ( INTupleItem item ) [virtual]

Add an item row to the N tuple.

Implements INTuple.

Definition at line 81 of file NTupleImplementation.cpp.

                                              {
    if ( 0 != item )    {
      INTupleItem* i = i_find(item->name());
      if ( 0 == i )   {
        m_items.push_back( item );
        return StatusCode::SUCCESS;
      }
    }
    return StatusCode::FAILURE;
  }
StatusCode NTuple::TupleImp::attachSelector ( ISelectStatement sel ) [virtual]

Attach selector.

Implements INTuple.

Definition at line 48 of file NTupleImplementation.cpp.

                                                            {
    if ( 0 != sel         ) sel->addRef();
    if ( 0 != m_pSelector ) m_pSelector->release();
    m_pSelector = sel;
    return StatusCode::SUCCESS;
  }
const char* NTuple::TupleImp::buffer (  ) const [inline, virtual]

Access N tuple data buffer (CONST)

Implements INTuple.

Definition at line 68 of file NTupleImplementation.h.

                                 {
      return m_buffer;
    }
char* NTuple::TupleImp::buffer (  ) [inline, virtual]

Access N tuple data buffer.

Implements INTuple.

Definition at line 64 of file NTupleImplementation.h.

                      {
      return m_buffer;
    }
IConversionSvc* NTuple::TupleImp::conversionService (  ) const [inline]

Access conversion service.

Definition at line 72 of file NTupleImplementation.h.

                                                 {
      return m_cnvSvc;
    }
virtual const INTupleItem* NTuple::TupleImp::find ( const std::string name ) const [inline, virtual]

Find an item row of the Ntuple (CONST)

Implements INTuple.

Definition at line 56 of file NTupleImplementation.h.

                                                                    {
      return i_find(name);
    }
virtual INTupleItem* NTuple::TupleImp::find ( const std::string name ) [inline, virtual]

Find an item row of the Ntuple.

Implements INTuple.

Definition at line 60 of file NTupleImplementation.h.

                                                        {
      return i_find(name);
    }
INTupleItem * NTuple::TupleImp::i_find ( const std::string name ) const [virtual]

Internally used by abstract classes.

Locate a column of data to the N tuple (not type safe)

Implements INTuple.

Definition at line 68 of file NTupleImplementation.cpp.

                                                                 {
    for (ItemContainer::const_iterator i = m_items.begin();
         i != m_items.end();
         i++) {
      if ( name == (*i)->name() )   {
        INTupleItem* it = const_cast<INTupleItem*>(*i);
        return it;
      }
    }
    return 0;
  }
ItemContainer& NTuple::TupleImp::items (  ) [inline, virtual]

Access item container.

Implements INTuple.

Definition at line 44 of file NTupleImplementation.h.

                              {
      return m_items;
    }
const ItemContainer& NTuple::TupleImp::items (  ) const [inline, virtual]

Access item container (CONST)

Implements INTuple.

Definition at line 48 of file NTupleImplementation.h.

                                            {
      return m_items;
    }
StatusCode NTuple::TupleImp::read (  ) [virtual]

Read record of the NTuple (Shortcut of readRecord)

Read record of the NTuple.

Implements INTuple.

Definition at line 123 of file NTupleImplementation.cpp.

                               {
    return m_ntupleSvc->readRecord(this);
  }
StatusCode NTuple::TupleImp::readRecord (  ) [virtual]

Read record of the NTuple.

Implements INTuple.

Definition at line 127 of file NTupleImplementation.cpp.

                                     {
    return m_ntupleSvc->readRecord(this);
  }
StatusCode NTuple::TupleImp::remove ( INTupleItem item ) [virtual]

Remove an item row (identified by pointer) from the N tuple.

Remove a column from the N-tuple.

Implements INTuple.

Definition at line 99 of file NTupleImplementation.cpp.

                                                     {
    for (ItemContainer::iterator i = m_items.begin(); i != m_items.end(); i++) {
      if ( (*i) == item )   {
        m_items.erase(i);
        item->release();
        return StatusCode::SUCCESS;
      }
    }
    return StatusCode::FAILURE;
  }
StatusCode NTuple::TupleImp::remove ( const std::string name ) [virtual]

Remove an item row (identified by name) from the N tuple.

Remove a column from the N-tuple.

Implements INTuple.

Definition at line 93 of file NTupleImplementation.cpp.

                                                         {
    INTupleItem* i = i_find(name);
    return (i == 0) ?  StatusCode(StatusCode::FAILURE) : remove(i);
  }
void NTuple::TupleImp::reset (  ) [virtual]

Reset all entries to their default values.

Reset N tuple to default values.

Implements INTuple.

Definition at line 61 of file NTupleImplementation.cpp.

                           {
    for (ItemContainer::iterator i = m_items.begin(); i != m_items.end(); i++) {
      (*i)->reset();
    }
  }
StatusCode NTuple::TupleImp::save (  ) [virtual]

Save the NTuple.

Implements INTuple.

Definition at line 131 of file NTupleImplementation.cpp.

                               {
    return m_ntupleSvc->save(this);
  }
ISelectStatement * NTuple::TupleImp::selector (  ) [virtual]

Access selector.

Implements INTuple.

Definition at line 56 of file NTupleImplementation.cpp.

                                         {
    return m_pSelector;
  }
void NTuple::TupleImp::setBuffer ( char *  buff ) [virtual]

Set N tuple data buffer.

Implements INTuple.

Definition at line 110 of file NTupleImplementation.cpp.

                                      {
    if ( 0 != m_buffer ) delete m_buffer;
    m_buffer = buff;
  }
void NTuple::TupleImp::setConversionService ( IConversionSvc svc ) [inline]

Access conversion service.

Definition at line 76 of file NTupleImplementation.h.

                                                        {
      m_cnvSvc = svc;
    }
void NTuple::TupleImp::setTupleService ( INTupleSvc svc ) [inline]

Access conversion service.

Definition at line 84 of file NTupleImplementation.h.

                                               {
      m_ntupleSvc = svc;
    }
virtual const std::string& NTuple::TupleImp::title (  ) const [inline, virtual]

Object title.

Implements INTuple.

Definition at line 52 of file NTupleImplementation.h.

                                                      {
      return m_title;
    }
INTupleSvc* NTuple::TupleImp::tupleService (  ) const [inline]

Access conversion service.

Definition at line 80 of file NTupleImplementation.h.

                                        {
      return m_ntupleSvc;
    }
StatusCode NTuple::TupleImp::write (  ) [virtual]

Write record of the NTuple (Shortcut of writeRecord)

Write record of the NTuple.

Implements INTuple.

Definition at line 115 of file NTupleImplementation.cpp.

                                {
    return m_ntupleSvc->writeRecord(this);
  }
StatusCode NTuple::TupleImp::writeRecord (  ) [virtual]

Write record of the NTuple.

Implements INTuple.

Definition at line 119 of file NTupleImplementation.cpp.

                                      {
    return m_ntupleSvc->writeRecord(this);
  }

Member Data Documentation

char* NTuple::TupleImp::m_buffer [protected]

Buffer size.

Definition at line 26 of file NTupleImplementation.h.

Reference to the conversion service used.

Definition at line 30 of file NTupleImplementation.h.

bool NTuple::TupleImp::m_isBooked [protected]

Flag wether N tuple is booked.

Definition at line 20 of file NTupleImplementation.h.

Container with N tuple _Columns.

Definition at line 18 of file NTupleImplementation.h.

Reference to N-tuple service used.

Definition at line 28 of file NTupleImplementation.h.

Possibly hanging selector.

Definition at line 24 of file NTupleImplementation.h.

N tuple title.

Definition at line 22 of file NTupleImplementation.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Thu Jun 28 2012 23:27:54 for Gaudi Framework, version v23r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004