|
//____________________________________________________________________ // // Vertex data class for the Beam-Beam counters // // Contains the time 0 information, the Z position // and a short int for the method used: // 0: well, that shouldn't happen // 1: big tubes only // 2: small tubes only // 3: fastest tube // //____________________________________________________________________ // // $Id: BrBbVertex.cxx,v 1.2 2001/10/02 01:51:33 ouerdane Exp $ // $Author: ouerdane $ // $Date: 2001/10/02 01:51:33 $ // $Copyright: (C) 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov> // //____________________________________________________________________ #ifndef __IOSTREAM__ #include <iostream> #endif #ifndef __IOMANIP__ #include <iomanip> #endif #ifndef BRAT_BrBbVertex #include "BrBbVertex.h" #endif //____________________________________________________________________ ClassImp(BrBbVertex); //____________________________________________________________________ BrBbVertex::BrBbVertex() : BrDataObject() { // Default constructor, do not use fTime0 = -1; fLeftTime = -1; fRightTime = -1; fZ0 = 999; fMethod = 0; } //____________________________________________________________________ BrBbVertex::BrBbVertex(const Char_t* name, const Char_t* title) : BrDataObject(name, title) { // named constructor fTime0 = -1; fLeftTime = -1; fRightTime = -1; fZ0 = 999; fMethod = 0; } //____________________________________________________________________ BrBbVertex::BrBbVertex(BrBbVertex &vtx) : BrDataObject(vtx.GetName(), vtx.GetTitle()) { //Copy constructor SetZ0(vtx.GetZ0()); SetTime0(vtx.GetTime0()); SetLeftTime(vtx.GetLeftTime()); SetRightTime(vtx.GetRightTime()); SetMethod(vtx.GetMethod()); } //____________________________________________________________________ void BrBbVertex::Clear() { fMethod = 0; fZ0 = 999; fTime0 = -1; fLeftTime = -1; fRightTime = -1; } //____________________________________________________________________ BrBbVertex& BrBbVertex::operator=(BrBbVertex &vtx) { // assign content of vtx to this fMethod = vtx.GetMethod(); fZ0 = vtx.GetZ0(); fTime0 = vtx.GetTime0(); fLeftTime = vtx.GetLeftTime(); fRightTime = vtx.GetRightTime(); return *this; } //____________________________________________________________________ void BrBbVertex::Print(Option_t* option) const { // Print information // TString opt(option); opt.ToLower(); cout << "BrBbVertex: " << GetName() << "(" << GetTitle() << ")" << endl; cout << " Method used: " << flush; switch (fMethod) { case 0: cout << "none" << endl; break; case 1: cout << "Big Tubes only" << endl; break; case 2: cout << "Small tubes only" << endl; break; case 3: cout << "Fastest tube only" << endl; break; default: cout << "unknown" << endl; } cout << " Z position : " << setw(8) << GetZ0() << endl << " Trigger time : " << setw(8) << GetTime0() << endl << " Left time : " << setw(8) << GetLeftTime() << endl << " Right time : " << setw(8) << GetRightTime() << endl; } //____________________________________________________________________ // // $Log: BrBbVertex.cxx,v $ // Revision 1.2 2001/10/02 01:51:33 ouerdane // Added operator = in BrBbvertex // // Revision 1.1 2001/09/23 01:43:22 videbaek // Add the vertex class for Bb holding Z and T0 information. // Thanks to DO- but likely changes will occur shortly // // |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|