Hall-D Software
alpha
|
The JEventSource_EVIO class implements a JEventSource capable of reading in EVIO data from raw data files produced in Hall-D. It can read in entangled (or blocked) events as well as single events. The low-level objects produced reflect the data generated by the front end digitization electronics. More...
#include <JEventSource_EVIO.h>
Classes | |
class | ObjList |
Public Types | |
enum | EVIOSourceType { kNoSource, kFileSource, kETSource } |
enum | EmulationModeType { kEmulationNone, kEmulationAlways, kEmulationAuto } |
Public Member Functions | |
JEventSource_EVIO (const char *source_name) | |
virtual | ~JEventSource_EVIO () |
virtual const char * | className (void) |
jerror_t | GetEvent (jana::JEvent &event) |
void | FreeEvent (jana::JEvent &event) |
jerror_t | GetObjects (jana::JEvent &event, jana::JFactory_base *factory) |
double | GetTime (void) |
void | ReadOptionalModuleTypeTranslation (void) |
uint32_t * | GetPoolBuffer (void) |
virtual jerror_t | ReadEVIOEvent (uint32_t *&buf) |
void | GetEVIOBuffer (jana::JEvent &jevent, uint32_t *&buff, uint32_t &size) const |
EVIOSourceType | GetEVIOSourceType (void) |
void | AddROCIDtoParseList (uint32_t rocid) |
set< uint32_t > | GetROCIDParseList (uint32_t rocid) |
Static Public Member Functions | |
static const char * | static_className (void) |
static uint32_t * | GetEVIOBufferFromRef (void *ref) |
static uint32_t | GetEVIOBufferSizeFromRef (void *ref) |
static double | GetEVIOReadTimeFromRef (void *ref) |
static double | GetDomTreeCreationTimeFromRef (void *ref) |
static double | GetEVIOParseTimeFromRef (void *ref) |
Public Attributes | |
bool | quit_on_next_ET_timeout |
Protected Member Functions | |
void | ConnectToET (const char *source_name) |
void | Cleanup (void) |
void | CopyBOR (JEventLoop *loop, map< string, vector< JObject * > > &hit_objs_by_type) |
void | AddSourceObjectsToCallStack (JEventLoop *loop, string className) |
void | AddEmulatedObjectsToCallStack (JEventLoop *loop, string caller, string callee) |
void | EmulateDf250Firmware (JEvent &event, vector< JObject * > &wrd_objs, vector< JObject * > &pt_objs, vector< JObject * > &pp_objs, vector< JObject * > &pi_objs) |
void | EmulateDf125Firmware (JEvent &event, vector< JObject * > &wrd_objs, vector< JObject * > &cp_objs, vector< JObject * > &fp_objs) |
jerror_t | ParseEvents (ObjList *objs_ptr) |
int32_t | FindRunNumber (uint32_t *iptr) |
int32_t | EpicQuestForRunNumber (void) |
uint64_t | FindEventNumber (uint32_t *iptr) |
void | FindEventType (uint32_t *iptr, JEvent &event) |
MODULE_TYPE | GuessModuleType (const uint32_t *istart, const uint32_t *iend) |
bool | IsF250ADC (const uint32_t *istart, const uint32_t *iend) |
bool | IsF1TDC (const uint32_t *istart, const uint32_t *iend) |
void | DumpModuleMap (void) |
void | DumpBinary (const uint32_t *iptr, const uint32_t *iend=NULL, uint32_t MaxWords=0, const uint32_t *imark=NULL) |
void | MergeObjLists (list< ObjList * > &events1, list< ObjList * > &events2) |
void | ParseModuleConfiguration (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | ParseEventTag (const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | ParseJLabModuleData (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | Parsef250Bank (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | Parsef125Bank (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | ParseF1TDCBank (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
uint32_t | F1TDC_channel (uint32_t chip, uint32_t chan_on_chip, int modtype) |
void | ParseTSBank (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | ParseTIBank (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | ParseCAEN1190 (int32_t rocid, const uint32_t *&iptr, const uint32_t *iend, list< ObjList * > &events) |
void | MakeDf250WindowRawData (ObjList *objs, uint32_t rocid, uint32_t slot, uint32_t itrigger, const uint32_t *&iptr) |
void | MakeDf250PulseRawData (ObjList *objs, uint32_t rocid, uint32_t slot, uint32_t itrigger, const uint32_t *&iptr) |
void | MakeDf125WindowRawData (ObjList *objs, uint32_t rocid, uint32_t slot, uint32_t itrigger, const uint32_t *&iptr) |
void | MakeDf125PulseRawData (ObjList *objs, uint32_t rocid, uint32_t slot, uint32_t itrigger, const uint32_t *&iptr) |
Protected Attributes | |
int32_t | last_run_number |
int32_t | filename_run_number |
uint32_t | Nunparsed |
bool | no_more_events_in_source |
bool | et_connected |
HDEVIO * | hdevio |
EVIOSourceType | source_type |
map< tagNum, MODULE_TYPE > | module_type |
map< MODULE_TYPE, MODULE_TYPE > | modtype_translate |
JStreamLog | evioout |
bool | AUTODETECT_MODULE_TYPES |
bool | DUMP_MODULE_MAP |
bool | PARSE_EVIO_EVENTS |
bool | PARSE_F250 |
bool | PARSE_F125 |
bool | PARSE_F1TDC |
bool | PARSE_CAEN1290TDC |
bool | PARSE_CONFIG |
bool | PARSE_BOR |
bool | PARSE_EPICS |
bool | PARSE_EVENTTAG |
bool | PARSE_TRIGGER |
bool | MAKE_DOM_TREE |
int | ET_STATION_NEVENTS |
bool | ET_STATION_CREATE_BLOCKING |
int | ET_DEBUG_WORDS_TO_DUMP |
bool | LOOP_FOREVER |
int | VERBOSE |
float | TIMEOUT |
string | MODTYPE_MAP_FILENAME |
bool | ENABLE_DISENTANGLING |
bool | EVIO_SPARSE_READ |
string | EVENT_MASK |
EmulationModeType | F125_EMULATION_MODE |
F125 emulation mode. More... | |
EmulationModeType | F250_EMULATION_MODE |
F250 emulation mode. More... | |
uint32_t | F250_EMULATION_MIN_SWING |
Minimum difference between max and min samples to do emulation. More... | |
uint32_t | F250_THRESHOLD |
Threshold to use for firmware emulation. More... | |
uint32_t | F250_SPARSIFICATION_THRESHOLD |
Sparsification thresh. applied to non-ped-subtracted integral during emulation. More... | |
uint32_t | F250_NSA |
Number of samples to integrate after threshold crossing during emulation. More... | |
uint32_t | F250_NSB |
Number of samples to integrate before threshold crossing during emulation. More... | |
uint32_t | F250_NSPED |
Number of samples to integrate for pedestal during emulation. More... | |
uint32_t | F125_EMULATION_MIN_SWING |
Minimum difference between max and min samples to do emulation. More... | |
uint32_t | F125_THRESHOLD |
Threshold to use for firmware emulation. More... | |
uint32_t | F125_SPARSIFICATION_THRESHOLD |
Sparsification thresh. applied to non-ped-subtracted integral during emulation. More... | |
uint32_t | F125_NSA |
Number of samples to integrate after threshold crossing during emulation. More... | |
uint32_t | F125_NSB |
Number of samples to integrate before threshold crossing during emulation. More... | |
uint32_t | F125_NSA_CDC |
Number of samples to integrate after thershold crossing during emulation rocid 24-28 only! More... | |
uint32_t | F125_NSB_CDC |
Number of samples to integrate before thershold crossing during emulation rocid 24-28 only! More... | |
uint32_t | F125_NSPED |
Number of samples to integrate for pedestal during emulation. More... | |
uint32_t | F125_TIME_UPSAMPLE |
Use the CMU upsampling algorithm when emulating f125 pulse times. More... | |
uint32_t | F125_CDC_WS |
FA125 emulation CDC hit window start. More... | |
uint32_t | F125_CDC_WE |
FA125 emulation CDC hit window end. More... | |
uint32_t | F125_CDC_IE |
FA125 emulation CDC number of integrated samples (unless WE is reached) More... | |
uint32_t | F125_CDC_NP |
FA125 emulation CDC initial pedestal samples. More... | |
uint32_t | F125_CDC_NP2 |
FA125 emulation CDC local pedestal samples. More... | |
uint32_t | F125_CDC_PG |
FA125 emulation CDC gap between pedestal and hit threshold crossing. More... | |
uint32_t | F125_CDC_H |
FA125 emulation CDC hit threshold. More... | |
uint32_t | F125_CDC_TH |
FA125 emulation CDC high timing threshold. More... | |
uint32_t | F125_CDC_TL |
FA125 emulation CDC low timing threshold. More... | |
uint32_t | F125_FDC_WS |
FA125 emulation FDC hit window start. More... | |
uint32_t | F125_FDC_WE |
FA125 emulation FDC hit window end. More... | |
uint32_t | F125_FDC_IE |
FA125 emulation FDC number of integrated samples (unless WE is reached) More... | |
uint32_t | F125_FDC_NP |
FA125 emulation FDC initial pedestal samples. More... | |
uint32_t | F125_FDC_NP2 |
FA125 emulation FDC local pedestal samples. More... | |
uint32_t | F125_FDC_PG |
FA125 emulation FDC gap between pedestal and hit threshold crossing. More... | |
uint32_t | F125_FDC_H |
FA125 emulation FDC hit threshold. More... | |
uint32_t | F125_FDC_TH |
FA125 emulation FDC high timing threshold. More... | |
uint32_t | F125_FDC_TL |
FA125 emulation FDC low timing threshold. More... | |
uint32_t | USER_RUN_NUMBER |
Run number supplied by user. More... | |
uint32_t | F125PULSE_NUMBER_FILTER |
Discard DF125PulseXXX objects with pulse number equal or greater than this. More... | |
uint32_t | F250PULSE_NUMBER_FILTER |
Discard DF250PulseXXX objects with pulse number equal or greater than this. More... | |
vector< vector< DDAQAddress * > > | hit_objs |
pthread_mutex_t | stored_events_mutex |
queue< ObjList * > | stored_events |
uint32_t | BUFFER_SIZE |
pthread_mutex_t | evio_buffer_pool_mutex |
deque< uint32_t * > | evio_buffer_pool |
pthread_mutex_t | current_event_count_mutex |
uint32_t | current_event_count |
set< string > | event_source_data_types |
pthread_rwlock_t | BOR_lock |
vector< JObject * > | BORobjs |
The JEventSource_EVIO class implements a JEventSource capable of reading in EVIO data from raw data files produced in Hall-D. It can read in entangled (or blocked) events as well as single events. The low-level objects produced reflect the data generated by the front end digitization electronics.
The type of boards it can understand can be expanded to include additional boards. To do this, files must be edited in a few places:
1.) The new module type must be added to the type_id_t enum. Make sure "N_MODULE_TYPES" is the last item in the enum.
2.) Add a case for the module type to the switch in the GetModule method.
1.) For each type of data produced by the new module, create a class to represent it. It is highly recommended to use a naming scheme that reflects the naming convention used in the manual. This makes it easier for people trying to understand the low-level data objects in terms of the manual for the module. See Df250WindowSum.h or Df250PulseIntegral.h for examples.
1.) Add an appropriate #include near the top of the file for each type of data object created in the previous step.
2.) Add an appropriate declaration for a "ParseXXXBank" where the "XXX" is the new module type. example: void ParseF1TDCBank(evioDOMNodeP bankPtr, list<ObjList*> &events);
3.) If the routine JFactory_base_CopyTo() still exists at the bottom of this file, then add a line for each data type to it.
1.) In the JEventSource_EVIO::JEventSource_EVIO() constructor, add a line to insert the data type into event_source_data_types for each data type the module produces.
2.) In the "ParseEVIOEvent()" method, add a case for the new module type that calls the new "ParseXXXBank()" method. (Note if this is JLab module, then you'll need to add a case to ParseJLabModuleData() ).
3.) Add the new ParseXXXBank() method. Preferrably to the end of the file or more importantly, in the order the method appears in the class definition.
1.) Add an include line to the top of the file for each new data type.
2.) Add a line for each new data type to the GenerateFactories() method of JFactoryGenerator_DAQ.
Definition at line 163 of file JEventSource_EVIO.h.
Enumerator | |
---|---|
kEmulationNone | |
kEmulationAlways | |
kEmulationAuto |
Definition at line 172 of file JEventSource_EVIO.h.
Enumerator | |
---|---|
kNoSource | |
kFileSource | |
kETSource |
Definition at line 166 of file JEventSource_EVIO.h.
JEventSource_EVIO::JEventSource_EVIO | ( | const char * | source_name | ) |
Definition at line 72 of file JEventSource_EVIO.cc.
|
virtual |
Definition at line 81 of file JEventSource_EVIO.cc.
|
protected |
|
inline |
Definition at line 196 of file JEventSource_EVIO.h.
References ROCIDS_TO_PARSE.
Referenced by DTranslationTable::SetSystemsToParse().
|
protected |
|
inlinevirtual |
Definition at line 181 of file JEventSource_EVIO.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
Definition at line 388 of file JEventSource_EVIO.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void JEventSource_EVIO::FreeEvent | ( | jana::JEvent & | event | ) |
Definition at line 83 of file JEventSource_EVIO.cc.
|
inlinestatic |
Definition at line 201 of file JEventSource_EVIO.h.
jerror_t JEventSource_EVIO::GetEvent | ( | jana::JEvent & | event | ) |
Definition at line 82 of file JEventSource_EVIO.cc.
|
inline |
Use the reference stored in the supplied JEvent to extract the evio buffer and size for the event. If there is no buffer for the event then buff will be set to NULL and size to zero. This can happen if reading entangled events and this is not the first event in the block.
Definition at line 463 of file JEventSource_EVIO.h.
References JEventSource_EVIO::ObjList::eviobuff, and JEventSource_EVIO::ObjList::eviobuff_size.
Referenced by DEventWriterEVIO::Write_EVIOEvent().
|
inlinestatic |
Definition at line 198 of file JEventSource_EVIO.h.
Referenced by JEventProcessor_merge_rawevents::evnt(), and JEventProcessor_DAQ_online::ParseEventSize().
|
inlinestatic |
Definition at line 199 of file JEventSource_EVIO.h.
Referenced by JEventProcessor_merge_rawevents::evnt(), and JEventProcessor_DAQ_online::ParseEventSize().
|
inlinestatic |
Definition at line 202 of file JEventSource_EVIO.h.
|
inlinestatic |
Definition at line 200 of file JEventSource_EVIO.h.
|
inline |
Definition at line 195 of file JEventSource_EVIO.h.
jerror_t JEventSource_EVIO::GetObjects | ( | jana::JEvent & | event, |
jana::JFactory_base * | factory | ||
) |
Definition at line 84 of file JEventSource_EVIO.cc.
uint32_t* JEventSource_EVIO::GetPoolBuffer | ( | void | ) |
|
inline |
Definition at line 197 of file JEventSource_EVIO.h.
References ROCIDS_TO_PARSE.
|
inline |
Definition at line 451 of file JEventSource_EVIO.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
Definition at line 85 of file JEventSource_EVIO.cc.
void JEventSource_EVIO::ReadOptionalModuleTypeTranslation | ( | void | ) |
|
inlinestatic |
Definition at line 182 of file JEventSource_EVIO.h.
|
protected |
Definition at line 227 of file JEventSource_EVIO.h.
|
protected |
Definition at line 371 of file JEventSource_EVIO.h.
|
protected |
Definition at line 372 of file JEventSource_EVIO.h.
|
protected |
Definition at line 351 of file JEventSource_EVIO.h.
|
protected |
Definition at line 361 of file JEventSource_EVIO.h.
|
protected |
Definition at line 360 of file JEventSource_EVIO.h.
|
protected |
Definition at line 228 of file JEventSource_EVIO.h.
|
protected |
Definition at line 247 of file JEventSource_EVIO.h.
|
protected |
Definition at line 218 of file JEventSource_EVIO.h.
|
protected |
Definition at line 242 of file JEventSource_EVIO.h.
|
protected |
Definition at line 241 of file JEventSource_EVIO.h.
|
protected |
Definition at line 240 of file JEventSource_EVIO.h.
|
protected |
Definition at line 249 of file JEventSource_EVIO.h.
|
protected |
Definition at line 365 of file JEventSource_EVIO.h.
|
protected |
Definition at line 353 of file JEventSource_EVIO.h.
|
protected |
Definition at line 352 of file JEventSource_EVIO.h.
|
protected |
Definition at line 248 of file JEventSource_EVIO.h.
|
protected |
Definition at line 225 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC hit threshold.
Definition at line 278 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC number of integrated samples (unless WE is reached)
Definition at line 274 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC initial pedestal samples.
Definition at line 275 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC local pedestal samples.
Definition at line 276 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC gap between pedestal and hit threshold crossing.
Definition at line 277 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC high timing threshold.
Definition at line 279 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC low timing threshold.
Definition at line 280 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC hit window end.
Definition at line 273 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation CDC hit window start.
Definition at line 272 of file JEventSource_EVIO.h.
|
protected |
Minimum difference between max and min samples to do emulation.
Definition at line 261 of file JEventSource_EVIO.h.
|
protected |
F125 emulation mode.
Definition at line 251 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC hit threshold.
Definition at line 288 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC number of integrated samples (unless WE is reached)
Definition at line 284 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC initial pedestal samples.
Definition at line 285 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC local pedestal samples.
Definition at line 286 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC gap between pedestal and hit threshold crossing.
Definition at line 287 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC high timing threshold.
Definition at line 289 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC low timing threshold.
Definition at line 290 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC hit window end.
Definition at line 283 of file JEventSource_EVIO.h.
|
protected |
FA125 emulation FDC hit window start.
Definition at line 282 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate after threshold crossing during emulation.
Definition at line 264 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate after thershold crossing during emulation rocid 24-28 only!
Definition at line 266 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate before threshold crossing during emulation.
Definition at line 265 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate before thershold crossing during emulation rocid 24-28 only!
Definition at line 267 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate for pedestal during emulation.
Definition at line 268 of file JEventSource_EVIO.h.
|
protected |
Sparsification thresh. applied to non-ped-subtracted integral during emulation.
Definition at line 263 of file JEventSource_EVIO.h.
|
protected |
Threshold to use for firmware emulation.
Definition at line 262 of file JEventSource_EVIO.h.
|
protected |
Use the CMU upsampling algorithm when emulating f125 pulse times.
Definition at line 269 of file JEventSource_EVIO.h.
|
protected |
Discard DF125PulseXXX objects with pulse number equal or greater than this.
Definition at line 295 of file JEventSource_EVIO.h.
|
protected |
Minimum difference between max and min samples to do emulation.
Definition at line 254 of file JEventSource_EVIO.h.
|
protected |
F250 emulation mode.
Definition at line 252 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate after threshold crossing during emulation.
Definition at line 257 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate before threshold crossing during emulation.
Definition at line 258 of file JEventSource_EVIO.h.
|
protected |
Number of samples to integrate for pedestal during emulation.
Definition at line 259 of file JEventSource_EVIO.h.
|
protected |
Sparsification thresh. applied to non-ped-subtracted integral during emulation.
Definition at line 256 of file JEventSource_EVIO.h.
|
protected |
Threshold to use for firmware emulation.
Definition at line 255 of file JEventSource_EVIO.h.
|
protected |
Discard DF250PulseXXX objects with pulse number equal or greater than this.
Definition at line 296 of file JEventSource_EVIO.h.
|
protected |
Definition at line 214 of file JEventSource_EVIO.h.
|
protected |
Definition at line 220 of file JEventSource_EVIO.h.
|
protected |
Definition at line 315 of file JEventSource_EVIO.h.
|
protected |
Definition at line 213 of file JEventSource_EVIO.h.
|
protected |
Definition at line 243 of file JEventSource_EVIO.h.
|
protected |
Definition at line 239 of file JEventSource_EVIO.h.
|
protected |
Definition at line 246 of file JEventSource_EVIO.h.
|
protected |
Definition at line 223 of file JEventSource_EVIO.h.
|
protected |
Definition at line 222 of file JEventSource_EVIO.h.
|
protected |
Definition at line 217 of file JEventSource_EVIO.h.
|
protected |
Definition at line 216 of file JEventSource_EVIO.h.
|
protected |
Definition at line 235 of file JEventSource_EVIO.h.
|
protected |
Definition at line 233 of file JEventSource_EVIO.h.
|
protected |
Definition at line 234 of file JEventSource_EVIO.h.
|
protected |
Definition at line 236 of file JEventSource_EVIO.h.
|
protected |
Definition at line 237 of file JEventSource_EVIO.h.
|
protected |
Definition at line 229 of file JEventSource_EVIO.h.
|
protected |
Definition at line 231 of file JEventSource_EVIO.h.
|
protected |
Definition at line 232 of file JEventSource_EVIO.h.
|
protected |
Definition at line 230 of file JEventSource_EVIO.h.
|
protected |
Definition at line 238 of file JEventSource_EVIO.h.
bool JEventSource_EVIO::quit_on_next_ET_timeout |
Definition at line 188 of file JEventSource_EVIO.h.
|
protected |
Definition at line 221 of file JEventSource_EVIO.h.
|
protected |
Definition at line 345 of file JEventSource_EVIO.h.
|
protected |
Definition at line 344 of file JEventSource_EVIO.h.
|
protected |
Definition at line 245 of file JEventSource_EVIO.h.
|
protected |
Run number supplied by user.
Definition at line 294 of file JEventSource_EVIO.h.
|
protected |
Definition at line 244 of file JEventSource_EVIO.h.