StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtWaferCoordinate.cc
1 /***********************************************************************
2  *
3  * $Id: StSvtWaferCoordinate.cc,v 1.3 2000/08/21 16:16:26 calderon Exp $
4  *
5  * Author: Manuel CBS Oct 1999
6  *
7  ************************************************************************
8  *
9  * Description: Svt Wafer Coordinate
10  *
11  ************************************************************************
12  *
13  * $Log: StSvtWaferCoordinate.cc,v $
14  * Revision 1.3 2000/08/21 16:16:26 calderon
15  * Helen's first version of Svt Coordinate classes.
16  *
17  * Revision 1.2 2000/02/02 23:01:38 calderon
18  * Changes for CC5
19  * Tests withs StTpcDb still going.
20  *
21  * Revision 1.1 1999/11/19 19:01:08 calderon
22  * First version of files for StDbUtilities.
23  * Note: this package uses StTpcDb.
24  * There are some parameters
25  * that are not yet kept in StTpcDb. When StTpcDb has them, the code
26  * will be changed to use them from StTpcDb.
27  * There are no Ftpc or Svt Coordinate transformations in here yet.
28  *
29  *
30  ***********************************************************************/
31 #include "StSvtWaferCoordinate.hh"
32 
33 static const char rcsid[] = "$Id: StSvtWaferCoordinate.cc,v 1.3 2000/08/21 16:16:26 calderon Exp $";
34 
35 
36 StSvtWaferCoordinate::StSvtWaferCoordinate() {}
37 
38 StSvtWaferCoordinate::StSvtWaferCoordinate(const int layer, const int ladder, const int wafer, const int hybrid, const double anode, const double timebucket)
39  : mLayer(layer), mLadder(ladder), mWafer(wafer), mHybrid(hybrid), mAnode(anode), mTimeBucket(timebucket) {}
40 
41 StSvtWaferCoordinate::~StSvtWaferCoordinate() {}
42 
43 int
44 StSvtWaferCoordinate::operator==(const StSvtWaferCoordinate& p) const
45 {
46 
47  return (p.mLayer == mLayer &&
48  p.mLadder == mLadder &&
49  p.mWafer == mWafer &&
50  p.mHybrid == mHybrid &&
51  p.mAnode == mAnode &&
52  p.mTimeBucket == mTimeBucket);
53 }
54 
55 int
56 StSvtWaferCoordinate::operator!=(const StSvtWaferCoordinate& p) const
57 {
58  return !(*this == p); // use operator==()
59 }
60 
61 // Non-Member function
62 ostream& operator<<(ostream& os, const StSvtWaferCoordinate& a)
63 {
64  return os << "(layer= " << a.layer()
65  << ", ladder= " << a.ladder()
66  << ", wafer= " << a.wafer()
67  << ", hybrid= " << a.hybrid()
68  << ", anode= " << a.anode()
69  << ", timebucket= " << a.timebucket()
70  << ")";
71 }