ANtpSliceManipulator Class Reference

#include <ANtpSliceManipulator.h>

List of all members.

Public Member Functions

 ANtpSliceManipulator ()
virtual ~ANtpSliceManipulator ()
NtpSRSliceGetSlice ()
NtpSRStripGetStrip (Int_t index)
void SetSliceInSnarl (Int_t sliceIndex)
void Initialize (TClonesArray *sliceArray, TClonesArray *stripArray)

Private Attributes

NtpSRSlicefNtpSRSlice
TClonesArray * fSliceArray
TClonesArray * fStripArray


Detailed Description

Definition at line 19 of file ANtpSliceManipulator.h.


Constructor & Destructor Documentation

ANtpSliceManipulator::ANtpSliceManipulator (  ) 

Definition at line 20 of file ANtpSliceManipulator.cxx.

References Msg::kDebug, and MSG.

00020                                            :
00021   fNtpSRSlice(0),
00022   fSliceArray(0),
00023   fStripArray(0)
00024 {    
00025   MSG("ANtpSliceManipulator", Msg::kDebug) << "ANtpSliceManipulator::Constructor" << endl; 
00026 }

ANtpSliceManipulator::~ANtpSliceManipulator (  )  [virtual]

Definition at line 38 of file ANtpSliceManipulator.cxx.

References Msg::kDebug, and MSG.

00039 { 
00040   MSG("ANtpSliceManipulator", Msg::kDebug) << "ANtpSliceManipulator::Destructor" << endl; 
00041 }


Member Function Documentation

NtpSRSlice * ANtpSliceManipulator::GetSlice (  ) 

Definition at line 44 of file ANtpSliceManipulator.cxx.

References fNtpSRSlice.

Referenced by ANtpInfoObjectFillerNC::FillEventTimingAndActivityInformation().

00045 {
00046   return fNtpSRSlice;
00047 }

NtpSRStrip * ANtpSliceManipulator::GetStrip ( Int_t  index  ) 

Definition at line 51 of file ANtpSliceManipulator.cxx.

References fNtpSRSlice, fStripArray, Msg::kWarning, MSG, and NtpSRSlice::stp.

00052 {
00053   NtpSRStrip *ntpStrip = 0;
00054 
00055   if(!fNtpSRSlice){
00056     MSG("ANtpSliceManipulator", Msg::kWarning) << "No NtpSRSlice to get a NtpSRStrip from"
00057                                                << " - returning empty pointer" << endl;
00058     return ntpStrip;
00059   }
00060   
00061   if(index < fNtpSRSlice->nstrip)
00062     ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(fNtpSRSlice->stp[index]));
00063   
00064   return ntpStrip;
00065 }

void ANtpSliceManipulator::Initialize ( TClonesArray *  sliceArray,
TClonesArray *  stripArray 
)

Definition at line 29 of file ANtpSliceManipulator.cxx.

References fSliceArray, fStripArray, Msg::kDebug, and MSG.

Referenced by ANtpRecoNtpManipulator::ANtpRecoNtpManipulator(), and ANtpRecoNtpManipulator::SetRecord().

00030 {
00031   fSliceArray = sliceArray;
00032   fStripArray = stripArray;
00033   MSG("ANtpSliceManipulator", Msg::kDebug) << "ANtpSliceManipulator::Constructor" << endl;    
00034 }

void ANtpSliceManipulator::SetSliceInSnarl ( Int_t  sliceIndex  ) 

Definition at line 68 of file ANtpSliceManipulator.cxx.

References fNtpSRSlice, fSliceArray, Msg::kWarning, and MSG.

Referenced by ANtpInfoObjectFillerNC::FillEventTimingAndActivityInformation().

00069 {
00070   //check that such an event exists
00071   if(sliceIndex < fSliceArray->GetLast()+1) 
00072     fNtpSRSlice = dynamic_cast<NtpSRSlice *>(fSliceArray->At(sliceIndex));
00073   else{
00074     MSG("ANtpSliceManipulator", Msg::kWarning) << "invalid event index, set to first event in array" << endl;
00075     fNtpSRSlice = dynamic_cast<NtpSRSlice *>(fSliceArray->At(0));
00076   }
00077 
00078   return;
00079 }


Member Data Documentation

NtpSRSlice* ANtpSliceManipulator::fNtpSRSlice [private]

Definition at line 34 of file ANtpSliceManipulator.h.

Referenced by GetSlice(), GetStrip(), and SetSliceInSnarl().

TClonesArray* ANtpSliceManipulator::fSliceArray [private]

Definition at line 36 of file ANtpSliceManipulator.h.

Referenced by Initialize(), and SetSliceInSnarl().

TClonesArray* ANtpSliceManipulator::fStripArray [private]

Definition at line 37 of file ANtpSliceManipulator.h.

Referenced by GetStrip(), and Initialize().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:50:47 2014 for loon by  doxygen 1.4.7