Changeset 19338 for trunk/Mars/msim
- Timestamp:
- 10/30/18 17:29:17 (6 years ago)
- Location:
- trunk/Mars/msim
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msim/MPhotonEvent.cc
r18549 r19338 613 613 } 614 614 615 Int_t MPhotonEvent::ReadCorsikaEvt(Float_t * data, Int_t numEvents, Int_t arrayIdx) 616 { 615 Int_t MPhotonEvent::ReadCorsikaEvt(const vector<Float_t> &data, const uint32_t &blockLength, const Int_t &arrayIdx) 616 { 617 if (data.size()%blockLength) 618 { 619 gLog << err << "ERROR - Size mismatch in photon bunch data." << endl; 620 return kERROR; // Error occured 621 } 622 623 const uint32_t N = data.size()/blockLength; 624 617 625 Int_t n = 0; 618 626 619 for (Int_t event = 0; event < numEvents; event++) 620 { 621 const Int_t rc = Add(n).FillCorsika(data + 7 * event, arrayIdx); 627 for (const Float_t *ptr=data.data(); ptr<data.data()+data.size(); ptr+=blockLength) 628 { 629 const Int_t rc = blockLength==7 ? 630 Add(n).FillCorsika(ptr, arrayIdx) : 631 Add(n).FillCorsikaThin(ptr, arrayIdx); 622 632 623 633 switch (rc) -
trunk/Mars/msim/MPhotonEvent.h
r18541 r19338 64 64 Int_t ReadEventIoEvt(MCorsikaFormat *fInFormat); 65 65 Int_t ReadEventIoEvtCompact(MCorsikaFormat *fInFormat); 66 Int_t ReadCorsikaEvt( Float_t * data, Int_t numEvents, Int_tarrayIdx);66 Int_t ReadCorsikaEvt(const vector<Float_t> &data, const uint32_t &blocklength, const Int_t &arrayIdx); 67 67 68 68 // TObject
Note:
See TracChangeset
for help on using the changeset viewer.