=== SPMDaq.C === function SPMDaq("directory/run_B078_175_2_2100") translates the .bin file into .root (same name) Code to operate the MAROC-based electronics and to write out data. Format: root tree with array of ADC readings and other 'ambiental' information (e.g. pedestals, timestamp and other available quantities) === BinDisplay.Cpp === to load the library: .L BinDisplayN.Cpp++ useful functions: * read_data("directory/run_B075_175_2_2100.bin") to read data of a given run * histo(int maroc, int ch, int min, int max) to draw values read on maroc # 'maroc' (from 33-37), channel 'ch', with an axis from min to max * histo_all (int maroc, int logy,int min, int max) loop histo over all channels of a maroc * fit_all (int maroc,int min, int max) histogram all channels in a maroc, fit them and fill mean values and sigma in an histogram (h7 and h8 respectively). If maroc=-1, loop over all marocs * dumpPed(char * pedname) write in a file .txt the values of the pedestal for all channels and their sigma * pedSubtract(char *pedName, TH1D *MeanValues=0) subtracts the pedestals in file .txt from the histogram "MeanValues". If no histogram is passed, the latest output of fit_all is taken. * DrawEvent(int iEvt, int maroc=-1, char *pedname=0) Draws the spectrum, as a function of fiber number, of the iEvt event, showing maroc# 'maroc' and subtracting pedestals from pedname. If maroc=-1 all marocs are show and if no ped file is passed, the unsubtracted distribution is shown * Draw2D(int iMaroc, TH1* input=0,TString opt="colz") draws the 2D map of maroc 'iMaroc' [sequential, from 0-4], starting from the histogram input and displaying it with option 'opt' If no histogram is passed, the latest output of pedSubtract is searched for. * Analysis(char *pedName, int nmaroc=33, int iEvt=-1) if nmaroc>0, fit_all and pedsubtract are performed, otherwise DrawEvent