#include "MCerPhotEvt.h" #include #include #include #include #include "MLog.h" #include "MGeomCam.h" #include "MCamNeighbor.h" #include "MCamDisplay.h" #include "MHexagon.h" ClassImp(MCerPhotEvt) MCerPhotEvt::MCerPhotEvt(const char *name, const char *title ) : fType(0), fNbPixels(0) { // the default constructor *fName = name ? name : "MCerPhotEvt"; *fTitle = name ? name : "(Number of Photon)-Event Information"; fPixels = new TClonesArray ("MCerPhotPix", 577) ; // // FIXME: is this really necessary? // fPixels->Clear(); } void MCerPhotEvt::Draw(Option_t* option) { // FIXME!!! // MCamDisplay *disp = new MCamDisplay(fType) ; disp->DrawPhotNum(this) ; } Int_t MCerPhotEvt::GetNbPixels() { return fNbPixels; } void MCerPhotEvt::AddPixel(Int_t id, Float_t nph, Float_t err) { // // add a new pixel to the list and increase the number // of valid pixels in the list by one // (*fPixels)[fNbPixels++] = new MCerPhotPix( id, nph, err); } void MCerPhotEvt::Clear(Option_t *) { // // reset counter and delete netries in list. // fNbPixels = 0 ; fPixels->Clear() ; } void MCerPhotEvt::Print(Option_t *) { const Int_t entries = fPixels->GetEntries(); *fLog << "MCerPhotEvt::Print()" << endl << "Number of Pixels: " << fNbPixels << "(" << entries << ")" << endl ; for (Int_t il=0; ilGetEntries(); // // check the number of all pixels against the noise level and // set them to 'unused' state if necessary // for (Int_t il=0; ilGetEntries(); for (Int_t il=0; ilGetEntries(); for (Int_t il=0; ilGetEntries(); for (Int_t il=0; ilGetEntries(); for (Int_t il=0; ilGetEntries(); for (Int_t il=0; il maxval) maxval = testval; } return maxval; }