/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Attributes
DayaBay::RecRpcTrigger Class Reference

For the reconstructed RPC event. More...

#include <RecRpcTrigger.h>

Collaboration diagram for DayaBay::RecRpcTrigger:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RecRpcTrigger (const RecRpcTrigger &obj)
 Copy constructor.
 RecRpcTrigger ()
 Default Constructor.
virtual ~RecRpcTrigger ()
 Destroys this instance of the class.
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
RecRpcTriggeroperator= (const RecRpcTrigger &obj)
 assignment operator
unsigned int combinationType () const
 Get the combination type of this event, telescope or array.
const DayaBay::RecRpcClustergetCluster (int index) const
 Get a RPC cluster via index.
void addCluster (const DayaBay::RecRpcCluster *cluster)
 Add a RPC cluster to this event.
int numCluster () const
 The number of clusters in this event.
const DayaBay::RecRpcTrackgetTrack (int index) const
 Get a RPC track via index.
void addTrack (const DayaBay::RecRpcTrack &track)
 Add a RPC track to this event.
int numTrack () const
 The number of tracks in this event.
int maxHitsInLayer () const
 The max hits number in a layer of this event.
bool is4of4 () const
 It's a 4of4 trigger.
const DayaBay::Detectordetector () const
 Retrieve const The detector associated with this RpcTrigger.
void setDetector (const DayaBay::Detector &value)
 Update The detector associated with this RpcTrigger.
unsigned int triggerNumber () const
 Retrieve const The count of the trigger command from this detector.
void setTriggerNumber (unsigned int value)
 Update The count of the trigger command from this detector.
const TimeStamptriggerTime () const
 Retrieve const The absolute time of the trigger command.
void setTriggerTime (const TimeStamp &value)
 Update The absolute time of the trigger command.
const
DayaBay::Trigger::TriggerType_t
triggerType () const
 Retrieve const The type fo trigger that produced this RecTrigger.
void setTriggerType (const DayaBay::Trigger::TriggerType_t &value)
 Update The type fo trigger that produced this RecTrigger.
unsigned int eventType () const
 Retrieve const Point, shower or track.
void setEventType (unsigned int value)
 Update Point, shower or track.
const std::vector< const
DayaBay::RecRpcCluster * > & 
clusters () const
 Retrieve const The RPC clusters in this event.
const std::vector
< DayaBay::RecRpcTrack > & 
tracks () const
 Retrieve const The RPC tracks in this event.
const DayaBay::RecRpcHeaderheader () const
 Retrieve const The header associated with this recTrigger.
void setHeader (DayaBay::RecRpcHeader *value)
 Update The header associated with this recTrigger.

Static Public Member Functions

static void * operator new (size_t size)
 operator new
static void * operator new (size_t size, void *pObj)
 placement operator new it is needed by libstdc++ 3.2.3 (e.g.
static void operator delete (void *p)
 operator delete
static void operator delete (void *p, void *pObj)
 placement operator delete not sure if really needed, but it does not harm

Private Attributes

DayaBay::Detector m_detector
 The detector associated with this RpcTrigger.
unsigned int m_triggerNumber
 The count of the trigger command from this detector.
TimeStamp m_triggerTime
 The absolute time of the trigger command.
DayaBay::Trigger::TriggerType_t m_triggerType
 The type fo trigger that produced this RecTrigger.
unsigned int m_combinationType
 From telescope or array.
unsigned int m_eventType
 Point, shower or track.
std::vector< const
DayaBay::RecRpcCluster * > 
m_clusters
 The RPC clusters in this event.
std::vector< DayaBay::RecRpcTrackm_tracks
 The RPC tracks in this event.
DayaBay::RecRpcHeaderm_header
 The header associated with this recTrigger.

Detailed Description

For the reconstructed RPC event.

Author:
zoujh@ihep.ac.cn created Thu Dec 5 17:48:15 2013

Definition at line 47 of file RecRpcTrigger.h.


Constructor & Destructor Documentation

RecRpcTrigger::RecRpcTrigger ( const RecRpcTrigger obj)

Copy constructor.

Definition at line 6 of file RecRpcTrigger.cc.

    : m_detector(obj.m_detector),
      m_triggerNumber(obj.m_triggerNumber),
      m_triggerTime(obj.m_triggerTime),
      m_triggerType(obj.m_triggerType),
      m_tracks(obj.m_tracks),
      m_header(obj.m_header)
{
    std::vector<const RecRpcCluster*>::const_iterator end = obj.m_clusters.end();
    for (std::vector<const RecRpcCluster*>::const_iterator it = obj.m_clusters.begin();
         it != end;
         ++it ) {
        m_clusters.push_back(new RecRpcCluster(*(*it)));
    }
}
DayaBay::RecRpcTrigger::RecRpcTrigger ( ) [inline]
RecRpcTrigger::~RecRpcTrigger ( ) [virtual]

Destroys this instance of the class.

Definition at line 51 of file RecRpcTrigger.cc.

{
    std::vector<const RecRpcCluster*>::const_iterator end = m_clusters.end();
    for (std::vector<const RecRpcCluster*>::const_iterator it = m_clusters.begin();
         it != end;
         ++it ) {
        delete (*it);
    }
}

Member Function Documentation

std::ostream & DayaBay::RecRpcTrigger::fillStream ( std::ostream &  s) const [inline, virtual]

Fill the ASCII output stream.

Definition at line 221 of file RecRpcTrigger.h.

{
  s << "{ " << "detector :      " << m_detector << std::endl
            << "triggerNumber : " << m_triggerNumber << std::endl
            << "triggerTime :   " << m_triggerTime << std::endl
            << "triggerType :   " << m_triggerType << std::endl
            << "combinationType :       " << m_combinationType << std::endl
            << "eventType :     " << m_eventType << std::endl
            << "clusters :      " << m_clusters << std::endl
            << "tracks :        " << m_tracks << std::endl
            << "header :        " << m_header << std::endl << " }";
  return s;
}
RecRpcTrigger & RecRpcTrigger::operator= ( const RecRpcTrigger obj)

assignment operator

Definition at line 22 of file RecRpcTrigger.cc.

{
    if ( &obj != this ) {
        m_detector      = obj.m_detector;
        m_triggerNumber = obj.m_triggerNumber;
        m_triggerTime   = obj.m_triggerTime;
        m_triggerType   = obj.m_triggerType;
        m_tracks        = obj.m_tracks;
        m_header        = obj.m_header;
        //clear the current clusters
        std::vector<const RecRpcCluster*>::const_iterator end = m_clusters.end();
        for (std::vector<const RecRpcCluster*>::const_iterator it = m_clusters.begin();
                it != end;
                ++it ) {
            delete (*it);
        }
        m_clusters.clear();
        //assign the new clusters
        end = obj.m_clusters.end();
        for (std::vector<const RecRpcCluster*>::const_iterator it = obj.m_clusters.begin();
                it != end;
                ++it ) {
            m_clusters.push_back(new RecRpcCluster(*(*it)));
        }
    }

    return *this;
}
unsigned int RecRpcTrigger::combinationType ( ) const

Get the combination type of this event, telescope or array.

Definition at line 61 of file RecRpcTrigger.cc.

{
    if ( m_combinationType == 0 ) {
        unsigned int& _type = const_cast<unsigned int&>(m_combinationType);
        std::vector<const RecRpcCluster*>::const_iterator end = m_clusters.end();
        for (std::vector<const RecRpcCluster*>::const_iterator it = m_clusters.begin();
                it != end;
                ++it ) {
            _type |= (*it)->type();
        }
    }
    return m_combinationType;
}
const DayaBay::RecRpcCluster * RecRpcTrigger::getCluster ( int  index) const

Get a RPC cluster via index.

Definition at line 75 of file RecRpcTrigger.cc.

{
    return m_clusters.at(index);
}
void RecRpcTrigger::addCluster ( const DayaBay::RecRpcCluster cluster)

Add a RPC cluster to this event.

Definition at line 80 of file RecRpcTrigger.cc.

{
    m_clusters.push_back(cluster);
}
int RecRpcTrigger::numCluster ( ) const

The number of clusters in this event.

Definition at line 85 of file RecRpcTrigger.cc.

{
    return m_clusters.size();
}
const DayaBay::RecRpcTrack & RecRpcTrigger::getTrack ( int  index) const

Get a RPC track via index.

Definition at line 90 of file RecRpcTrigger.cc.

{
    return m_tracks.at(index);
}
void RecRpcTrigger::addTrack ( const DayaBay::RecRpcTrack track)

Add a RPC track to this event.

Definition at line 95 of file RecRpcTrigger.cc.

{
    m_tracks.push_back(track);
}
int RecRpcTrigger::numTrack ( ) const

The number of tracks in this event.

Definition at line 100 of file RecRpcTrigger.cc.

{
    return m_tracks.size();
}
int RecRpcTrigger::maxHitsInLayer ( ) const

The max hits number in a layer of this event.

Definition at line 105 of file RecRpcTrigger.cc.

{
    int max = 0;
    std::vector<const RecRpcCluster*>::const_iterator end = m_clusters.end();
    for (std::vector<const RecRpcCluster*>::const_iterator it = m_clusters.begin();
         it != end;
         ++it ) {
        int max_c = (*it)->maxHitsInLayer();
        if ( max_c > max ) {
            max = max_c;
        }
    }
    return max;
}
bool RecRpcTrigger::is4of4 ( ) const

It's a 4of4 trigger.

Definition at line 120 of file RecRpcTrigger.cc.

{
    std::vector<const RecRpcCluster*>::const_iterator end = m_clusters.end();
    for (std::vector<const RecRpcCluster*>::const_iterator it = m_clusters.begin();
         it != end;
         ++it ) {
        if ( (*it)->is4of4() ) return true;
    }
    return false;
}
const DayaBay::Detector & DayaBay::RecRpcTrigger::detector ( ) const [inline]

Retrieve const The detector associated with this RpcTrigger.

Definition at line 236 of file RecRpcTrigger.h.

{
  return m_detector;
}
void DayaBay::RecRpcTrigger::setDetector ( const DayaBay::Detector value) [inline]

Update The detector associated with this RpcTrigger.

Definition at line 241 of file RecRpcTrigger.h.

{
  m_detector = value;
}
unsigned int DayaBay::RecRpcTrigger::triggerNumber ( ) const [inline]

Retrieve const The count of the trigger command from this detector.

Definition at line 246 of file RecRpcTrigger.h.

{
  return m_triggerNumber;
}
void DayaBay::RecRpcTrigger::setTriggerNumber ( unsigned int  value) [inline]

Update The count of the trigger command from this detector.

Definition at line 251 of file RecRpcTrigger.h.

{
  m_triggerNumber = value;
}
const TimeStamp & DayaBay::RecRpcTrigger::triggerTime ( ) const [inline]

Retrieve const The absolute time of the trigger command.

Definition at line 256 of file RecRpcTrigger.h.

{
  return m_triggerTime;
}
void DayaBay::RecRpcTrigger::setTriggerTime ( const TimeStamp value) [inline]

Update The absolute time of the trigger command.

Definition at line 261 of file RecRpcTrigger.h.

{
  m_triggerTime = value;
}
const DayaBay::Trigger::TriggerType_t & DayaBay::RecRpcTrigger::triggerType ( ) const [inline]

Retrieve const The type fo trigger that produced this RecTrigger.

Definition at line 266 of file RecRpcTrigger.h.

{
  return m_triggerType;
}
void DayaBay::RecRpcTrigger::setTriggerType ( const DayaBay::Trigger::TriggerType_t value) [inline]

Update The type fo trigger that produced this RecTrigger.

Definition at line 271 of file RecRpcTrigger.h.

{
  m_triggerType = value;
}
unsigned int DayaBay::RecRpcTrigger::eventType ( ) const [inline]

Retrieve const Point, shower or track.

Definition at line 276 of file RecRpcTrigger.h.

{
  return m_eventType;
}
void DayaBay::RecRpcTrigger::setEventType ( unsigned int  value) [inline]

Update Point, shower or track.

Definition at line 281 of file RecRpcTrigger.h.

{
  m_eventType = value;
}
const std::vector< const DayaBay::RecRpcCluster * > & DayaBay::RecRpcTrigger::clusters ( ) const [inline]

Retrieve const The RPC clusters in this event.

Definition at line 286 of file RecRpcTrigger.h.

{
  return m_clusters;
}
const std::vector< DayaBay::RecRpcTrack > & DayaBay::RecRpcTrigger::tracks ( ) const [inline]

Retrieve const The RPC tracks in this event.

Definition at line 291 of file RecRpcTrigger.h.

{
  return m_tracks;
}
const DayaBay::RecRpcHeader * DayaBay::RecRpcTrigger::header ( ) const [inline]

Retrieve const The header associated with this recTrigger.

Definition at line 296 of file RecRpcTrigger.h.

{
  return m_header;
}
void DayaBay::RecRpcTrigger::setHeader ( DayaBay::RecRpcHeader value) [inline]

Update The header associated with this recTrigger.

Definition at line 301 of file RecRpcTrigger.h.

{
  m_header = value;
}
static void* DayaBay::RecRpcTrigger::operator new ( size_t  size) [inline, static]

operator new

Definition at line 160 of file RecRpcTrigger.h.

    {
      return ( sizeof(RecRpcTrigger) == size ? 
               boost::singleton_pool<RecRpcTrigger, sizeof(RecRpcTrigger)>::malloc() :
               ::operator new(size) );
    }
static void* DayaBay::RecRpcTrigger::operator new ( size_t  size,
void *  pObj 
) [inline, static]

placement operator new it is needed by libstdc++ 3.2.3 (e.g.

in std::vector) it is not needed in libstdc++ >= 3.4

Definition at line 170 of file RecRpcTrigger.h.

    {
      return ::operator new (size,pObj);
    }
static void DayaBay::RecRpcTrigger::operator delete ( void *  p) [inline, static]

operator delete

Definition at line 176 of file RecRpcTrigger.h.

    {
      boost::singleton_pool<RecRpcTrigger, sizeof(RecRpcTrigger)>::is_from(p) ?
      boost::singleton_pool<RecRpcTrigger, sizeof(RecRpcTrigger)>::free(p) :
      ::operator delete(p);
    }
static void DayaBay::RecRpcTrigger::operator delete ( void *  p,
void *  pObj 
) [inline, static]

placement operator delete not sure if really needed, but it does not harm

Definition at line 185 of file RecRpcTrigger.h.

    {
      ::operator delete (p, pObj);
    }

Member Data Documentation

The detector associated with this RpcTrigger.

Definition at line 194 of file RecRpcTrigger.h.

The count of the trigger command from this detector.

Definition at line 195 of file RecRpcTrigger.h.

The absolute time of the trigger command.

Definition at line 196 of file RecRpcTrigger.h.

The type fo trigger that produced this RecTrigger.

Definition at line 197 of file RecRpcTrigger.h.

From telescope or array.

Definition at line 198 of file RecRpcTrigger.h.

unsigned int DayaBay::RecRpcTrigger::m_eventType [private]

Point, shower or track.

Definition at line 199 of file RecRpcTrigger.h.

The RPC clusters in this event.

Definition at line 200 of file RecRpcTrigger.h.

The RPC tracks in this event.

Definition at line 201 of file RecRpcTrigger.h.

The header associated with this recTrigger.

Definition at line 202 of file RecRpcTrigger.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:00:28 for RecEvent by doxygen 1.7.4