Skip to content
Snippets Groups Projects
Commit 8dc7a73d authored by Lorenzo Moneta's avatar Lorenzo Moneta
Browse files

fix some mathcore tutorials when run in compiled mode. Use nanosecons for testrandom

git-svn-id: http://root.cern.ch/svn/root/trunk@15687 27541ba8-7e3a-0410-8455-c3a389f83636
parent c4d21f78
No related branches found
No related tags found
No related merge requests found
......@@ -25,21 +25,12 @@
#include <iostream>
// CINT does not understand some files included by LorentzVector
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"
#include <vector>
using namespace ROOT::Math;
#ifdef __MAKECINT__
// for generating dictionary of std::vector<XTZTVector>
// (does not work on solaris for conflict between template class T from std::vector and T()
#pragma extra_include "vector";
// conflict on solaris between template class T from std::vector and T().
#pragma link C++ typedef ROOT::Math::XYZTVector;
#pragma link C++ class vector<ROOT::Math::LorentzVector<ROOT::Math::XYZTVector> >+;
#endif
......@@ -58,9 +49,7 @@ double write(int n) {
std::vector<ROOT::Math::XYZTVector> tracks;
std::vector<ROOT::Math::XYZTVector> * pTracks = &tracks;
// t1.Branch("tracks","std::vector<ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > >",&pTracks);
t1.Branch("tracks","std::vector<ROOT::Math::XYZTVector>",&pTracks);
t1.Branch("tracks",&pTracks);
t1.Branch("tracks","std::vector<ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > >",&pTracks);
double M = 0.13957; // set pi+ mass
......
......@@ -18,15 +18,12 @@
#include <iostream>
// CINT does not understand some files included by LorentzVector
#ifndef __CINT__
#include "TLorentzVector.h"
#include "Math/Vector4D.h"
using namespace ROOT::Math;
#endif
......
......@@ -51,7 +51,7 @@ void testAll() {
TRandom *r3 = new TRandom3();
TStopwatch sw;
printf("Distribution microseconds/call\n");
printf("Distribution nanoseconds/call\n");
printf(" TRandom TRandom1 TRandom2 TRandom3\n");
sw.Start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment