Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NtpCluster3D.cxx

Go to the documentation of this file.
00001 
00002 //
00003 // NtpCluster3D (based on NtpSRShower)
00004 //
00005 // NtpCluster3D is an ntuple class to hold cluster data
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   //  Purpose:  Add stripindex to fStripInd array at position ind.
00025   //
00026   //  Arguments: stripindex: index of strip in assoc fStrips TClonesArray. 
00027   //             ind: index in fStripInd array, cannot exceed bounds
00028   //                  0->fNStrip-1.
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   // Normal constructor
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   //  Purpose:  Print strip data on ostream.
00058   //
00059 
00060   os << "NtpCluster3D::Print" << endl;
00061   return os;
00062 
00063 }
00064 
00065 void NtpCluster3D::Print(Option_t* /* option */) const {
00066   //
00067   //  Purpose:  Print strip in form supported by TObject::Print.
00068   //
00069   //  Arguments: option (not used)
00070   //
00071 
00072   Print(std::cout);
00073   return;
00074 
00075 }

Generated on Mon Feb 15 11:07:05 2010 for loon by  doxygen 1.3.9.1