static void Main(string[] args)
        {
            var h = new NTH1F("h1", "Hist", 100, 0.0, 10.0)
                .XaxisTitle("p_T [GeV]")
                .YaxisTitle("N/1 GeV");

            h.Fill(1.0);
        }
Example #2
0
 static void Main(string[] args)
 {
     var t = new NTStopwatch();
     t.Start();
     var h = new NTH1F("hi", "there", 10, 0.0, 100.0);
     for (int i = 0; i < 100000000; i++)
     {
         h.Fill(10);
     }
     t.Stop();
     h.Print();
     t.Print();
 }
Example #3
0
        static void Main(string[] args)
        {
            var t = new NTStopwatch();

            t.Start();
            var h = new NTH1F("hi", "there", 10, 0.0, 100.0);

            for (int i = 0; i < 100000000; i++)
            {
                h.Fill(10);
            }
            t.Stop();
            h.Print();
            t.Print();
        }
        /// <summary>
        /// Simple test to use the MSBuild guys in a special targets file.
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            var vs = Environment.GetEnvironmentVariables();

            foreach (var v in vs.Keys.Cast <string>().OrderBy(s => s))
            {
                Console.WriteLine(v);
            }

            var f = NTFile.Open("junk.root", "RECREATE");
            var h = new NTH1F("hi", "there", 10, 0.0, 1.0);

            h.Fill(0.5);
            f.Write();
            f.Close();
        }
Example #5
0
        static void Main(string[] args)
        {
            var t = new NTStopwatch();
            var h = new NTH1F("hi", "there", 10, 0.0, 100.0);
            h.Fill(4);
            var a = h.GetXaxis();

            string newname = "fork";
            t.Start();
            for (int i = 0; i < 30000; i++)
            {
                a.SetBinLabel(3, newname);
            }
            t.Stop();
            t.Print();
        }
Example #6
0
        static void Main(string[] args)
        {
            var t = new NTStopwatch();
            var h = new NTH1F("hi", "there", 10, 0.0, 100.0);

            h.Fill(4);
            var a = h.GetXaxis();

            string newname = "fork";

            t.Start();
            for (int i = 0; i < 30000; i++)
            {
                a.SetBinLabel(3, newname);
            }
            t.Stop();
            t.Print();
        }