| Line | |
|---|
| 1 | #include "MRflEvtData.h"
|
|---|
| 2 |
|
|---|
| 3 | #include "MLog.h"
|
|---|
| 4 | #include "MLogManip.h"
|
|---|
| 5 |
|
|---|
| 6 | ClassImp(MRflEvtData);
|
|---|
| 7 |
|
|---|
| 8 | // --------------------------------------------------------------------------
|
|---|
| 9 | //
|
|---|
| 10 | // Creates a MCerPhotPix object for each pixel in the event
|
|---|
| 11 | //
|
|---|
| 12 | MRflEvtData::MRflEvtData(const char *name, const char *title)
|
|---|
| 13 | : fList("MRflSinglePhoton", 0), fPos(0)
|
|---|
| 14 | {
|
|---|
| 15 | fName = name ? name : "MRflEvtData";
|
|---|
| 16 | fTitle = title ? title : "All Photons from a reflector event";
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | void MRflEvtData::Print(Option_t *o="") const
|
|---|
| 20 | {
|
|---|
| 21 | *fLog << all << underline << GetDescriptor() << ":" << endl;
|
|---|
| 22 | fList.Print();
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | MRflSinglePhoton &MRflEvtData::GetNewPhoton()
|
|---|
| 26 | {
|
|---|
| 27 | // If necessary the []-operator creates a new element
|
|---|
| 28 | // Warning: The virtual table may not be set correctly,
|
|---|
| 29 | // this is why you have to call the new-operator.
|
|---|
| 30 | return *new (fList[fPos++]) MRflSinglePhoton;
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | void MRflEvtData::FixSize()
|
|---|
| 34 | {
|
|---|
| 35 | if (fList.GetEntriesFast() == fPos)
|
|---|
| 36 | return;
|
|---|
| 37 |
|
|---|
| 38 | fList.ExpandCreateFast(fPos);
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.