Online Histogram Monitoring Documentation

General information

There are two programs to create online histograms, the first one: sampler is called by the DAQ to create the plots online. The second one doOfflineHistoDrs4 can be called from the command line to recreate the histograms, or to create them for the pedestal events.

Both programs should be executed on pcdreamdaq2 for this reason there is a script in called doOfflineHisto that will ssh to pcdreamdaq2 set the correct enviroenment variables and call the program from there.

The source file for sampler is sampler.c; the source file for doOfflineHistoDrs4 is doOfflineHisto.c; both programs rely on dreammon.c. dreammon.c has 3 functions:

int dreammon_init(char * * argv, unsigned int run_nr, bool drs, int drs_setup, bool phys_h);

int dreammon_event(unsigned int doSingle, unsigned int events, unsigned int * buf, bool drs, int drs_setup);

int dreammon_sync(unsigned int i, bool drs, int drs_setup);

int dreammon_exit(unsigned int i, bool drs, int drs_setup);

The dreammon_init() initializes the monitoring histogram, dreammon_event() is called for every event and fills the histos, dreammon_sync() saves the histo to a file and is called about every 1000 events. dreammon_exit() is called in the end to free some memory.

Most of the parameters passed to the functions are obsolete and are ignored by the functions frown

In some cases the code to create the histograms for a specific class of devices has been moved to its own separate file. For instance dreammon_adc.h contains everything about the ADCs and dreammon.c calls the adc_init() adc_event() and adc_sync() functions. dreammon_adc.h should be splitted in dreammon_adc.c and dreammon_adc.h but I haven't had the time yet.

Someone, maybe you, should also take the time to move the TDC, OSC and DRS specific parts of dreammon.c and move them to their separate files.

How to change the ADC mapping

change the mapping.h file. Everything else should work automaticcaly.

-- MicheleCascella - 15-Jul-2012

This topic: DREAM > WebHome > OnlineHistogramMonitoring
Topic revision: r1 - 2012-07-15 - MicheleCascella
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback