Ejemplo n.º 1
0
        //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);
        }
Ejemplo n.º 2
0
        // 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);
        }
Ejemplo n.º 3
0
        //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);
            }
        }
Ejemplo n.º 4
0
 // 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
                                    );
 }
Ejemplo n.º 5
0
 // 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);
 }