00001
00002
00003
00004
00005
00006
00008
00009 #include <iostream>
00010 using namespace std;
00011
00012 #include "MessageService/MsgService.h"
00013 #include "Cluster3D/NtpCluster3D.h"
00014
00015 ClassImp(NtpCluster3D)
00016
00017 std::ostream& operator << (std::ostream& os, const NtpCluster3D& ntp)
00018 { return ntp.Print(os); }
00019
00020 CVSID("$Id: NtpCluster3D.cxx,v 1.2 2007/03/01 17:44:17 rhatcher Exp $");
00021
00022 void NtpCluster3D::AddStripAt(Int_t stripindex, Int_t ind) {
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 if ( ind < 0 || ind >= nstrip ) {
00033 MSG("NtpSR",Msg::kWarning)
00034 << "Attempt to add strip at index " << ind
00035 << " outside of array size " << nstrip << " ignored." << endl;
00036 return;
00037 }
00038
00039 stp[ind] = stripindex;
00040 return;
00041
00042 }
00043
00044 NtpCluster3D::NtpCluster3D(Int_t nstripinit): index(0),
00045 nstrip(nstripinit),stp(0) {
00046
00047
00048 if ( nstrip ) {
00049 stp = new Int_t[nstrip];
00050 for ( Int_t i = 0; i < nstrip; i++ ) stp[i] = -1;
00051 }
00052
00053 }
00054
00055 std::ostream& NtpCluster3D::Print(std::ostream& os) const {
00056
00057
00058
00059
00060 os << "NtpCluster3D::Print" << endl;
00061 return os;
00062
00063 }
00064
00065 void NtpCluster3D::Print(Option_t* ) const {
00066
00067
00068
00069
00070
00071
00072 Print(std::cout);
00073 return;
00074
00075 }