NtpMRRecord Class Reference

#include <NtpMRRecord.h>

Inheritance diagram for NtpMRRecord:
RecRecordImp< RecCandHeader > RecRecord

List of all members.

Public Member Functions

 NtpMRRecord ()
 NtpMRRecord (const RecCandHeader &header)
virtual ~NtpMRRecord ()
virtual std::ostream & Print (std::ostream &os) const
virtual void Print (Option_t *option="") const
void Clear (Option_t *option="")

Public Attributes

NtpMRSummary mrhdr
TClonesArray * mrevt
TClonesArray * mrtru

Private Member Functions

void Init ()

Detailed Description

Definition at line 25 of file NtpMRRecord.h.


Constructor & Destructor Documentation

NtpMRRecord::NtpMRRecord (  ) 

Definition at line 18 of file NtpMRRecord.cxx.

00018                            : RecRecordImp<RecCandHeader>(),mrevt(0),mrtru(0) {
00019   // Purpose: Default constructor
00020 
00021   this -> Init();  
00022 }

NtpMRRecord::NtpMRRecord ( const RecCandHeader header  ) 

Definition at line 24 of file NtpMRRecord.cxx.

References Init().

00024                                                  : 
00025   RecRecordImp<RecCandHeader>(hdr),mrevt(0),mrtru(0) {
00026   // Purpose: Normal constructor
00027 
00028   this -> Init(); 
00029 }

NtpMRRecord::~NtpMRRecord (  )  [virtual]

Definition at line 31 of file NtpMRRecord.cxx.

References RecArrayAllocator::Instance(), mrevt, mrtru, and RecArrayAllocator::ReleaseArray().

00031                           {
00032   // Purpose: Destructor
00033 
00034   // Release arrays back to TClonesArray pool for reuse
00035   // Allocated memory of stored objects is retrieved via object Clear call
00036   RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00037   if ( mrevt ) { allocator.ReleaseArray(mrevt); mrevt = 0; }
00038   if ( mrtru ) { allocator.ReleaseArray(mrtru); mrtru = 0; }
00039 
00040 }


Member Function Documentation

void NtpMRRecord::Clear ( Option_t *  option = ""  ) 

Definition at line 42 of file NtpMRRecord.cxx.

References mrevt, and mrtru.

Referenced by NtpFile::GetNextRecord(), and NtpFile::~NtpFile().

00042                                               {
00043   // Purpose: Clear memory allocated to arrays so that record can
00044   // be reused.  
00045 
00046   if ( mrevt ) { mrevt -> Clear("C"); }
00047   if ( mrtru ) { mrtru -> Clear("C"); }
00048    
00049 }

void NtpMRRecord::Init ( void   )  [private]

Definition at line 51 of file NtpMRRecord.cxx.

References RecArrayAllocator::GetArray(), RecArrayAllocator::Instance(), mrevt, and mrtru.

Referenced by NtpMRRecord().

00051                        {
00052   // 
00053   // Purpose: Initialize ntuple TClonesArrays
00054   //
00055 
00056   RecArrayAllocator& allocator = RecArrayAllocator::Instance();
00057   if ( !mrevt ) mrevt = allocator.GetArray("NtpMREvent");
00058   if ( !mrtru ) mrtru = allocator.GetArray("NtpMRTruth");
00059 
00060 }

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

Reimplemented from RecRecordImp< RecCandHeader >.

Definition at line 74 of file NtpMRRecord.cxx.

References Print().

00074                                                     {
00075   //
00076   // Purpose: Print record in form supported by TObject::Print
00077   //
00078 
00079   Print(std::cout);
00080   return;
00081 
00082 }

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

Reimplemented from RecRecordImp< RecCandHeader >.

Definition at line 62 of file NtpMRRecord.cxx.

Referenced by Print().

00062                                                    {
00063   //
00064   // Purpose: Print status of ntuple record on ostream
00065   //
00066 
00067   os << "NtpMRRecord::Print" << endl;
00068   RecRecordImp<RecCandHeader>::Print(os);
00069   
00070   return os;
00071 
00072 }


Member Data Documentation

TClonesArray* NtpMRRecord::mrevt
TClonesArray* NtpMRRecord::mrtru

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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1