1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Thomas Bretz, 5/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
|
---|
19 | ! Author(s): Florian Goebel 11/2005 <mailto:fgoebel@mppmu.mpg.de>
|
---|
20 | !
|
---|
21 | ! Copyright: MAGIC Software Development, 2000-2005
|
---|
22 | !
|
---|
23 | !
|
---|
24 | \* ======================================================================== */
|
---|
25 |
|
---|
26 | /////////////////////////////////////////////////////////////////////////////
|
---|
27 | //
|
---|
28 | // MCameraRecTemp
|
---|
29 | //
|
---|
30 | /////////////////////////////////////////////////////////////////////////////
|
---|
31 | #include "MCameraRecTemp.h"
|
---|
32 |
|
---|
33 | #include <TMath.h>
|
---|
34 |
|
---|
35 | #include "MLog.h"
|
---|
36 | #include "MLogManip.h"
|
---|
37 |
|
---|
38 | ClassImp(MCameraRecTemp);
|
---|
39 |
|
---|
40 | using namespace std;
|
---|
41 |
|
---|
42 | // --------------------------------------------------------------------------
|
---|
43 | //
|
---|
44 | // Default constructor.
|
---|
45 | //
|
---|
46 | MCameraRecTemp::MCameraRecTemp(Int_t size, const char *name, const char *title)
|
---|
47 | : fRecTemp(size)
|
---|
48 | {
|
---|
49 | fName = name ? name : "MCameraRecTemp";
|
---|
50 | fTitle = title ? title : "Storage container for the receiver board temperatures";
|
---|
51 | }
|
---|
52 |
|
---|
53 | // --------------------------------------------------------------------------
|
---|
54 | //
|
---|
55 | // Print the dc currents
|
---|
56 | //
|
---|
57 | void MCameraRecTemp::Print(Option_t *) const
|
---|
58 | {
|
---|
59 | *fLog << all << underline << GetDescriptor() << endl;
|
---|
60 | for (int i=0; i<fRecTemp.GetSize(); i++)
|
---|
61 | *fLog << " " << fRecTemp[i];
|
---|
62 | *fLog << endl;
|
---|
63 | }
|
---|
64 |
|
---|
65 | // --------------------------------------------------------------------------
|
---|
66 | //
|
---|
67 | // Return the minimum receiver board temperature
|
---|
68 | //
|
---|
69 | Float_t MCameraRecTemp::GetMin() const
|
---|
70 | {
|
---|
71 | Float_t val = FLT_MAX;
|
---|
72 | for (int i=0; i<fRecTemp.GetSize(); i++)
|
---|
73 | val = TMath::Min(val, fRecTemp[i]);
|
---|
74 | return val;
|
---|
75 | }
|
---|
76 |
|
---|
77 | // --------------------------------------------------------------------------
|
---|
78 | //
|
---|
79 | // Return the maximum receiver board temperature
|
---|
80 | //
|
---|
81 | Float_t MCameraRecTemp::GetMax() const
|
---|
82 | {
|
---|
83 | Float_t val = -FLT_MAX;
|
---|
84 | for (int i=0; i<fRecTemp.GetSize(); i++)
|
---|
85 | val = TMath::Max(val, fRecTemp[i]);
|
---|
86 | return val;
|
---|
87 | }
|
---|