Hall-D Software
alpha
|
Go to the source code of this file.
Classes | |
struct | coda_crate_map |
struct | coda_exp_info |
struct | coda_event_info |
struct | coda_hit_info |
Macros | |
#define | OK 0 |
#define | ERROR -1 |
#define | MAX_PARAM 10 |
#define | FADC250_MODE_RW 1 /* Raw Window */ |
#define | FADC250_MODE_WI 2 /* Window Integrated */ |
#define | FADC250_MODE_RP 3 /* Raw Pulse */ |
#define | FADC250_MODE_IP 4 /* Integrated Pulse */ |
#define | FADC125_MODE_RW 1 |
#define | FADC125_MODE_WI 2 |
#define | FADC125_MODE_RP 3 |
#define | FADC125_MODE_IP 4 |
#define | CAEN1190_MODE_TM 1 /* Trigger Matching mode */ |
#define | CAEN1290_MODE_TM 1 /* Trigger Matching mode */ |
#define | MAX_EXP 10 |
#define | MAX_CRATES 128 |
#define | MAX_SLOTS 21 |
#define | MIN_SLOT 2 |
#define | MAX_SLOT 21 |
#define | MIN_TRIG_TIME 2048 /* minimum 8 microseconds for trigger time */ |
#define | MAX_EVENT_SIZE 1048576 /* 1 Megabyte Default Event buffer size */ |
#define | MAX_HIT_SIZE 256 /* Max Bytes for 1 Hit - eg RAW window mode for FADC250 */ |
#define | MAX_TOTAL_HITS 50000 /* Define maximum number of hits that can be stored */ |
#define | MAX_HITS_PER_SLOT 500 /* Max hits stored per slot (module) */ |
#define | MAX_HITS_PER_CHAN 50 /* Max hits allowed per channel - most modules will less than this */ |
#define | MC2CINIT_NULL 0 |
#define | MC2CINIT_DEFINED 1 |
#define | MC2CINIT_COMPLETE 2 |
#define | ROC_BANK_OPEN(status, id, nevents) |
#define | ROC_BANK_CLOSE |
#define | DATA_BANK_OPEN(status, detid, nevents) |
#define | DATA_BANK_CLOSE |
Typedefs | |
typedef struct coda_crate_map | CODA_CRATE_MAP |
typedef struct coda_exp_info | CODA_EXP_INFO |
typedef struct coda_event_info | CODA_EVENT_INFO |
typedef struct coda_hit_info | CODA_HIT_INFO |
Enumerations | |
enum | type_id_t { TID, FADC250, FADC125, F1TDC32, F1TDC48, JLAB_TS, TD, SSP, JLAB_DISC, MODULE_TYPE_RES1, MODULE_TYPE_RES2, MODULE_TYPE_RES3, MODULE_TYPE_RES4, MODULE_TYPE_RES5, MODULE_TYPE_RES6, MODULE_TYPE_RES7, UNKNOWN, VMECPU, CAEN1190, CAEN1290, N_MODULE_TYPES } |
Functions | |
void | mc2codaSetRunNumber (unsigned int run_number) |
CODA_EXP_INFO * | mc2codaInitExp (int nCrates, const char *name) |
int | mc2codaSetCrate (CODA_EXP_INFO *expID, int crateid, int nmod, int *modules, int *detid) |
CODA_EVENT_INFO * | mc2codaOpenEvent (CODA_EXP_INFO *expID, uint64_t eventNum, uint64_t trigTime, unsigned short eventType, int maxSize) |
int | mc2codaWrite (CODA_EVENT_INFO *eventID, int nHits, struct coda_hit_info *codaHits) |
void | mc2codaStats (CODA_EVENT_INFO *eventID, int sflag) |
unsigned int | mc2codaCloseEvent (CODA_EVENT_INFO *eventID) |
int | mc2codaResetEvent (CODA_EVENT_INFO *eventID, uint64_t eventNum, uint64_t trigTime, unsigned short eventType) |
int | mc2codaFreeEvent (CODA_EVENT_INFO *eventID) |
void | mc2codaFree (CODA_EXP_INFO *expID) |
#define DATA_BANK_CLOSE |
Definition at line 150 of file mc2coda.h.
Referenced by WriteDAQconfigBank().
#define DATA_BANK_OPEN | ( | status, | |
detid, | |||
nevents | |||
) |
#define ERROR -1 |
Definition at line 7 of file mc2coda.h.
Referenced by mc2codaFreeEvent().
#define FADC125_MODE_IP 4 |
Definition at line 54 of file mc2coda.h.
Referenced by JEventProcessor_rawevent::evnt(), and mc2codaCloseEvent().
#define FADC250_MODE_IP 4 /* Integrated Pulse */ |
Definition at line 49 of file mc2coda.h.
Referenced by JEventProcessor_rawevent::evnt(), and mc2codaCloseEvent().
#define MAX_CRATES 128 |
Definition at line 68 of file mc2coda.h.
Referenced by mc2codaInitExp(), and mc2codaStats().
Definition at line 75 of file mc2coda.h.
Referenced by mc2codaOpenEvent().
#define MAX_HITS_PER_CHAN 50 /* Max hits allowed per channel - most modules will less than this */ |
Definition at line 79 of file mc2coda.h.
Referenced by caen1290_write_data(), f1tdc32_write_data(), f1tdc48_write_data(), fadc125_write_data(), and fadc250_write_data().
#define MAX_HITS_PER_SLOT 500 /* Max hits stored per slot (module) */ |
Definition at line 78 of file mc2coda.h.
Referenced by mc2codaOpenEvent(), and mc2codaWrite().
#define MAX_SLOTS 21 |
Definition at line 69 of file mc2coda.h.
Referenced by mc2codaCloseEvent(), mc2codaFreeEvent(), mc2codaOpenEvent(), mc2codaResetEvent(), mc2codaSetCrate(), mc2codaStats(), and WriteDAQconfigBank().
#define MAX_TOTAL_HITS 50000 /* Define maximum number of hits that can be stored */ |
#define MC2CINIT_COMPLETE 2 |
Definition at line 83 of file mc2coda.h.
Referenced by mc2codaSetCrate().
#define MC2CINIT_DEFINED 1 |
Definition at line 82 of file mc2coda.h.
Referenced by mc2codaInitExp().
#define MC2CINIT_NULL 0 |
Definition at line 81 of file mc2coda.h.
Referenced by mc2codaFree().
#define MIN_TRIG_TIME 2048 /* minimum 8 microseconds for trigger time */ |
#define ROC_BANK_CLOSE |
#define ROC_BANK_OPEN | ( | status, | |
id, | |||
nevents | |||
) |
Definition at line 134 of file mc2coda.h.
Referenced by mc2codaCloseEvent().
typedef struct coda_crate_map CODA_CRATE_MAP |
typedef struct coda_event_info CODA_EVENT_INFO |
typedef struct coda_exp_info CODA_EXP_INFO |
typedef struct coda_hit_info CODA_HIT_INFO |
enum type_id_t |
unsigned int mc2codaCloseEvent | ( | CODA_EVENT_INFO * | eventID | ) |
Definition at line 347 of file mc2coda.c.
References CAEN1290, caen1290_write_data(), coda_exp_info::crate, dabufp, coda_crate_map::det_map, F1TDC32, f1tdc32_write_data(), F1TDC48, f1tdc48_write_data(), FADC125, FADC125_MODE_IP, fadc125_write_data(), FADC250, FADC250_MODE_IP, fadc250_write_data(), MAX_SLOTS, coda_crate_map::module_map, coda_crate_map::moduleMask, coda_exp_info::ncrates, printf(), ROC_BANK_CLOSE, ROC_BANK_OPEN, coda_exp_info::rocid, and WriteDAQconfigBank().
Referenced by JEventProcessor_rawevent::evnt().
void mc2codaFree | ( | CODA_EXP_INFO * | expID | ) |
Definition at line 639 of file mc2coda.c.
References coda_exp_info::crate, coda_exp_info::expname, coda_exp_info::inited, MC2CINIT_NULL, coda_exp_info::ncrates, coda_exp_info::openevents, and printf().
Referenced by JEventProcessor_rawevent::~JEventProcessor_rawevent().
int mc2codaFreeEvent | ( | CODA_EVENT_INFO * | eventID | ) |
Definition at line 577 of file mc2coda.c.
References ERROR, coda_event_info::evbuf, coda_event_info::expid, coda_event_info::hcount, coda_hit_info::hdata, coda_event_info::hits, MAX_SLOTS, coda_exp_info::ncrates, coda_exp_info::openevents, and printf().
CODA_EXP_INFO* mc2codaInitExp | ( | int | nCrates, |
const char * | name | ||
) |
Definition at line 45 of file mc2coda.c.
References coda_exp_info::crate, coda_crate_map::crate_id, coda_exp_info::expname, coda_exp_info::inited, MAX_CRATES, MC2CINIT_DEFINED, mc2coda_inited, mc2coda_ncrates_defined, coda_exp_info::ncrates, coda_exp_info::openevents, printf(), coda_exp_info::rocid, and start_time.
Referenced by JEventProcessor_rawevent::init().
CODA_EVENT_INFO* mc2codaOpenEvent | ( | CODA_EXP_INFO * | expID, |
uint64_t | eventNum, | ||
uint64_t | trigTime, | ||
unsigned short | eventType, | ||
int | maxSize | ||
) |
Definition at line 155 of file mc2coda.c.
References coda_exp_info::crate, coda_event_info::evbuf, coda_event_info::eventid, coda_event_info::evtype, coda_event_info::expid, coda_event_info::hcount, coda_event_info::hits, MAX_EVENT_SIZE, MAX_HITS_PER_SLOT, MAX_SLOTS, coda_event_info::maxBytes, mc2coda_maxevsize, coda_crate_map::moduleMask, coda_exp_info::ncrates, coda_event_info::nhits, coda_exp_info::openevents, printf(), RUN_NUMBER, start_time, and coda_event_info::trigtime.
Referenced by JEventProcessor_rawevent::evnt().
int mc2codaResetEvent | ( | CODA_EVENT_INFO * | eventID, |
uint64_t | eventNum, | ||
uint64_t | trigTime, | ||
unsigned short | eventType | ||
) |
Definition at line 483 of file mc2coda.c.
References coda_event_info::evbuf, coda_event_info::eventid, coda_event_info::evtype, coda_event_info::expid, coda_event_info::hcount, coda_hit_info::hdata, coda_event_info::hits, MAX_SLOTS, coda_event_info::maxBytes, coda_exp_info::ncrates, coda_event_info::nhits, coda_exp_info::openevents, printf(), RUN_NUMBER, start_time, and coda_event_info::trigtime.
Referenced by JEventProcessor_rawevent::evnt().
int mc2codaSetCrate | ( | CODA_EXP_INFO * | expID, |
int | crateid, | ||
int | nmod, | ||
int * | modules, | ||
int * | detid | ||
) |
Definition at line 102 of file mc2coda.c.
References coda_exp_info::crate, MAX_SLOTS, MC2CINIT_COMPLETE, mc2coda_inited, mc2coda_ncrates_defined, coda_exp_info::ncrates, and printf().
Referenced by JEventProcessor_rawevent::init().
void mc2codaSetRunNumber | ( | unsigned int | run_number | ) |
Definition at line 34 of file mc2coda.c.
References RUN_NUMBER.
Referenced by JEventProcessor_rawevent::brun().
void mc2codaStats | ( | CODA_EVENT_INFO * | eventID, |
int | sflag | ||
) |
Definition at line 669 of file mc2coda.c.
References coda_exp_info::crate, coda_event_info::expid, coda_exp_info::expname, coda_event_info::hcount, MAX_CRATES, MAX_SLOTS, coda_crate_map::module_map, coda_exp_info::ncrates, coda_event_info::nhits, coda_exp_info::openevents, and printf().
int mc2codaWrite | ( | CODA_EVENT_INFO * | eventID, |
int | nHits, | ||
struct coda_hit_info * | codaHits | ||
) |
Definition at line 273 of file mc2coda.c.
References coda_hit_info::crate_id, coda_hit_info::hdata, coda_hit_info::hit_id, coda_event_info::hits, MAX_HITS_PER_SLOT, coda_hit_info::nwords, coda_exp_info::openevents, printf(), and coda_hit_info::slot_id.
Referenced by JEventProcessor_rawevent::evnt().