Tuple Class Reference

Build tuples. More...

#include <Ntuple.h>

List of all members.

Public Member Functions

bool AddTuple (vector< int > aEvent)
 Adds an event to the tuple.
int GetEvent (const int aStreamNumber, const int aPosition)
 Returns the event index of stream number 'aStreamNumber'.
int GetEventFromStream (const int aStreamIndex, const int aPosition)
 Returns the event index of stream index 'aStreamIndex'.
vector< int > GetEvents (const int aStreamNumber)
 Returns the full event list of stream number 'aStreamNumber'.
vector< int > GetEventsFromStream (const int aStreamIndex)
 Returns the full event list of stream index 'aStreamIndex'.
string GetName (void)
 Returns the Tuple name.
int GetNevents (void)
 Returns the current number of events in the tuple.
int GetNstreams (void)
 Returns the number of streams defining the tuple.
bool IsStreamInside (const int aStreamIndex)
 Tests whether a stream is part of the tuple.
bool IsTheSame (Tuple *aTestTuple)
 Tests whether 2 tuples are identical.
void PrintEvents (void)
 Prints current event list.
bool RemoveEvent (const int aPosition)
 Remove an event from the tuple.
bool ResetEvents (void)
 Resets all events in the tuple.
Constructors and destructors



 Tuple (vector< int > aStreamIndex)
 Constructor of the Tuple class.
virtual ~Tuple (void)
 Destructor of the Tuple class.

Detailed Description

Build tuples.

This class was designed to build tuples of events defined by an index. It is recommended not to use this class as is. It is better to use the Ntuple class.

Author:
Florent Robinet

Constructor & Destructor Documentation

Tuple::Tuple ( vector< int >  aStreamIndex  ) 

Constructor of the Tuple class.

A tuple is defined by a number of streams (up to 10). Each stream must be indexed by an integer. These indexes do not have to be contiguous but they must be sorted by increasing values.

Parameters:
aStreamIndex vector of stream indexes composing the tuple.
Tuple::~Tuple ( void   )  [virtual]

Destructor of the Tuple class.


Member Function Documentation

bool Tuple::AddTuple ( vector< int >  aEvent  )  [inline]

Adds an event to the tuple.

The event is defined by a set of event indexes. There should be as many event indexes as the number of streams defining the tuple. Event indexes should be provided by increasing stream index.

Parameters:
aEvent event indexes to be added to the tuple.
int Tuple::GetEvent ( const int  aStreamNumber,
const int  aPosition 
) [inline]

Returns the event index of stream number 'aStreamNumber'.

Parameters:
aStreamNumber stream number in the tuple
aPosition event position in the list
int Tuple::GetEventFromStream ( const int  aStreamIndex,
const int  aPosition 
) [inline]

Returns the event index of stream index 'aStreamIndex'.

Parameters:
aStreamIndex stream index
aPosition event position in the list
vector<int> Tuple::GetEvents ( const int  aStreamNumber  )  [inline]

Returns the full event list of stream number 'aStreamNumber'.

Parameters:
aStreamNumber stream number in the tuple
vector<int> Tuple::GetEventsFromStream ( const int  aStreamIndex  )  [inline]

Returns the full event list of stream index 'aStreamIndex'.

Parameters:
aStreamIndex stream index
string Tuple::GetName ( void   )  [inline]

Returns the Tuple name.

The Tuple name is defined by the sequence of stream indexes.

int Tuple::GetNevents ( void   )  [inline]

Returns the current number of events in the tuple.

int Tuple::GetNstreams ( void   )  [inline]

Returns the number of streams defining the tuple.

bool Tuple::IsStreamInside ( const int  aStreamIndex  )  [inline]

Tests whether a stream is part of the tuple.

Returns true if the answer is yes.

Parameters:
aStreamIndex stream index to test
bool Tuple::IsTheSame ( Tuple aTestTuple  )  [inline]

Tests whether 2 tuples are identical.

Returns true if the answer is yes. 2 tuples are said to be identical if:

  • the number of streams is the same
  • the number of events is the same
  • the event indexes are the same
    Parameters:
    Tuple external tuple to test
void Tuple::PrintEvents ( void   )  [inline]

Prints current event list.

bool Tuple::RemoveEvent ( const int  aPosition  )  [inline]

Remove an event from the tuple.

Parameters:
aPosition event position in the list
bool Tuple::ResetEvents ( void   )  [inline]

Resets all events in the tuple.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines

Generated on 29 Sep 2016 by  doxygen 1.6.1