---+ 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. <span style="color: orangered;"> Most of the parameters passed to the functions are obsolete and are ignored by the functions :( </span> 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. ---++ Environment variables Input binary files are searched in: <literal>$DATADIR/data<span class='WYSIWYG_HIDDENWHITESPACE' style='{encoded: 'n'};'> </span> $DATADIR/pedestal<span class='WYSIWYG_HIDDENWHITESPACE' style='{encoded: 'n'};'> </span></literal> Input root files for pedestal subtraction are searched in: <literal>$NTUPLEDIR/<span class='WYSIWYG_HIDDENWHITESPACE' style='{encoded: 'n'};'> </span></literal> Output files will be placed in: <literal>$NTUPLEDIR/</literal> ---++ How to change the ADC mapping change the mapping.h file. For newdream channel: set the tower fiber and amp values by modifying or addinga a case to the switch statement and the code will generate the channel name. For Leakage, crystals and ancillary detectors you just need to set the name or the channel number. Once you do this everything should be saved in the correct folder of the monitoring file. If it does not work look at the adc_sync() function in dreammon_adc.c. -- Main.MicheleCascella - 15-Jul-2012
This topic: DREAM
>
WebHome
>
OnlineHistogramMonitoring
Topic revision: r3 - 2018-06-24 - MicheleCascella
Copyright &© 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