test.C 452 B

123456789101112131415161718192021222324
  1. #include <iostream>
  2. #include <TROOT.h>
  3. #include <TString.h>
  4. #include <TH1F.h>
  5. int main()
  6. {
  7. // Test TString
  8. TString str = "ok.";
  9. std::cout << "Testing TString: " << str << std::endl;
  10. // Test TH1F
  11. std::cout << "Testing TH1F: ";
  12. TH1F *hist = new TH1F("hist","Test histogram",200,-5.,5.);
  13. if (hist) std::cout << " ok." << std::endl;
  14. else std::cout << " failed." << std::endl;
  15. std::cout << "Done." << std::endl;
  16. return 0;
  17. }