FACT++  1.0
bool EVT_CTRL2::initMemory ( )
inline

Definition at line 181 of file EventBuilder.h.

References evNum, Memory::malloc(), NBOARDS, NPIX, and NTMARK.

182  {
183  // We have a valid entry, but no memory has yet been allocated
184  if (FADhead)
185  return true;
186 
187  FADhead = (PEVNT_HEADER*)Memory::malloc();
188  if (!FADhead)
189  return false;
190 
191  fEvent = reinterpret_cast<EVENT*>(FADhead+NBOARDS);
192 
193  memset(FADhead, 0, (NPIX+NTMARK)*2*nRoi+NBOARDS*sizeof(PEVNT_HEADER)+sizeof(EVENT));
194 
195  //flag all pixels as unused, flag all TMark as unused
196  std::fill(fEvent->StartPix, fEvent->StartPix+NPIX, -1);
197  std::fill(fEvent->StartTM, fEvent->StartTM +NTMARK, -1);
198 
199  fEvent->Roi = nRoi;
200  fEvent->RoiTM = nRoiTM;
201  fEvent->EventNum = evNum;
202  fEvent->TriggerNum = trgNum;
203  fEvent->TriggerType = trgTyp;
204 
205  return true;
206  }
PEVNT_HEADER * FADhead
Definition: EventBuilder.h:131
uint32_t evNum
Definition: EventBuilder.h:116
EVENT * fEvent
Definition: EventBuilder.h:132
void * malloc()
Definition: EventBuilder.cc:99
uint16_t nRoi
Definition: EventBuilder.h:126
uint16_t nRoiTM
Definition: EventBuilder.h:127
uint32_t trgTyp
Definition: EventBuilder.h:119
#define NPIX
Definition: BasicGlCamera.h:5
#define NTMARK
Definition: BasicGlCamera.h:6
#define NBOARDS
Definition: BasicGlCamera.h:4
uint32_t trgNum
Definition: EventBuilder.h:118

+ Here is the call graph for this function: