/********************************************************************************** * Structures for the inmem building routines: * * The hit data structure: contains information about the simulated event. * The inmem control structure: controls the building of the inmem. * * The hit data array is recycled per module (link) as otherwise it is enormous. * The format contains the relative clock position: 0= no hit, 4= prev, 2= current, * 1= next BC); the output link is encoded by the MSB. The feData array contains * the total # of hits in each chip, the feProc array indicates that a chip with * no hits has already been processed (for the hit finding routine), the feLink * array indicates which link (if any) a chip contributes to, the linkData array * contains the number of hits on each of the 2 links (normally fe 0-5 => link 0 * and 8-13 => link 1). The hitSize array contains the total size of the hit data * in each link. * */ typedef struct { uint16 hitData[NCHIPS][NCHAN], feData[NCHIPS], feProc[NCHIPS], feLink[NCHIPS], linkData[2], hitSize[2]; } SimInmemData; typedef struct { uint32 evtModules[2]; uint32 evtBitOffset; uint32 atlasId; uint32 timId; //used internally: uint8 l1id, bcid, unused[2]; } InmemEventData; //All scanned fields 1 word length to make life easy for sscanf typedef struct { InmemEventData evtData[N_INMEM_EVTS]; uint32 depthLimit, nEvents, currentStage, stageCnt; uint32 nmask, makeTemplate, createNullLinks, cal; uint32 scanType; uint32 gaussian[3]; uint32 links, incId, bx, rSeed; uint32 l1idInit, bcidInit, makeStub, wrapL1id; //Fields used internally only: int cstart, cstop, cinc; SimInmemData *sid; uint8 evt, nullLink, isTemplate, unused; uint8 fmtLink[2], hwLink[2]; uint8 bidx, dataInitialized, unused1[2]; uint8 *ibuff[2], *timBuff, *templateBuff; uint32 templateStart, nTemplateBits, unused2; uint8 templateMod, templateLink[2], mod; uint32 evtStart, room, currLinkSize[2]; uint32 lastEvtEnd[NMODULES], nEvtBits[NMODULES]; } SimInmemCtrl;