#include <NtpCandEvent.h>
Public Member Functions | |
| NtpCandEvent () | |
| NtpCandEvent (const CandEventHandle &event) | |
| virtual | ~NtpCandEvent () |
| virtual std::ostream & | Print (std::ostream &os) const |
| virtual void | Print (Option_t *option="") const |
| virtual Int_t | GetNTrack () const |
| virtual Int_t | GetNShower () const |
| virtual void | AddTrackAt (Int_t trackindex, Int_t ind) |
| virtual void | AddShowerAt (Int_t showerindex, Int_t ind) |
| virtual void | Clear (Option_t *="") |
Protected Attributes | |
| Int_t | fNTrack |
| Int_t * | fTrackInd |
| Int_t | fNShower |
| Int_t * | fShowerInd |
|
|
Definition at line 25 of file NtpCandEvent.h. References fNShower, fNTrack, fShowerInd, and fTrackInd. 00025 : fNTrack(0),fTrackInd(0),fNShower(0),fShowerInd(0) {}//def
|
|
|
Definition at line 25 of file NtpCandEvent.cxx. References fNShower, fNTrack, fShowerInd, fTrackInd, CandEventHandle::GetLastShower(), and CandEventHandle::GetLastTrack(). 00025 : 00026 fNTrack(0), fTrackInd(0), fNShower(0), fShowerInd(0) { 00027 // 00028 // Purpose: Constructor creates an ntuple from an existing CandEvent. 00029 // 00030 // Arguments: reference to CandEvent (or derived class) object. 00031 // 00032 // Return: n/a. 00033 // 00034 // Contact: S. Kasahara 00035 // 00036 00037 fNTrack = event.GetLastTrack()+1; 00038 if ( fNTrack ) { 00039 fTrackInd = new Int_t[fNTrack]; 00040 // Initialize all indices to -1 00041 for (Int_t i = 0; i < fNTrack; i++ ) fTrackInd[i] = -1; 00042 } 00043 00044 fNShower = event.GetLastShower()+1; 00045 if ( fNShower ) { 00046 fShowerInd = new Int_t[fNShower]; 00047 // Initialize all indices to -1 00048 for (Int_t i = 0; i < fNShower; i++ ) fShowerInd[i] = -1; 00049 } 00050 00051 }
|
|
|
Definition at line 27 of file NtpCandEvent.h. 00027 { if (fTrackInd) delete [] fTrackInd;
00028 if (fShowerInd) delete [] fShowerInd; }
|
|
||||||||||||
|
Definition at line 73 of file NtpCandEvent.cxx. References fShowerInd. Referenced by DemoCandNtpModule::Reco(). 00073 {
00074 //
00075 // Purpose: Add showerindex to fShowerInd array at position ind.
00076 //
00077 // Arguments: showerindex: index of shower in assoc fShowers TClonesArray.
00078 // ind: index in fShowerInd array, cannot exceed bounds
00079 // 0->fNStrip-1.
00080 //
00081 // Return: n/a.
00082 //
00083 // Contact: S. Kasahara
00084 //
00085
00086 if ( ind < 0 || ind >= fNShower ) return; // should print warning
00087
00088 fShowerInd[ind] = showerindex;
00089 return;
00090
00091 }
|
|
||||||||||||
|
Definition at line 53 of file NtpCandEvent.cxx. References fTrackInd. Referenced by DemoCandNtpModule::Reco(). 00053 {
00054 //
00055 // Purpose: Add trackindex to fTrackInd array at position ind.
00056 //
00057 // Arguments: trackindex: index of track in assoc fTracks TClonesArray.
00058 // ind: index in fTrackInd array, cannot exceed bounds
00059 // 0->fNTrack-1.
00060 //
00061 // Return: n/a.
00062 //
00063 // Contact: S. Kasahara
00064 //
00065
00066 if ( ind < 0 || ind >= fNTrack ) return; // should print warning
00067
00068 fTrackInd[ind] = trackindex;
00069 return;
00070
00071 }
|
|
|
Definition at line 39 of file NtpCandEvent.h. References fShowerInd, and fTrackInd. 00039 { if ( fTrackInd )
00040 delete [] fTrackInd; fTrackInd = 0; if ( fShowerInd )
00041 delete [] fShowerInd; fShowerInd = 0; }
|
|
|
Definition at line 34 of file NtpCandEvent.h. 00034 { return fNShower; }
|
|
|
Definition at line 33 of file NtpCandEvent.h. 00033 { return fNTrack; }
|
|
|
Definition at line 112 of file NtpCandEvent.cxx. References Print(). 00112 {
00113 //
00114 // Purpose: Print event in form supported by TObject::Print.
00115 //
00116 // Arguments: option (not used).
00117 //
00118 // Return: none.
00119 //
00120 // Contact: S. Kasahara
00121 //
00122
00123 Print(std::cout);
00124 return;
00125
00126 }
|
|
|
Definition at line 94 of file NtpCandEvent.cxx. References fNShower, and fNTrack. Referenced by Print(). 00094 {
00095 //
00096 // Purpose: Print status of ntuple record on ostream.
00097 //
00098 // Arguments: os ostream to display on.
00099 //
00100 // Return: ostream reference.
00101 //
00102 // Contact: S. Kasahara
00103 //
00104
00105 os << "Event has " << fNTrack << " tracks and "
00106 << fNShower << " showers." << endl;
00107
00108 return os;
00109
00110 }
|
|
|
Definition at line 47 of file NtpCandEvent.h. Referenced by NtpCandEvent(), and Print(). |
|
|
Definition at line 45 of file NtpCandEvent.h. Referenced by NtpCandEvent(), and Print(). |
|
|
Definition at line 48 of file NtpCandEvent.h. Referenced by AddShowerAt(), Clear(), and NtpCandEvent(). |
|
|
Definition at line 46 of file NtpCandEvent.h. Referenced by AddTrackAt(), Clear(), and NtpCandEvent(). |
1.3.9.1