//public void AddGatedBlock(string path, GatedDemodulationConfig gateConfig) //{ // Block b = LoadBlockFromFile(path); // AddGatedBlock(b, gateConfig); //} //public void AddGatedBlock(string path, string gateConfigName) //{ // Block b = LoadBlockFromFile(path); // AddGatedBlock(b, gateConfigName); //} // Use this to add blocks to SirCachealot's analysis queue. //public void AddBlockToQueue(string path, string[] demodulationConfigs) //{ // blockAddParams bap = new blockAddParams(); // bap.path = path; // bap.demodulationConfigs = demodulationConfigs; // threadManager.AddToQueue(AddBlockThreadWrapper, bap); //} //public void GateTOFDemodulatedBlock(DemodulatedBlock dblock, GatedDemodulationConfig gateConfig) //{ // TOFDemodulatedBlock tdblock = dblock as TOFDemodulatedBlock; // if (tdblock == null) // { // errorLog("Error: Object is not a TOF demodulated block."); // return; // } // GatedDemodulatedBlock gdblock = new GatedDemodulatedBlock(dblock.TimeStamp, dblock.Config, dblock.PointDetectors, gateConfig); // GatedBlockDemodulator gatedDemodulator = new GatedBlockDemodulator(); // gdblock = gatedDemodulator.GateTOFDemodulatedBlock(tdblock, gateConfig); // blockStore.AddDBlock(gdblock); // log("Gated TOF demodulated block " + dblock.Config.Settings["cluster"] + " - " + dblock.Config.Settings["clusterIndex"] + // " with gate: " + gateConfig.Name // ); //} public void AddBlockToQueue(string path) { blockAddParams bap = new blockAddParams(); bap.path = path; threadManager.AddToQueue(AddBlockThreadWrapper, bap); }
// Use this to add blocks to SirCachealot's analysis queue. public void AddBlockToQueue(string path, string[] demodulationConfigs) { blockAddParams bap = new blockAddParams(); bap.path = path; bap.demodulationConfigs = demodulationConfigs; threadManager.AddToQueue(AddBlockThreadWrapper, bap); }
//public void AddGatedBlockToQueue(string path, string config) //{ // gatedBlockAddParams bap = new gatedBlockAddParams(); // bap.path = path; // bap.gateConfig = config; // threadManager.AddToQueue(AddGatedBlockThreadWrapper, bap); //} // Use this to add blocks to SirCachealot's analysis queue. //public void AddBlocksToQueue(string[] paths, string[] demodulationConfigs) //{ // foreach (string path in paths) // { // blockAddParams bap = new blockAddParams(); // bap.path = path; // bap.demodulationConfigs = demodulationConfigs; // threadManager.AddToQueue(AddBlockThreadWrapper, bap); // } //} public void AddBlocksToQueue(string[] paths) { foreach (string path in paths) { blockAddParams bap = new blockAddParams(); bap.path = path; threadManager.AddToQueue(AddBlockThreadWrapper, bap); } }
// this method and the following struct are wrappers so that we can add a block // with a single parameter, as required by the threadpool. private void AddBlockThreadWrapper(object parametersIn) { threadManager.QueueItemWrapper(delegate(object parms) { blockAddParams parameters = (blockAddParams)parms; AddBlock(parameters.path, parameters.demodulationConfigs); }, parametersIn ); }
// Use this to add blocks to SirCachealot's analysis queue. public void AddBlockToQueue(string path, string[] demodulationConfigs) { blockAddParams bap = new blockAddParams(); bap.path = path; bap.demodulationConfigs = demodulationConfigs; threadManager.AddToQueue(AddBlockThreadWrapper, bap); }