CLHEP/HepPDT/QQDecay.hh

00001 // $Id: QQDecay.hh,v 1.5 2002/04/18 20:15:29 garren Exp $
00002 // ----------------------------------------------------------------------
00003 //
00004 // QQDecay.hh
00005 // Author: Lynn Garren
00006 //
00007 // This class holds all the information in the QQ decay.dec table
00008 // 
00009 // ----------------------------------------------------------------------
00010 #ifndef QQDECAY_HH
00011 #define QQDECAY_HH
00012 
00013 #include "CLHEP/config/CLHEP.h"
00014 #include <vector>
00015 
00016 #include "CLHEP/config/sstream.h"
00017 #include "CLHEP/HepPDT/QQChannel.hh"
00018 
00019 namespace HepPDT {
00020 
00025 class QQDecay  {
00026 
00027 public:
00028 
00029   typedef std::vector<QQChannel>  ChannelList;
00030 
00031   // -- constructors
00032   QQDecay();
00033   ~QQDecay();
00034 
00035   // ---  copying:
00036   //
00037   void  swap ( QQDecay & rhs );
00038   QQDecay( const QQDecay & orig );
00039   QQDecay & operator = ( const QQDecay & rhs );
00040 
00041   // --- mutators
00042   //
00043   void addChannel( QQChannel c ) { itsChannels.push_back( c ); }
00044   void makeStable( ) { itsStable = true; }
00045 
00046   // --- accessors
00047   //
00048   bool isStable()  const { return itsStable; };
00049   QQChannel  channel( int i ) const { return itsChannels[i]; }
00050   void write( std::ostream & os ) const;        // intended for diagnostic use
00051 
00052   int                          size()  const { return itsChannels.size(); }
00053 
00054 private:
00055 
00056   bool itsStable;
00057   ChannelList itsChannels;
00058 
00059 };  // QQDecay
00060 
00061 inline void swap( QQDecay & first, QQDecay & second ) {
00062   first.swap( second );
00063 }
00064 
00065 }  // namespace HepPDT
00066 
00067 #endif // QQDECAY_HH

Class Library for High Energy Physics (version 1.8)