1#ifndef __ANTARESDAQ_PHYSICSEVENT__ 
    2#define __ANTARESDAQ_PHYSICSEVENT__ 
   12#include "antares-dataformat/DataTypes.hh" 
   13#include "antares-dataformat/Ars.hh" 
   14#include "antares-dataformat/EventPreamble.hh" 
   49    out << setw(5) << (int) 
object. 
lcm_id << 
' '  
   50        << setw(2) << (int) 
object. 
ars_id << 
' ';
 
   51    out << static_cast<const T&>(
object);
 
 
  154    MinT_(+
std::numeric_limits<double>::max()),
 
  155    MaxT_(-
std::numeric_limits<double>::max()),
 
 
  214      (
typename std::vector<T>::const_iterator&) *
this = i;
 
 
 
  220  template<
class T> 
size_t size() 
const;
 
  223  template<
class T> 
typename std::vector<T>::const_iterator 
begin() 
const;
 
  226  template<
class T> 
typename std::vector<T>::const_iterator 
end()   
const;
 
  239    out << 
" +-------------------------------------+ "               << endl;
 
  240    out << 
" |  EventType_      " << 
object.EventType_               << endl;
 
  241    out << 
" |  RunNumber_      " << 
object.RunNumber()              << endl;
 
  242    out << 
" |  TriggerCounter_ " << 
object.TriggerCounter_          << endl;
 
  243    out << 
" |  FrameTarget_    " << 
object.FrameTarget()            << endl;
 
  244    out << 
" |  FrameTime1_     " << 
object.FrameTime1()             << endl;
 
  245    out << 
" |  FrameTime2_     " << 
object.FrameTime2()             << endl;
 
  246    out << 
" |  FrameIndex_     " << 
object.FrameIndex()             << endl;
 
  247    out << setprecision(11) << setw(14) 
 
  248        << 
" |  MinT_           " << 
object.MinT_                    << endl;
 
  249    out << setprecision(11) << setw(14) 
 
  250        << 
" |  MaxT_           " << 
object.MaxT_                    << endl;
 
  251    out << setprecision( 6) << setw(10) 
 
  252        << 
" |  MaxA_           " << 
object.MaxA_                    << endl;
 
  253    out << setprecision( 6) << setw(10) 
 
  254        << 
" |  TotA_           " << 
object.TotA_                    << endl;
 
  255    out << 
" +-------------------------------------+ "               << endl;
 
  256    out << 
" | Triggered hits   " << 
object.TriggeredSPEHits_.size() << endl;
 
  257    out << 
" | SPE hits         " << 
object.SPEHits_.size()          << endl;
 
  258    out << 
" | AWF hits         " << 
object.AWFHits_.size()          << endl;
 
  259    out << 
" | DWF hits         " << 
object.DWFHits_.size()          << endl;
 
  260    out << 
" +-------------------------------------+ "               << endl;
 
 
  271template<> 
inline size_t 
 
  278template<> 
inline size_t 
 
  285template<> 
inline size_t 
 
  292template<> 
inline size_t 
 
  299template<> 
inline std::vector<TriggeredSPE_Hit>::const_iterator
 
 
  306template<> 
inline std::vector<TriggeredSPE_Hit>::const_iterator
 
 
  313template<> 
inline std::vector<SPE_Hit>::const_iterator
 
 
  320template<> 
inline std::vector<SPE_Hit>::const_iterator
 
 
  327template<> 
inline std::vector<AWF_Hit>::const_iterator
 
 
  334template<> 
inline std::vector<AWF_Hit>::const_iterator
 
 
  341template<> 
inline std::vector<DWF_Hit>::const_iterator
 
 
  348template<> 
inline std::vector<DWF_Hit>::const_iterator
 
 
  367          first.
tvc       == second.
tvc       &&
 
 
  383          first.
tvc       != second.
tvc       ||
 
 
  397  return (first.
MinT() < second.
MaxT() &&
 
 
  410  return (first.
MinT() > second.
MaxT() ||
 
 
  423  return first.
MinT() < second.
MinT();
 
 
  437  return std::distance(first, (
typename std::vector<T>::const_iterator&) second);
 
 
#define ClassImpT(name, template)
 
#define ClassDefT2(name, template)
 
bool operator<(const PhysicsEvent &first, const PhysicsEvent &second)
Comparator for physics event; earliest event first.
 
bool operator==(const SPE_Hit &first, const SPE_Hit &second)
equal operator for SPE hit.
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
 
bool operator!=(const SPE_Hit &first, const SPE_Hit &second)
not-equal operator for SPE hit.
 
unsigned short lcm_id
LCM identifier.
 
unsigned char ars_id
ARS identifier.
 
ARS_Hit()
Default constructor.
 
friend std::ostream & operator<<(std::ostream &out, const ARS_Hit &object)
print ASCII
 
AWF_Hit()
Default constructor.
 
DWF_Hit()
Default constructor.
 
Interface for event classes.
 
unsigned int frameTime2
Frame 'time stamp' in units of 50ns (LSW)
 
unsigned int runNumber
Run-number as given by the RunControl.
 
unsigned int frameIndex
Number of frames since start of the run.
 
unsigned short frameTarget
Unique code representing the shore station for this frame.
 
unsigned int frameTime1
Frame 'time stamp' in units of 50ns (MSW)
 
Template vector<T>::iterator.
 
const_iterator(const typename std::vector< T >::const_iterator &i)
 
const_iterator & operator=(const typename std::vector< T >::const_iterator &i)
 
const unsigned int TriggerCounter() const
Trigger nr.
 
const unsigned int EventType() const
Type of PhysicsEvent.
 
friend std::ostream & operator<<(std::ostream &out, const PhysicsEvent &object)
Print ASCII.
 
ClassDef(PhysicsEvent, 2)
 
std::vector< T >::const_iterator end() const
template end const_iterator for nested vector
 
std::vector< T >::const_iterator begin() const
template begin const_iterator for nested vector
 
std::vector< AWF_Hit > AWFHits_
 
const unsigned int FrameTime2() const
least significant word of frametime
 
const float TotA() const
sum of all amplitudes
 
const std::vector< TriggeredSPE_Hit > & TriggeredSPEHits() const
Triggered hits.
 
std::vector< DWF_Hit > DWFHits_
 
size_t size() const
template size method for nested vector
 
const unsigned int FrameTime1() const
most significant word of frametime
 
unsigned int TriggerCounter_
 
virtual ~PhysicsEvent()
Virtual destructor.
 
const std::vector< SPE_Hit > & SPE_Hits() const
SPE hits.
 
const double MinT() const
time of first hit in event
 
const unsigned int FrameIndex() const
frame index
 
const float MaxA() const
amplitude of largest hit in event
 
const unsigned int RunNumber() const
Run number.
 
const double MaxT() const
time of last hit in event
 
const unsigned short FrameTarget() const
Identifier of processor that created this event.
 
PhysicsEvent()
Default constructor.
 
std::vector< TriggeredSPE_Hit > TriggeredSPEHits_
 
const std::vector< AWF_Hit > & AWF_Hits() const
Waveform hits.
 
std::vector< SPE_Hit > SPEHits_
 
const std::vector< DWF_Hit > & DWF_Hits() const
Dynode hits.
 
SPE_Hit()
Default constructor.
 
unsigned char avc
ARS Analogue to Voltage Convertor.
 
unsigned char tvc
ARS Time to Voltage Convertor.
 
unsigned int timestamp
ARS timestamp (24 bits)
 
ClassDef(TriggeredSPE_Hit, 2)
 
TriggeredSPE_Hit()
Default constructor.