All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
POTSummary.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file larcoreobj/SummaryData/POTSummary.h
3 ///
4 /// Definition of object to store pot related information
5 ///
6 /// \author brebel@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
8 #ifndef LARCOREOBJ_SUMMARYDATA_POTSUMMARY_H
9 #define LARCOREOBJ_SUMMARYDATA_POTSUMMARY_H
10 
11 
12 namespace sumdata {
13 
14  class POTSummary {
15  public:
16  double totpot = 0.0;
17  double totgoodpot = 0.0;
18 
19  int totspills = 0;
20  int goodspills = 0;
21 
22 
23  POTSummary() = default;
24 
25  void aggregate(POTSummary const& other);
26 
27  };
28 
29  template <typename Stream>
30  Stream& operator<< (Stream&& o, POTSummary const& a);
31 
32 } // namespace sumdata
33 
34 
35 //----------------------------------------------------------------------------
36 template <typename Stream>
38 {
39  o << "This sub run has " << a.totspills
40  << " total spills with an exposure of " << a.totpot << " POT"
41  <<"\n with cuts on beam quality, there are " << a.goodspills
42  << " good spills with an exposure of " << a.totgoodpot
43  << "\n";
44 
45  return o;
46 } // sumdata::operator<< (POTSummary)
47 
48 
49 #endif //LARCOREOBJ_SUMMARYDATA_POTSUMMARY_H
50 
51 
52 
53 
54 
55 
process_name gaushit a
std::ostream & operator<<(std::ostream &, GeometryConfigurationInfo const &)
void aggregate(POTSummary const &other)
Definition: POTSummary.cxx:15
bnb BNB Stream