GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / dev > defc / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

EFS.h File Reference

Defines the interface for summarizing the event-by-event results of a filtering process into a statistics table. This is a generic facility, with very little specific filter information. More...

#include <LSF/LSF_cpu.h>
#include <LSF/LSF_origin.h>

Functions

unsigned char * EFS_construct (EFS *efs, const EFC_DB_SchemaAnalysis *schema, int result_size, unsigned int apid_offset, unsigned int dgmid_offset, LSF_CPU_K cpu, LSF_ORIGIN_K origin, unsigned int schema_key, LSD_sdiWriteCbp *writeCbp)
 Constructs an Event Filter Statistics handle.
void EFS_post (EFS *efs, int reason, const void *beg, const void *end, const EFA_span *span)
 Formats the datagram and eventually writes the datagram to the output device.
int EFS_sizeof (int max_records)
 Computes the size, in bytes, of the EFS control structure.
int EFS_start (EFS *efs, int reason, int run_id, int startTime, int mode)
 Captures the start run information.


Detailed Description

Defines the interface for summarizing the event-by-event results of a filtering process into a statistics table. This is a generic facility, with very little specific filter information.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: EFS.h,v 1.2 2011/03/27 04:55:29 russell Exp $

Function Documentation

unsigned char * EFS_construct ( EFS efs,
const EFC_DB_SchemaAnalysis *  schema,
int  result_size,
unsigned int  apid_offset,
unsigned int  dgmid_offset,
LSF_CPU_K  cpu,
LSF_ORIGIN_K  origin,
unsigned int  schema_key,
LSD_sdiWriteCbp *  write 
)

Constructs an Event Filter Statistics handle.

Returns:
The next available memory location
Parameters:
efs The control handle to be initialized
schema The analysis schema
result_size The size, in 32-bit words, of a result vector This application only uses the first 32-bits assuming them to be a 32-bit Event Filter status mask.
apid_offset The offset to the base value of the APID. This must be a value between 0 - 4. In general it is represented by on of the values LSF_CPU_K_EPU_0,1,2 or LSF_CPU_SIU_0,1
dgmid_offset The offset of the datagram id. The value LSF_ID_K_EFS will be added to this value.
cpu One of the enumeration LSE_CPU_K specifying the CPU that is writing the datagram
origin One of the enumeration LSE_ORIGIN_K specifying the origin of the data
schema_key The, usually FMX, key of the configuration file currently being used to produce the result vectors. This allows the consumer of the EFS datagrams to understand the conditions that the data was taken
write Callback routine and parameter to commit the formatted datagram to the output device

References compose_ctx_template(), _EFS::ctbHdrId, _EFS::ctxCtb, _EFS::cur_idx, _EFS::dgm_size, _EFS::dgmHdrId, EFS_ID_K_STATS, get_datagram_pool_size(), get_datagram_size(), _EFS::nrecs, _EFS::recLimit, sbsKeyGet(), _EFS::sdi, and _EFS::stride.

Referenced by EFC_stdConstruct().

void EFS_post ( EFS efs,
int  reason,
const void *  beg,
const void *  end,
const EFA_span span 
)

Formats the datagram and eventually writes the datagram to the output device.

Parameters:
efs The Event Filter Statistics handle
reason The reason EFS_post is being called. These are enumerated in EFA_FLUSH_REASON but, briefly are the set of the LSF_REASONs augmented to a record update reason and a record process reason.
beg The first result vector to analyze
end The last (actually one past the last) result vector to analyze
span Structure defining the span of events, both in time and event sequence numbers, that are being analyzed.

References accumulate(), _EFS_ctxCtb::bdy, _EFS_ctxBridge::bf, _EFS_ctxKeys::cfg, _EFA_span::cfg_id, _EFS_ctxBdy::cfg_id, _EFA_span::cfg_key, clear(), _EFS_ctxBridge_bf::close, _EFS_stats::cnts, _EFS::ctbHdrId, _EFS_datagram::ctx, _EFS::ctxCtb, _EFS::cur_idx, _EFS::dgm, _EFS::dgm_size, _EFS::dgmHdrId, _EFS_ctxBdy::did, _EfsPrvHdr::diff, EFA__hdrSeqGet(), _EfsPrvHdr::efaHdr, EFC__timestampGet(), _EFC_time::f, format_begin_record(), format_diff_record(), format_global_record(), format_record(), _EFS::gbl_span, _EFS_ctxCtb::hdr, _EFS_datagram::hdr, _EFA_span::hdrs, _EFS_ctxBdy::key, _EFS::last, _EFA_span::mode, _EFS::nrecs, OpenReasons, _EFS::pds, _EFS::prvHdr, _EFS::rec, _EFS::rec_span, _EFS::recLimit, _EFS::sdi, _EFA_hdr::seq, _EFS::stats, _EFS_datagram::stb, _EFS::stride, and _EFC_time::ull.

Referenced by EFC_stdConstruct().

int EFS_sizeof ( int  max_records  ) 

Computes the size, in bytes, of the EFS control structure.

Returns:
The size, in bytes,
Parameters:
max_records The maximum number of records in a datagram

References get_datagram_pool_size().

Referenced by EFC_stdConstruct(), and EFC_stdSizeof().

int EFS_start ( EFS efs,
int  reason,
int  run_id,
int  startTime,
int  mode 
)

Captures the start run information.

Returns:
0 is successful, non-zero otherwise
Parameters:
efs The Event Filter Statistics handle
reason The LSF_REASON_OPEN to indicate why the stream is being started
run_id Suggested use is to identify the block of events between when EDS_fwHandlerStart is called and EDS_fwHandlerFlush is called with a stop reason
startTime The run start time rounded to the nearest second
mode This must be the running mode.

References _EFS_ctxCtb::bdy, _EFS_ctxBridge::bf, _EFS_ctxBridge_bf::close, _EFS::ctxCtb, _EFS::cur_idx, _EFS_ctxBdy::did, _EFS_ctxCtb::hdr, _EFS::nrecs, _EFS_ctxBridge_bf::open, and _EFS_ctxBridge::ub.

Referenced by EFC_stdConstruct().


Generated on Wed Jan 16 13:33:50 2013 by  doxygen 1.5.8