StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofMCCell.cxx
1 /***************************************************************************
2  *
3  * $Id: StTofMCCell.cxx,v 2.2 2003/09/02 17:58:05 perev Exp $
4  *
5  * Author: F. Geurts, May 2003
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StTofMCCell.cxx,v $
13  * Revision 2.2 2003/09/02 17:58:05 perev
14  * gcc 3.2 updates + WarnOff
15  *
16  * Revision 2.1 2003/05/21 18:24:20 ullrich
17  * Initial Revision.
18  *
19  **************************************************************************/
20 #include <Stiostream.h>
21 #include "StTofMCCell.h"
22 
23 static const char rcsid[] = "$Id: StTofMCCell.cxx,v 2.2 2003/09/02 17:58:05 perev Exp $";
24 
25 ClassImp(StTofMCCell)
26 
27 StTofMCCell::StTofMCCell() { /* nopt */ }
28 
29 StTofMCCell::StTofMCCell(const StTofMCInfo& MCInfo) :
30  mTofMCInfo(MCInfo) { /* nopt */ }
31 
32 StTofMCCell::~StTofMCCell() { /* noop */ }
33 
34 int
35 StTofMCCell::operator==(const StTofMCCell& MCCell) const
36 {
37  return (MCCell.mTrayIndex == mTrayIndex &&
38  MCCell.mModuleIndex == mModuleIndex &&
39  MCCell.mCellIndex == mCellIndex && MCCell.mTofMCInfo == mTofMCInfo);
40 }
41 
42 int
43 StTofMCCell::operator!=(const StTofMCCell& MCCell) const
44 {
45  return !(*this == MCCell); // use operator==()
46 }
47 
48 ostream&
49 operator<<(ostream& os, const StTofMCCell& cell)
50 {
51  return (os << "StTofMCCell::> " << ", tray= " << cell.trayIndex()
52  << ", module= " << cell.moduleIndex() << ", cell= "
53  << cell.cellIndex() << ", adc= " << cell.adc()
54  << ", tdc= " << cell.tdc() << endl << "MCInfo: " << cell.mcInfo());
55 }