Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
larcoreobj
larcoreobj
SummaryData
RunData.cxx
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
/// \file larcoreobj/SummaryData/RunData.cxx
3
///
4
/// Definition of object to store run related information
5
///
6
/// \author brebel@fnal.gov
7
////////////////////////////////////////////////////////////////////////
8
9
#include "
larcoreobj/SummaryData/RunData.h
"
10
11
#include <stdexcept>
// std::runtime_error
12
13
namespace
sumdata {
14
15
//---------------------------------------------------------
16
RunData::RunData
()
17
: fDetName(
"nodetectorname"
)
18
{
19
}
20
21
//---------------------------------------------------------
22
RunData::RunData
(std::string
const
& detectorName)
23
: fDetName(detectorName)
24
{
25
}
26
27
//---------------------------------------------------------
28
void
RunData::aggregate
(
RunData
const
& other) {
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
}
sumdata::RunData::DetName
std::string const & DetName() const
Definition:
RunData.h:39
sumdata::RunData::aggregate
void aggregate(RunData const &other)
Definition:
RunData.cxx:28
sumdata::RunData::RunData
RunData()
Definition:
RunData.cxx:16
RunData.h
sumdata::RunData
Definition:
RunData.h:15
Generated by
1.8.5