NtpCandSlice Class Reference

#include <NtpCandSlice.h>

List of all members.

Public Member Functions

 NtpCandSlice ()
 NtpCandSlice (const CandSliceHandle &)
virtual ~NtpCandSlice ()
virtual std::ostream & Print (std::ostream &os) const
virtual void Print (Option_t *option="") const
virtual Double_t GetCorrBegTime () const
virtual Double_t GetCorrEndTime () const
virtual Int_t GetNDigit () const
virtual Int_t GetNStrip () const
virtual void Clear (Option_t *="")
virtual void AddStripAt (Int_t stripindex, Int_t ind)

Protected Attributes

Double_t fCorrBegTime
Double_t fCorrEndTime
Int_t fNDigit
Int_t fNStrip
Int_t * fStripInd

Detailed Description

Definition at line 20 of file NtpCandSlice.h.


Constructor & Destructor Documentation

NtpCandSlice::NtpCandSlice (  )  [inline]

Definition at line 24 of file NtpCandSlice.h.

00024                   : fCorrBegTime(-1),fCorrEndTime(-1),
00025                 fNDigit(0),fNStrip(0),fStripInd(0) {} //default const'r

NtpCandSlice::NtpCandSlice ( const CandSliceHandle slice  ) 

Definition at line 24 of file NtpCandSlice.cxx.

References fCorrBegTime, fCorrEndTime, fNDigit, fNStrip, fStripInd, CandSliceHandle::GetCorrBegTime(), CandSliceHandle::GetCorrEndTime(), CandSliceHandle::GetNDigit(), and CandSliceHandle::GetNStrip().

00024                                                        :
00025          fCorrBegTime(-1),fCorrEndTime(-1),fNDigit(0),fNStrip(0),fStripInd(0) {
00026   //
00027   //  Purpose:  Constructor creates an ntuple from an existing CandSlice.
00028   //
00029   //  Arguments: reference to CandSliceHandle (or derived class) object.
00030   //
00031   //  Return:  n/a.
00032   //
00033   //  Contact:   S. Kasahara
00034   // 
00035 
00036   fCorrBegTime = slice.GetCorrBegTime();
00037   fCorrEndTime = slice.GetCorrEndTime();
00038   fNDigit = slice.GetNDigit();
00039   fNStrip = slice.GetNStrip();
00040   if ( fNStrip ) {
00041     fStripInd = new Int_t[fNStrip];
00042     // Initialize all indices to -1
00043     for (Int_t i = 0; i < fNStrip; i++ ) fStripInd[i] = -1;
00044   }
00045     
00046 }

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

Definition at line 27 of file NtpCandSlice.h.

References fStripInd.

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


Member Function Documentation

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

Definition at line 48 of file NtpCandSlice.cxx.

References fNStrip, and fStripInd.

Referenced by DemoCandNtpModule::Reco().

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

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

Definition at line 38 of file NtpCandSlice.h.

References fStripInd.

00038                                                   { if ( fStripInd ) 
00039                              delete [] fStripInd; fStripInd = 0; }

virtual Double_t NtpCandSlice::GetCorrBegTime (  )  const [inline, virtual]

Definition at line 32 of file NtpCandSlice.h.

References fCorrBegTime.

00032 { return fCorrBegTime; }

virtual Double_t NtpCandSlice::GetCorrEndTime (  )  const [inline, virtual]

Definition at line 33 of file NtpCandSlice.h.

References fCorrEndTime.

00033 { return fCorrEndTime; }

virtual Int_t NtpCandSlice::GetNDigit (  )  const [inline, virtual]

Definition at line 34 of file NtpCandSlice.h.

References fNDigit.

00034 { return fNDigit; }

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

Definition at line 35 of file NtpCandSlice.h.

References fNStrip.

00035 { return fNStrip; }

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

Definition at line 88 of file NtpCandSlice.cxx.

References Print().

00088                                                      {
00089   //
00090   //  Purpose:  Print slice in form supported by TObject::Print.
00091   //
00092   //  Arguments: option (not used)
00093   //
00094   //  Return:  none.
00095   //
00096   //  Contact:   S. Kasahara
00097   // 
00098 
00099   Print(std::cout);
00100   return;
00101 
00102 }

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

Definition at line 69 of file NtpCandSlice.cxx.

References fCorrBegTime, fCorrEndTime, fNDigit, and fNStrip.

Referenced by Print().

00069                                                     {
00070   //
00071   //  Purpose:  Print status of ntuple record on ostream.
00072   //
00073   //  Arguments: os ostream to display on.
00074   //
00075   //  Return:  ostream reference.
00076   //
00077   //  Contact:   S. Kasahara
00078   // 
00079 
00080   os << "BegTime " << fCorrBegTime << ", EndTime " << fCorrEndTime << endl;
00081   os << "NDigit " << fNDigit << ", NStrip " << fNStrip 
00082      << "." << endl;
00083 
00084   return os;
00085 
00086 }


Member Data Documentation

Double_t NtpCandSlice::fCorrBegTime [protected]

Definition at line 44 of file NtpCandSlice.h.

Referenced by GetCorrBegTime(), NtpCandSlice(), and Print().

Double_t NtpCandSlice::fCorrEndTime [protected]

Definition at line 45 of file NtpCandSlice.h.

Referenced by GetCorrEndTime(), NtpCandSlice(), and Print().

Int_t NtpCandSlice::fNDigit [protected]

Definition at line 46 of file NtpCandSlice.h.

Referenced by GetNDigit(), NtpCandSlice(), and Print().

Int_t NtpCandSlice::fNStrip [protected]

Definition at line 47 of file NtpCandSlice.h.

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

Int_t* NtpCandSlice::fStripInd [protected]

Definition at line 48 of file NtpCandSlice.h.

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


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1