~mbogomilov/maus/devel3

« back to all changes in this revision

Viewing changes to src/legacy/Interface/MagFieldMap.cc

  • Committer: Durga Rajaram
  • Date: 2014-01-14 07:07:02 UTC
  • mfrom: (659.1.80 relcand)
  • Revision ID: durga@fnal.gov-20140114070702-2l1fuj1w6rraw7xe
Tags: MAUS-v0.7.6
MAUS-v0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// MAUS WARNING: THIS IS LEGACY CODE.
2
2
#include "Interface/MagFieldMap.hh"
3
3
#include "Interface/SplineInterpolator.hh"
4
 
#include "Interface/Squeal.hh"
 
4
#include "Utils/Exception.hh"
5
5
#include "Interface/Squeak.hh"
6
6
#include "Interface/STLUtils.hh"
7
7
 
60
60
                fMap.open(myFileName.c_str());
61
61
        else if(fileType == "g4micebinary")
62
62
                fMap.open(myFileName.c_str(), std::fstream::in | std::fstream::binary);
63
 
        else throw(Squeal(Squeal::recoverable, "Field map type "+fileType+" not supported", "MagFieldMap::ReadMap"));
64
 
        if (!fMap.is_open()) throw(Squeal(Squeal::recoverable, "Error opening field map file"+myFileName, 
 
63
        else throw(MAUS::Exception(MAUS::Exception::recoverable, "Field map type "+fileType+" not supported", "MagFieldMap::ReadMap"));
 
64
        if (!fMap.is_open()) throw(MAUS::Exception(MAUS::Exception::recoverable, "Error opening field map file"+myFileName, 
65
65
                                                               "MagFieldMap::ReadMap"));
66
66
 
67
67
        //Read the field map; built interpolator; read bounds (needed for bound checking) and grid size (needed for write)
172
172
        myRMax = minR + dR * (double)(numberOfRCoords-1);
173
173
 
174
174
        if(!fMap) 
175
 
    throw(Squeal(Squeal::recoverable, "There was a problem while reading a fieldmap.", "MagFieldMap::ReadG4BeamlineMap" ));
 
175
    throw(MAUS::Exception(MAUS::Exception::recoverable, "There was a problem while reading a fieldmap.", "MagFieldMap::ReadG4BeamlineMap" ));
176
176
 
177
177
 
178
178
        return SplineInterpolator(dR, dZ, minZ, numberOfRCoords, numberOfZCoords,
305
305
        myRMax = (numberOfRCoords - 1) * dR;
306
306
 
307
307
        if(!fMap)
308
 
    throw(Squeal(Squeal::recoverable, "There was a problem while loading a field map", "MagFieldMap::LoadGregoireMap"));
 
308
    throw(MAUS::Exception(MAUS::Exception::recoverable, "There was a problem while loading a field map", "MagFieldMap::LoadGregoireMap"));
309
309
 
310
310
        return SplineInterpolator(dR, dZ, minZ, numberOfRCoords, numberOfZCoords,
311
311
                                  inputBz, inputBr);