//------------------------------------------------------------------------------ // MAIN SCRIPT FUNCTIONS //------------------------------------------------------------------------------ // MCB external input settings bool _mcbExtSpillEn = true; bool _mcbExtSpillInv = false; // slots allocation const byte _BOARD_ID_MCB = 0; //----------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------- // --- fill there the config file names. If only one for all boards, just put 1, else put the exact number of boards string[] _cfgfilenameMCB = {"G:/TEMP/AIDA/HW_TEST/CFG/PDdiscri-A0-CH0-extclk"}; void ScriptMain() { Console.WriteLine("Script begins..."); // parameters bool l_enableReadoutOnSpillGate = true; bool l_enableGtrigOnlyOnSpill = true; bool l_syncResetEn = true; // enable Spill & GTRIG time/tag counters reset bool l_enableGtrig = true; // DAQ will see the GTRIG beacons, set it to false if you want only amplitude for histograms //------------------------------------------------------------------------------ Console.WriteLine("---------------------------------------------------"); Console.WriteLine("This will launch the MCB configuration only on " + _BOARD_ID_MCB + " board ID"); Console.WriteLine("---------------------------------------------------"); Console.WriteLine(); //----------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------ Console.WriteLine("----------------------------------"); Console.WriteLine("Configure MCB FEB & TDM..."); // single MCR config file is mandatory for the master clock since only one slot to be prepared App.TDMPrepareDaq(_BOARD_ID_MCB, _BOARD_ID_MCB, _cfgfilenameMCB, _BOARD_ID_MCB, l_enableGtrig, l_enableGtrigOnlyOnSpill, l_enableReadoutOnSpillGate, l_syncResetEn, x_beforeConfigure:beforeConfigure); // We're done! Console.WriteLine("Script ended"); } // function called between BoardLib.OpenConfigFile() and BoardLib.BoardConfigure() in App.TDMPrepareDaq() void beforeConfigure(byte x_boardId) { Console.WriteLine("MCB Additionnal configure called with BoardId = " + x_boardId); BoardLib.SetVariable("FPGA.GlobalControl.MCBExtSpillGateEn", _mcbExtSpillEn); BoardLib.SetVariable("FPGA.GlobalControl.MCBExtSpillGateInv", _mcbExtSpillInv); Console.WriteLine("Config File = " + _cfgfilenameMCB[0]); }