Utils.cc File Reference

#include <sys/stat.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include "BField/BField.h"
#include "TestConstants.h"

Go to the source code of this file.

Functions

int GetNumPointsRect (const char *fileName)
int GetNumPointsVor (const char *fileName)
BFieldNewBFieldRect (const char *mapFileName)
BFieldNewBFieldVor (const char *vorMapFileName, const char *meshFileName, const char *vorBFieldFileName)

Variables

const int kFakeMapNum = 142
const Int_t kVorCoarseness = 0

Function Documentation

int GetNumPointsRect ( const char *  fileName  ) 

Definition at line 20 of file Utils.cc.

Referenced by BenchmarkPerformance().

00021 {
00022   //Provide an estimate of the space used by the rect2d interpolator.
00023 
00024   //Currently not implemented. But see my documentation for estimates
00025   //of this.
00026   return 0;
00027 }

int GetNumPointsVor ( const char *  fileName  ) 

Definition at line 29 of file Utils.cc.

Referenced by BenchmarkPerformance().

00030 {
00031   //Provide an estimate of the size used by the Voronoi interpolator.
00032 
00033   //Currently not implemented. But see my documentation for estimates
00034   //of this.
00035   return 0;
00036 }

BField* NewBFieldRect ( const char *  mapFileName  ) 

Definition at line 44 of file Utils.cc.

References BfldInterpMethod::kDefault, kFakeMapNum, Detector::kNear, SimFlag::kReroot, and BField::SetInterpMethod().

Referenced by BenchmarkAccuracy(), and RectPerformanceTest().

00044                                                {
00045   BField *theField;
00046 
00047   //***Finish this function!
00048   //At the moment, just uses the standard $BMAPPATH/bfld_142.dat,
00049   //which should be all right. The only way to get rect2d
00050   //to use an arbitrary file is to rewrite the class a bit.
00051 
00052   VldContext theContext(Detector::kNear,SimFlag::kReroot,VldTimeStamp());
00053   theField = new BField(theContext,-1,kFakeMapNum);
00054   theField->SetInterpMethod(BfldInterpMethod::kDefault);
00055 
00056   return theField;
00057 }

BField* NewBFieldVor ( const char *  vorMapFileName,
const char *  meshFileName,
const char *  vorBFieldFileName 
)

Definition at line 65 of file Utils.cc.

References BfldInterpMethod::kDefault, Detector::kNear, SimFlag::kReroot, kVorCoarseness, and BField::SetInterpMethod().

Referenced by BenchmarkAccuracy(), and VorPerformanceTest().

00066                                                     {
00067   //***How do I convince the BField wrapper to use arbitrary data files?
00068   //Again, it would seem that a rewrite of BField is in order.
00069   //In any case, eventually BField will have to get its data from the
00070   //database...
00071   //***Finish this function!
00072 
00073   VldContext theContext(Detector::kNear,SimFlag::kReroot,VldTimeStamp());
00074 
00075   BField *theField = new BField(theContext,kVorCoarseness,true);
00076   theField->SetInterpMethod(BfldInterpMethod::kDefault);
00077 
00078   return theField;
00079 }


Variable Documentation

const int kFakeMapNum = 142

Definition at line 10 of file Utils.cc.

Referenced by NewBFieldRect().

const Int_t kVorCoarseness = 0

Definition at line 11 of file Utils.cc.


Generated on 8 Jul 2019 for loon by  doxygen 1.6.1