Public Member Functions | Private Attributes | List of all members
sumdata::RunData Class Reference

#include <RunData.h>

Public Member Functions

 RunData ()
 
void aggregate (RunData const &other)
 
 RunData (std::string const &detectorName)
 
std::string const & DetName () const
 

Private Attributes

std::string fDetName
 Detector name. More...
 

Detailed Description

Definition at line 15 of file RunData.h.

Constructor & Destructor Documentation

RunData::RunData ( )

Definition at line 16 of file RunData.cxx.

17  : fDetName("nodetectorname")
18  {
19  }
std::string fDetName
Detector name.
Definition: RunData.h:28
RunData::RunData ( std::string const &  detectorName)
explicit

Definition at line 22 of file RunData.cxx.

23  : fDetName(detectorName)
24  {
25  }
std::string fDetName
Detector name.
Definition: RunData.h:28

Member Function Documentation

void RunData::aggregate ( RunData const &  other)

What to do when multiple RunData objects are found for the same run.

Exceptions
std::runtime_errorif other has a different DetName()

Definition at line 28 of file RunData.cxx.

28  {
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()
std::string const & DetName() const
Definition: RunData.h:39
std::string const & RunData::DetName ( ) const
inline

Definition at line 39 of file RunData.h.

39 { return fDetName; }
std::string fDetName
Detector name.
Definition: RunData.h:28

Member Data Documentation

std::string sumdata::RunData::fDetName
private

Detector name.

Definition at line 28 of file RunData.h.


The documentation for this class was generated from the following files: