RunData.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file RunData.cxx
3 ///
4 /// Definition of object to store run related information
5 ///
6 /// \version $Id: RunData.cxx,v 1.1.1.1 2011/03/03 00:19:49 brebel Exp $
7 /// \author brebel@fnal.gov
8 ////////////////////////////////////////////////////////////////////////
9 
11 #include <stdexcept> // std::runtime_error
12 
13 namespace gar {
14  namespace sumdata {
15 
16  //---------------------------------------------------------
18  : fDetName("nodetectorname")
19  {
20  }
21 
22  //---------------------------------------------------------
23  RunData::RunData(std::string const& detectorName)
24  : fDetName(detectorName)
25  {
26  }
27 
28  //---------------------------------------------------------
30 
31  // Each run is required to have the same detector name.
32  // This might be a problem for Monte Carlo jobs which tend to use the same
33  // run number for everything.
34  if (other.DetName() != DetName()) {
35  throw std::runtime_error("The same run sees different detector setups: '"
36  + DetName() + "' and '" + other.DetName()
37  );
38  }
39  } // RunData::aggregate()
40 
41  }
42 }
std::string const & DetName() const
Definition: RunData.h:41
std::string string
Definition: nybbler.cc:12
void aggregate(RunData const &other)
Definition: RunData.cxx:29
std::string fDetName
detector name
Definition: RunData.h:26
General GArSoft Utilities.