~mbogomilov/maus/devel3

« back to all changes in this revision

Viewing changes to src/common_cpp/JsonCppStreamer/ORStream.cc

  • Committer: Durga Rajaram
  • Date: 2014-01-14 04:39:44 UTC
  • mfrom: (663.38.24 merge)
  • mto: (698.1.1 release)
  • mto: This revision was merged to the branch mainline in revision 693.
  • Revision ID: durga@fnal.gov-20140114043944-qf0i8nksnwu74cll
candidate 0.7.6 - trunk r1026

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <string>
20
20
 
21
21
#include "JsonCppStreamer/ORStream.hh"
22
 
#include "Interface/Squeal.hh"
 
22
#include "Utils/Exception.hh"
23
23
 
24
24
  orstream::orstream(const char* fileName,
25
25
                     const char* treeName,
41
41
      Squeak::mout(Squeak::error)
42
42
        << "Couldn't open ROOT TFile as no filename given"
43
43
        << std::endl;
44
 
      throw Squeal(Squeal::recoverable,
 
44
      throw MAUS::Exception(MAUS::Exception::recoverable,
45
45
                   "Cannot open file as null \"\" string passed as filename",
46
46
                   "void orstream::open(const char*, const char*, const char*, const char*)");
47
47
    }
51
51
      Squeak::mout(Squeak::error)
52
52
        << "ROOT TFile opened incorrectly"
53
53
        << std::endl;
54
 
      throw Squeal(Squeal::recoverable,
 
54
      throw MAUS::Exception(MAUS::Exception::recoverable,
55
55
                   "TFile object not opened properly",
56
56
                   "void orstream::open(const char*, const char*, const char*, const char*)");
57
57
    }
58
58
    TObject* tree_search = m_file->Get(treeName);
59
59
    if (tree_search != NULL) {
60
60
        if (strcmp(tree_search->ClassName(), "TTree") != 0)
61
 
            throw(Squeal(Squeal::recoverable,
 
61
            throw(MAUS::Exception(MAUS::Exception::recoverable,
62
62
                 "Attempt to open TTree with existing non-tree object in the way",
63
63
                 "void orstream::open(...)"));
64
64
        Squeak::mout(Squeak::debug)