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

NtpCandRecord Class Reference

#include <NtpCandRecord.h>

Inheritance diagram for NtpCandRecord:

RecRecordImp< RecCandHeader > RecRecord CandRecordSRNtuple List of all members.

Public Member Functions

 NtpCandRecord ()
 NtpCandRecord (const RecCandHeader &header)
virtual ~NtpCandRecord ()
TClonesArray & GetStrips ()
TClonesArray & GetSlices ()
TClonesArray & GetTracks ()
TClonesArray & GetShowers ()
TClonesArray & GetEvents ()
virtual std::ostream & Print (std::ostream &os) const
virtual void Print (Option_t *option="") const

Protected Member Functions

virtual void Init ()

Protected Attributes

TClonesArray * fStrips
TClonesArray * fSlices
TClonesArray * fTracks
TClonesArray * fShowers
TClonesArray * fEvents

Constructor & Destructor Documentation

NtpCandRecord::NtpCandRecord  ) 
 

Definition at line 25 of file NtpCandRecord.cxx.

00025                              : RecRecordImp<RecCandHeader>(),
00026             fStrips(0),fSlices(0),fTracks(0),fShowers(0),fEvents(0) {
00027   //
00028   //  Purpose:  Default constructor.
00029   //
00030   //  Arguments: none.
00031   //
00032   //  Contact:   S. Kasahara
00033   // 
00034 
00035   this -> Init();
00036 
00037 
00038 }

NtpCandRecord::NtpCandRecord const RecCandHeader header  ) 
 

Definition at line 40 of file NtpCandRecord.cxx.

References Init().

00040                                                      :
00041   RecRecordImp<RecCandHeader>(hdr),fStrips(0),fSlices(0),fTracks(0),
00042   fShowers(0),fEvents(0) {
00043   //
00044   //  Purpose:  Normal constructor.
00045   //
00046   //  Arguments: header.
00047   //
00048   //  Contact:   S. Kasahara
00049   // 
00050 
00051   this -> Init();
00052 
00053 }

NtpCandRecord::~NtpCandRecord  )  [virtual]
 

Definition at line 55 of file NtpCandRecord.cxx.

References fEvents, fShowers, fSlices, fStrips, fTracks, RecArrayAllocator::Instance(), and RecArrayAllocator::ReleaseArray().

00055                               {
00056   //
00057   //  Purpose:  Print status of ntuple record on ostream.
00058   //
00059   //  Arguments: os ostream to display on.
00060   //
00061   //  Return:  ostream reference.
00062   //
00063   //  Contact:   S. Kasahara
00064   // 
00065 
00066   RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00067   // Allocated memory is retrieved via object Clear call
00068   if ( fStrips ) { allocator.ReleaseArray( fStrips ); fStrips = 0; }
00069   if ( fSlices ) { allocator.ReleaseArray( fSlices ); fSlices = 0; }
00070   if ( fTracks ) { allocator.ReleaseArray( fTracks ); fTracks = 0; }
00071   if ( fShowers) { allocator.ReleaseArray( fShowers); fShowers= 0;}
00072   if ( fEvents ) { allocator.ReleaseArray( fEvents ); fEvents = 0; }
00073 
00074 }


Member Function Documentation

TClonesArray& NtpCandRecord::GetEvents  )  [inline]
 

Definition at line 39 of file NtpCandRecord.h.

Referenced by DemoCandNtpModule::Reco().

00039 { return *fEvents; }

TClonesArray& NtpCandRecord::GetShowers  )  [inline]
 

Definition at line 38 of file NtpCandRecord.h.

Referenced by DemoCandNtpModule::Reco().

00038 { return *fShowers;}

TClonesArray& NtpCandRecord::GetSlices  )  [inline]
 

Definition at line 36 of file NtpCandRecord.h.

Referenced by DemoCandNtpModule::Reco().

00036 { return *fSlices; }

TClonesArray& NtpCandRecord::GetStrips  )  [inline]
 

Definition at line 35 of file NtpCandRecord.h.

Referenced by DemoCandNtpModule::Reco().

00035 { return *fStrips; }

TClonesArray& NtpCandRecord::GetTracks  )  [inline]
 

Definition at line 37 of file NtpCandRecord.h.

Referenced by DemoCandNtpModule::Reco().

00037 { return *fTracks; }

void NtpCandRecord::Init  )  [protected, virtual]
 

Reimplemented in CandRecordSRNtuple.

Definition at line 76 of file NtpCandRecord.cxx.

References fEvents, fShowers, fSlices, fStrips, fTracks, RecArrayAllocator::GetArray(), and RecArrayAllocator::Instance().

Referenced by NtpCandRecord().

00076                          {
00077   //
00078   //  Purpose:  Initialize ntuple TClonesArrays.
00079   //
00080   //  Arguments: none.
00081   //
00082   //  Return:  none.
00083   //
00084   //  Contact:   S. Kasahara
00085   // 
00086 
00087   RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00088 
00089   if (!fStrips) fStrips  = allocator.GetArray("NtpCandStrip");
00090   if (!fSlices) fSlices  = allocator.GetArray("NtpCandSlice");
00091   if (!fTracks) fTracks  = allocator.GetArray("NtpCandTrack");
00092   if (!fShowers)fShowers = allocator.GetArray("NtpCandShower");
00093   if (!fEvents) fEvents  = allocator.GetArray("NtpCandEvent");
00094 
00095 }

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

Reimplemented from RecRecordImp< RecCandHeader >.

Definition at line 115 of file NtpCandRecord.cxx.

References Print().

00115                                                       {
00116   //
00117   //  Purpose:  Print record in form supported by TObject::Print.
00118   //
00119   //  Arguments: option (not used)
00120   //
00121   //  Return:  none.
00122   //
00123   //  Contact:   S. Kasahara
00124   // 
00125 
00126   Print(std::cout);
00127   return;
00128 
00129 }

std::ostream & NtpCandRecord::Print std::ostream &  os  )  const [virtual]
 

Reimplemented from RecRecordImp< RecCandHeader >.

Reimplemented in CandRecordSRNtuple.

Definition at line 97 of file NtpCandRecord.cxx.

References RecRecordImp< T >::Print().

Referenced by Print(), and CandRecordSRNtuple::Print().

00097                                                      {
00098   //
00099   //  Purpose:  Print status of ntuple record on ostream.
00100   //
00101   //  Arguments: os ostream to display on.
00102   //
00103   //  Return:  ostream reference.
00104   //
00105   //  Contact:   S. Kasahara
00106   // 
00107 
00108   os << "RecRecordImp<RecCandHeader>::Print:" << endl;
00109   RecRecordImp<RecCandHeader>::Print(os);
00110 
00111   return os;
00112 
00113 }


Member Data Documentation

TClonesArray* NtpCandRecord::fEvents [protected]
 

Definition at line 51 of file NtpCandRecord.h.

Referenced by Init(), and ~NtpCandRecord().

TClonesArray* NtpCandRecord::fShowers [protected]
 

Definition at line 50 of file NtpCandRecord.h.

Referenced by Init(), and ~NtpCandRecord().

TClonesArray* NtpCandRecord::fSlices [protected]
 

Definition at line 48 of file NtpCandRecord.h.

Referenced by Init(), and ~NtpCandRecord().

TClonesArray* NtpCandRecord::fStrips [protected]
 

Definition at line 47 of file NtpCandRecord.h.

Referenced by Init(), and ~NtpCandRecord().

TClonesArray* NtpCandRecord::fTracks [protected]
 

Definition at line 49 of file NtpCandRecord.h.

Referenced by Init(), and ~NtpCandRecord().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:41 2010 for loon by  doxygen 1.3.9.1