#include <BFLHandler.h>
Public Member Functions | |
| BFLHandler (Int_t detector) | |
| BFLHandler (Char_t VoronoiFile[], Char_t MeshFile[], Char_t BFieldFile[]) | |
| ~BFLHandler () | |
| TVector3 | GetBField (const TVector3 &GlobalPosVector, const Bool_t updateSeedPolygon=kFALSE) |
| virtual BFLCache * | GetCache (void) |
| virtual void | SetCache (BFLCache *cache) |
| virtual void | SetVoronoi (BFLWingedEdge *vor) |
| virtual void | SetBField (TObjArray *bfield) |
| virtual void | SetInterpolant (BfldInterpMethod::InterpMethod_t interp) |
| virtual void | SetLastPolygAsSeed (void) |
Private Member Functions | |
| Int_t | LoadBField (Char_t GeomFile[]) |
Private Attributes | |
| BFLInterpolation * | fInt |
| BFLWingedEdge * | fVor |
| TObjArray * | fBField |
|
|
Definition at line 22 of file BFLHandler.cxx. 00023 {
00024 Char_t VoronoiFile[] = "NearDetVorD.default";
00025 Char_t MeshFile[] = "NearDetMesh.default";
00026 Char_t BFieldFile[] = "NearDetBFld.default";
00027
00028 switch(DetectorToLoadDefaults) {
00029 case (1):
00030 strcpy(VoronoiFile,"FarDetVorD.default");
00031 strcpy(MeshFile, "FarDetMesh.default");
00032 strcpy(BFieldFile, "FarDetBFld.default");
00033 break;
00034 case (0):
00035 strcpy(VoronoiFile,"NearDetVorD.default");
00036 strcpy(MeshFile, "NearDetMesh.default");
00037 strcpy(BFieldFile, "NearDetBFld.default");
00038 break;
00039 default:
00040 strcpy(VoronoiFile,"NearDetVorD.default");
00041 strcpy(MeshFile, "NearDetMesh.default");
00042 strcpy(BFieldFile, "NearDetBFld.default");
00043 break;
00044 }
00045
00046 fBField = new TObjArray(1000); /* BF Vectors */
00047 fVor = new BFLWingedEdge(); /* A Voronoi diagram object */
00048
00049 LoadBField(BFieldFile); /* Fill fBField */
00050 fVor->Load(VoronoiFile); /* Fill fVor */
00051 fVor->LoadNodalSet(MeshFile); /* Fill fGenerators */
00052
00053 fInt = new BFLInterpolation(fBField, fVor);
00054 }
|
|
||||||||||||||||
|
Definition at line 57 of file BFLHandler.cxx. References fBField, fInt, fVor, BFLWingedEdge::Load(), LoadBField(), and BFLWingedEdge::LoadNodalSet(). 00059 {
00060 fBField = new TObjArray(1000); /* BF Vectors */
00061 fVor = new BFLWingedEdge(); /* A Voronoi diagram object */
00062
00063 LoadBField(BFieldFile); /* Fill fBField */
00064 fVor->Load(VoronoiFile); /* Fill fVor */
00065 fVor->LoadNodalSet(MeshFile);
00066
00067 fInt = new BFLInterpolation(fBField, fVor);
00068 }
|
|
|
Definition at line 71 of file BFLHandler.cxx. References fInt. 00072 {
00073 delete fInt; fInt=0;
00074 // already done by BFLInterpolation //delete fVor; fVor=0;
00075 // already done by BFLInterpolation //delete fBField; fBField=0;
00076 }
|
|
||||||||||||
|
Definition at line 103 of file BFLHandler.cxx. References fInt, and BFLInterpolation::GetB(). Referenced by BfldHandlerVoronoi::GetBFieldMeshCoord().
|
|
|
Definition at line 28 of file BFLHandler.h. References fInt, and BFLInterpolation::GetCache().
|
|
|
Definition at line 79 of file BFLHandler.cxx. References fBField. Referenced by BFLHandler(). 00080 {
00081 Int_t NodeID = 0;
00082 Float_t bx, by, bz;
00083 Int_t NodeIDLast = -999;
00084
00085 ifstream DATA(BFieldFile,std::ios::in);
00086 if(!DATA) {
00087 cerr << "No such file: " << BFieldFile << endl;
00088 exit(1);
00089 }
00090
00091 while(!DATA.eof()){
00092 DATA >> NodeID >> bx >> by >> bz;
00093 if (NodeID != NodeIDLast)
00094 fBField->AddAtAndExpand(new TVector3(bx,by,bz),NodeID);
00095 NodeIDLast = NodeID;
00096 }
00097 DATA.close();
00098
00099 return 0;
00100 }
|
|
|
Definition at line 31 of file BFLHandler.h. References fBField. 00031 { fBField = bfield; }
|
|
|
Definition at line 29 of file BFLHandler.h. References fInt, and BFLInterpolation::SetCache().
|
|
|
Definition at line 32 of file BFLHandler.h. References fInt, and BFLInterpolation::SetInterpolant(). Referenced by BfldHandlerVoronoi::SetCostasInterpMethod(). 00032 {
00033 fInt->SetInterpolant(interp);
00034 }
|
|
|
Definition at line 35 of file BFLHandler.h. References fInt, BFLInterpolation::GetLastPolygon(), and BFLInterpolation::SetSearchSeed(). 00035 {
00036 fInt->SetSearchSeed(fInt->GetLastPolygon());
00037 }
|
|
|
Definition at line 30 of file BFLHandler.h. References fVor. 00030 { fVor = vor; }
|
|
|
Definition at line 42 of file BFLHandler.h. Referenced by BFLHandler(), LoadBField(), and SetBField(). |
|
|
Definition at line 40 of file BFLHandler.h. Referenced by BFLHandler(), GetBField(), GetCache(), SetCache(), SetInterpolant(), SetLastPolygAsSeed(), and ~BFLHandler(). |
|
|
Definition at line 41 of file BFLHandler.h. Referenced by BFLHandler(), and SetVoronoi(). |
1.3.9.1