NtpCandShower Class Reference

#include <NtpCandShower.h>

Inheritance diagram for NtpCandShower:
NtpCandReco

List of all members.

Public Member Functions

 NtpCandShower ()
 NtpCandShower (const CandShowerHandle &shower)
virtual ~NtpCandShower ()
virtual std::ostream & Print (std::ostream &os) const
virtual void Print (Option_t *option="") const
virtual Double_t GetEnergy () const
virtual Int_t GetNStrip () const
virtual void Clear (Option_t *="")
virtual void AddStripAt (Int_t stripindex, Int_t ind)

Protected Attributes

Double_t fEnergy
Int_t fNStrip
Int_t * fStripInd

Detailed Description

Definition at line 20 of file NtpCandShower.h.


Constructor & Destructor Documentation

NtpCandShower::NtpCandShower (  )  [inline]

Definition at line 24 of file NtpCandShower.h.

00024 : fEnergy(-1),fNStrip(0),fStripInd(0) {}  // def const'r

NtpCandShower::NtpCandShower ( const CandShowerHandle shower  ) 

Definition at line 23 of file NtpCandShower.cxx.

00023                                                            :
00024                NtpCandReco(shower),fEnergy(-1),fNStrip(0),fStripInd(0) {
00025   //
00026   //  Purpose:  Constructor creates an ntuple from an existing CandShower.
00027   //
00028   //  Arguments: reference to CandShowerHandle (or derived class) object.
00029   //
00030   //  Return:  n/a.
00031   //
00032   //  Contact:   S. Kasahara
00033   // 
00034 
00035   fEnergy = shower.GetEnergy();
00036   fNStrip = shower.GetNStrip();
00037   if ( fNStrip ) {
00038     fStripInd = new Int_t[fNStrip];
00039     for (Int_t i = 0; i < fNStrip; i++ ) fStripInd[i] = -1;
00040   }
00041 
00042 }

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

Definition at line 26 of file NtpCandShower.h.

References fStripInd.

00026 { if (fStripInd) delete [] fStripInd; }


Member Function Documentation

void NtpCandShower::AddStripAt ( Int_t  stripindex,
Int_t  ind 
) [virtual]

Definition at line 44 of file NtpCandShower.cxx.

References fNStrip, and fStripInd.

Referenced by DemoCandNtpModule::Reco().

00044                                                           {
00045   //
00046   //  Purpose:  Add stripindex to fStripInd array at position ind.
00047   //
00048   //  Arguments: stripindex: index of strip in assoc fStrips TClonesArray. 
00049   //             ind: index in fStripInd array, cannot exceed bounds
00050   //                  0->fNStrip-1.
00051   //
00052   //  Return:  n/a.
00053   //
00054   //  Contact:   S. Kasahara
00055   // 
00056 
00057   if ( ind < 0 || ind >= fNStrip ) return;  // should print warning
00058     
00059   fStripInd[ind] = stripindex;
00060   return;
00061     
00062 }

virtual void NtpCandShower::Clear ( Option_t *  = ""  )  [inline, virtual]

Definition at line 35 of file NtpCandShower.h.

References fStripInd.

00035                                                    { if ( fStripInd )
00036                                delete [] fStripInd; fStripInd = 0; }

virtual Double_t NtpCandShower::GetEnergy (  )  const [inline, virtual]

Definition at line 31 of file NtpCandShower.h.

References fEnergy.

00031 { return fEnergy; }

virtual Int_t NtpCandShower::GetNStrip (  )  const [inline, virtual]

Definition at line 32 of file NtpCandShower.h.

References fNStrip.

00032 { return fNStrip; }

void NtpCandShower::Print ( Option_t *  option = ""  )  const [virtual]

Reimplemented from NtpCandReco.

Definition at line 84 of file NtpCandShower.cxx.

References Print().

00084                                                       {
00085   //
00086   //  Purpose:  Print header in form supported by TObject::Print.
00087   //
00088   //  Arguments: option (not used)
00089   //
00090   //  Return:  none.
00091   //
00092   //  Contact:   S. Kasahara
00093   // 
00094   //  Notes:This version is required because overridden Print(std::ostream& os)
00095   //        hides base class version of this method.
00096   // 
00097 
00098   Print(std::cout);
00099   return;
00100 
00101 }

std::ostream & NtpCandShower::Print ( std::ostream &  os  )  const [virtual]

Reimplemented from NtpCandReco.

Definition at line 65 of file NtpCandShower.cxx.

References fEnergy, and fNStrip.

Referenced by Print().

00065                                                      {
00066   //
00067   //  Purpose:  Print status of ntuple record on ostream.
00068   //
00069   //  Arguments: os ostream to display on.
00070   //
00071   //  Return:  ostream reference.
00072   //
00073   //  Contact:   S. Kasahara
00074   // 
00075 
00076   os << "Energy " << fEnergy << ", " 
00077      << "NStrip " << fNStrip << endl;
00078   
00079 
00080   return os;
00081 
00082 }


Member Data Documentation

Double_t NtpCandShower::fEnergy [protected]

Definition at line 41 of file NtpCandShower.h.

Referenced by GetEnergy(), and Print().

Int_t NtpCandShower::fNStrip [protected]

Definition at line 42 of file NtpCandShower.h.

Referenced by AddStripAt(), GetNStrip(), and Print().

Int_t* NtpCandShower::fStripInd [protected]

Definition at line 43 of file NtpCandShower.h.

Referenced by AddStripAt(), Clear(), and ~NtpCandShower().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1