SwimPlaneInterface Class Reference

#include <SwimPlaneInterface.h>

List of all members.

Public Member Functions

 SwimPlaneInterface ()
 SwimPlaneInterface (Double_t z, SwimGeo::SwimMaterial_t matBefore, SwimGeo::SwimMaterial_t matAfter)
virtual ~SwimPlaneInterface ()
Double_t GetZ () const
SwimGeo::SwimMaterial_t GetMaterialBefore () const
SwimGeo::SwimMaterial_t GetMaterialAfter () const
void Print (Option_t *option="") const
Bool_t IsSortable () const
Int_t Compare (const TObject *tobj) const
Bool_t IsEqual (const TObject *tobj) const
ULong_t Hash () const

Private Attributes

Double_t fZ
SwimGeo::SwimMaterial_t fMatBefore
SwimGeo::SwimMaterial_t fMatAfter


Detailed Description

Definition at line 7 of file SwimPlaneInterface.h.


Constructor & Destructor Documentation

SwimPlaneInterface::SwimPlaneInterface (  )  [inline]

Definition at line 12 of file SwimPlaneInterface.h.

00012 {;}

SwimPlaneInterface::SwimPlaneInterface ( Double_t  z,
SwimGeo::SwimMaterial_t  matBefore,
SwimGeo::SwimMaterial_t  matAfter 
)

Definition at line 11 of file SwimPlaneInterface.cxx.

00014   : fZ(z), fMatBefore(matBefore), fMatAfter(matAfter)
00015 {
00016   // basic ctor just initialized data members
00017 }

virtual SwimPlaneInterface::~SwimPlaneInterface (  )  [inline, virtual]

Definition at line 16 of file SwimPlaneInterface.h.

00016 {;}


Member Function Documentation

Int_t SwimPlaneInterface::Compare ( const TObject *  tobj  )  const [inline]

Definition at line 26 of file SwimPlaneInterface.h.

References fZ.

00026                                            {
00027     Double_t other_fZ = dynamic_cast<const SwimPlaneInterface*>(tobj)->fZ;
00028     if (other_fZ == fZ) {
00029       return 0;
00030     }
00031     else if (other_fZ < fZ) {
00032       return 1;
00033     }
00034     else {
00035       return -1;
00036     }
00037   }

SwimGeo::SwimMaterial_t SwimPlaneInterface::GetMaterialAfter (  )  const [inline]

Definition at line 20 of file SwimPlaneInterface.h.

References fMatAfter.

Referenced by SwimGeo::GetSwimMaterial().

00020 { return fMatAfter; }

SwimGeo::SwimMaterial_t SwimPlaneInterface::GetMaterialBefore (  )  const [inline]

Definition at line 19 of file SwimPlaneInterface.h.

References fMatBefore.

Referenced by SwimGeo::GetSwimMaterial().

00019 { return fMatBefore; }

Double_t SwimPlaneInterface::GetZ (  )  const [inline]

Definition at line 18 of file SwimPlaneInterface.h.

References fZ.

Referenced by AlgFitTrackSR::CalculateNoise(), SwimGeo::GetInterface(), AlgFitTrackCam::GetNoiseMatrix(), SwimGeo::GetSwimMaterial(), and SwimGeo::SetNextPlaneZ().

00018 { return fZ; }

ULong_t SwimPlaneInterface::Hash (  )  const [inline]

Definition at line 46 of file SwimPlaneInterface.h.

References fZ.

00046                        {
00047     ULong_t ifz = static_cast<ULong_t>(fZ*1000.);
00048     return ifz;
00049   }

Bool_t SwimPlaneInterface::IsEqual ( const TObject *  tobj  )  const [inline]

Definition at line 39 of file SwimPlaneInterface.h.

References fMatAfter, fMatBefore, and fZ.

00039                                             {
00040     const SwimPlaneInterface *spi = dynamic_cast<const SwimPlaneInterface*>(tobj);
00041     return spi->fZ==fZ && 
00042            spi->fMatBefore==fMatBefore && 
00043            spi->fMatAfter==fMatAfter;
00044   }

Bool_t SwimPlaneInterface::IsSortable (  )  const [inline]

Definition at line 24 of file SwimPlaneInterface.h.

00024 {return kTRUE;}

void SwimPlaneInterface::Print ( Option_t *  option = ""  )  const

Definition at line 21 of file SwimPlaneInterface.cxx.

References SwimGeo::AsString(), fMatAfter, fMatBefore, fZ, Msg::kInfo, and MSGSTREAM.

00022 {
00023   // Print the relevant features of this interface
00024   // Option "0" mean suppress newline.
00025   static const MsgFormat f10p5("%f10.5f");
00026 
00027   MsgStream& msg = MSGSTREAM("Swim",Msg::kInfo);
00028 
00029   msg << " SwimPlaneInterface z= " << f10p5(fZ)
00030       << setw(7) << SwimGeo::AsString(fMatBefore) << "->"
00031       << setw(7) << SwimGeo::AsString(fMatAfter);
00032   if (option[0] != '0') msg << endl;
00033 
00034 }


Member Data Documentation

SwimGeo::SwimMaterial_t SwimPlaneInterface::fMatAfter [private]

Definition at line 55 of file SwimPlaneInterface.h.

Referenced by GetMaterialAfter(), IsEqual(), and Print().

SwimGeo::SwimMaterial_t SwimPlaneInterface::fMatBefore [private]

Definition at line 54 of file SwimPlaneInterface.h.

Referenced by GetMaterialBefore(), IsEqual(), and Print().

Double_t SwimPlaneInterface::fZ [private]

Definition at line 53 of file SwimPlaneInterface.h.

Referenced by Compare(), GetZ(), Hash(), IsEqual(), and Print().


The documentation for this class was generated from the following files:
Generated on Wed Dec 10 22:50:35 2014 for loon by  doxygen 1.4.7