LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
RunData.cxx
Go to the documentation of this file.
1 
10 
11 #include <stdexcept> // std::runtime_error
12 
13 namespace sumdata {
14 
15  //---------------------------------------------------------
17  : fDetName("nodetectorname")
18  {
19  }
20 
21  //---------------------------------------------------------
22  RunData::RunData(std::string const& detectorName)
23  : fDetName(detectorName)
24  {
25  }
26 
27  //---------------------------------------------------------
29 
30  // Each run is required to have the same detector name.
31  // This might be a problem for Monte Carlo jobs which tend to use the same
32  // run number for everything.
33  if (other.DetName() != DetName()) {
34  throw std::runtime_error("The same run sees different detector setups: '"
35  + DetName() + "' and '" + other.DetName()
36  );
37  }
38  } // RunData::aggregate()
39 
40  //---------------------------------------------------------
41 
42 }
std::string const & DetName() const
Definition: RunData.h:39
std::string fDetName
Detector name.
Definition: RunData.h:28
std::string detectorName
void aggregate(RunData const &other)
Definition: RunData.cxx:28