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

In This Package:

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
DayaBay::TagHeader Class Reference

Associate a tag and data to one or more other HeaderObjects. More...

#include <TagHeader.h>

Inheritance diagram for DayaBay::TagHeader:
Inheritance graph
[legend]
Collaboration diagram for DayaBay::TagHeader:
Collaboration graph
[legend]

List of all members.

Public Types

enum  TagType {
  Unknown = 0, Generic, AdEvent, Positron,
  Neutron, Radiation, MuonFragment, Muon,
  MuonShower, MuonDecay, AdCoincidence, IBD
}
 The type of candidate event this tag is indicating. More...
typedef std::vector< IHeader * > Vector
typedef std::vector< const
IHeader * > 
ConstVector

Public Member Functions

virtual const std::string & defLoc () const
 TagHeader ()
 Default Constructor.
virtual ~TagHeader ()
 Default Destructor.
virtual const CLID & clID () const
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
template<class TDTYPE >
TDTYPE * dataAs () const
 Return the tag data as given type.
std::string tagName () const
 Return the tag type as a string.
std::vector< const
DayaBay::TagHeader * > 
taggedHeaders (const TagType &tagType) const
 Return the tagged input headers by tag type.
const TagTypetagID () const
 Retrieve const Tag ID.
void setTagID (const TagType &value)
 Update Tag ID.
bool isA () const
 Retrieve const Does this event satisfy the tag?
void setIsA (bool value)
 Update Does this event satisfy the tag?
const DayaBay::TagDatadata () const
 Retrieve const Data about this tag.
void setData (DayaBay::TagData *value)
 Update Data about this tag.
virtual const std::string & defLoc ()
void setInputHeaders (const std::vector< const DayaBay::IHeader * > &iheaders)
void clearInputHeaders ()
void addInputHeader (const DayaBay::IHeader *iheader)
const TimeStamptimeStamp () const
void setTimeStamp (const TimeStamp &ts)
const std::vector< const
DayaBay::IHeader * > 
findHeaders (const CLID &clid) const
const std::vector< const
DayaBay::IHeader * > 
findHeaders (const std::string &name) const
const Contextcontext () const
void setContext (const Context &value)
int execNumber () const
void setExecNumber (int value)
const std::vector< unsigned
long > & 
randomState () const
void setRandomState (const std::vector< unsigned long > &value)
const std::vector< const
DayaBay::IHeader * > & 
inputHeaders () const
const DayaBay::JobIdjobId () const
void setJobId (const DayaBay::JobId &value)
virtual void setOutputAddress (const GenericAddress *roa)
virtual void setInputAddress (const GenericAddress *ria)
virtual const TimeStampearliest () const
void setEarliest (const TimeStamp &value)
virtual const TimeStamplatest () const
void setLatest (const TimeStamp &value)
virtual const GenericAddress * outputAddress () const
virtual const GenericAddress * inputAddress () const

Static Public Member Functions

static const std::string & defaultLocation ()
 Give access to default location from class scope.
static const CLID & classID ()
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

TagType m_tagID
 Tag ID.
bool m_isA
 Does this event satisfy the tag?
DayaBay::TagDatam_data
 Data about this tag.

Detailed Description

Associate a tag and data to one or more other HeaderObjects.

Author:
bv@bnl.gov created Thu Dec 5 17:42:01 2013

Definition at line 49 of file TagHeader.h.


Member Enumeration Documentation

The type of candidate event this tag is indicating.

Enumerator:
Unknown 
Generic 
AdEvent 
Positron 
Neutron 
Radiation 
MuonFragment 
Muon 
MuonShower 
MuonDecay 
AdCoincidence 
IBD 

Definition at line 58 of file TagHeader.h.

                { Unknown = 0,   // Undefined, indicates error
                  Generic,       // Generic Tag
                  AdEvent,       // An event in the AD
                  Positron,      // A positron
                  Neutron,       // A neutron capture
                  Radiation,     // An event due to a radioactive decay
                  MuonFragment,  // Event due to passage of a muon through a detector
                  Muon,          // One or more MuonFragments
                  MuonShower,    // A MuonTrack and one or more other things
                  MuonDecay,     // A MuonTrack and Michele electron
                  AdCoincidence, // Time-correlated AD events
                  IBD            // Set of inverse beta decay events
      };

Constructor & Destructor Documentation

DayaBay::TagHeader::TagHeader ( ) [inline]

Default Constructor.

Definition at line 73 of file TagHeader.h.

                : m_tagID(Unknown),
                  m_isA(false),
                  m_data(0) {}
virtual DayaBay::TagHeader::~TagHeader ( ) [inline, virtual]

Default Destructor.

Definition at line 78 of file TagHeader.h.

{}

Member Function Documentation

static const std::string& DayaBay::TagHeader::defaultLocation ( ) [inline, static]

Give access to default location from class scope.

Reimplemented from DayaBay::HeaderObject.

Definition at line 54 of file TagHeader.h.

virtual const std::string& DayaBay::TagHeader::defLoc ( ) const [inline, virtual]

Reimplemented from DayaBay::HeaderObject.

Definition at line 55 of file TagHeader.h.

const CLID & DayaBay::TagHeader::clID ( ) const [inline, virtual]

Reimplemented from DayaBay::HeaderObject.

Definition at line 196 of file TagHeader.h.

const CLID & DayaBay::TagHeader::classID ( ) [inline, static]

Reimplemented from DayaBay::HeaderObject.

Definition at line 201 of file TagHeader.h.

{
  return CLID_TagHeader;
}
std::ostream & DayaBay::TagHeader::fillStream ( std::ostream &  s) const [inline, virtual]

Fill the ASCII output stream.

Reimplemented from DayaBay::HeaderObject.

Definition at line 206 of file TagHeader.h.

{
  char l_isA = (m_isA) ? 'T' : 'F';
  HeaderObject::fillStream(s);
  s << "{ " << "tagID : " << m_tagID << std::endl
            << "isA :   " << l_isA << std::endl
            << "data :  " << m_data << std::endl << " }";
  return s;
}
template<class TDTYPE >
TDTYPE * DayaBay::TagHeader::dataAs ( ) const [inline]

Return the tag data as given type.

Definition at line 248 of file TagHeader.h.

{
    return dynamic_cast<TDTYPE*>(m_data);
}
std::string DayaBay::TagHeader::tagName ( ) const

Return the tag type as a string.

Definition at line 6 of file TagHeader.cc.

{
    stringstream ss;
    ss << *this;
    return ss.str();
}
std::vector< const DayaBay::TagHeader * > DayaBay::TagHeader::taggedHeaders ( const TagType tagType) const

Return the tagged input headers by tag type.

Definition at line 13 of file TagHeader.cc.

{
  // Find all input headers of the requested tag type
  std::vector<const DayaBay::TagHeader*> tagHeaders;
  const std::vector<const DayaBay::IHeader*>& inputHeaders = 
    this->inputHeaders();
  for(unsigned int idx=0; idx<inputHeaders.size(); idx++){
    const DayaBay::TagHeader* tagHeader = 
      dynamic_cast<const DayaBay::TagHeader*>(inputHeaders[idx]);
    if(tagHeader && tagHeader->tagID()==tagType){
      tagHeaders.push_back(tagHeader);
    }
  }
  return tagHeaders;
}
const DayaBay::TagHeader::TagType & DayaBay::TagHeader::tagID ( ) const [inline]

Retrieve const Tag ID.

Definition at line 217 of file TagHeader.h.

{
  return m_tagID;
}
void DayaBay::TagHeader::setTagID ( const TagType value) [inline]

Update Tag ID.

Definition at line 222 of file TagHeader.h.

{
  m_tagID = value;
}
bool DayaBay::TagHeader::isA ( ) const [inline]

Retrieve const Does this event satisfy the tag?

Definition at line 227 of file TagHeader.h.

{
  return m_isA;
}
void DayaBay::TagHeader::setIsA ( bool  value) [inline]

Update Does this event satisfy the tag?

Definition at line 232 of file TagHeader.h.

{
  m_isA = value;
}
const DayaBay::TagData * DayaBay::TagHeader::data ( ) const [inline]

Retrieve const Data about this tag.

Definition at line 237 of file TagHeader.h.

{
  return m_data;
}
void DayaBay::TagHeader::setData ( DayaBay::TagData value) [inline]

Update Data about this tag.

Definition at line 242 of file TagHeader.h.

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

operator new

Reimplemented from DayaBay::HeaderObject.

Definition at line 124 of file TagHeader.h.

    {
      return ( sizeof(TagHeader) == size ? 
               boost::singleton_pool<TagHeader, sizeof(TagHeader)>::malloc() :
               ::operator new(size) );
    }
static void* DayaBay::TagHeader::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

Reimplemented from DayaBay::HeaderObject.

Definition at line 134 of file TagHeader.h.

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

operator delete

Reimplemented from DayaBay::HeaderObject.

Definition at line 140 of file TagHeader.h.

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

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

Reimplemented from DayaBay::HeaderObject.

Definition at line 149 of file TagHeader.h.

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

Member Data Documentation

Tag ID.

Definition at line 158 of file TagHeader.h.

bool DayaBay::TagHeader::m_isA [private]

Does this event satisfy the tag?

Definition at line 159 of file TagHeader.h.

Data about this tag.

Definition at line 160 of file TagHeader.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 09:58:57 for TagEvent by doxygen 1.7.4