source: trunk/MagicSoft/Mars/mcamera/MCameraRecTemp.cc@ 8076

Last change on this file since 8076 was 7726, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 2.7 KB
Line 
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-2006
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MCameraRecTemp
29//
30// Class Version 2:
31// ----------------
32// + Bool_t fIsValid; // fTD contains valid information
33//
34/////////////////////////////////////////////////////////////////////////////
35#include "MCameraRecTemp.h"
36
37#include <TMath.h>
38
39#include "MLog.h"
40#include "MLogManip.h"
41
42ClassImp(MCameraRecTemp);
43
44using namespace std;
45
46// --------------------------------------------------------------------------
47//
48// Default constructor.
49//
50MCameraRecTemp::MCameraRecTemp(Int_t size, const char *name, const char *title)
51 : fRecTemp(size), fIsValid(kTRUE)
52{
53 fName = name ? name : "MCameraRecTemp";
54 fTitle = title ? title : "Storage container for the receiver board temperatures";
55}
56
57// --------------------------------------------------------------------------
58//
59// Print the dc currents
60//
61void MCameraRecTemp::Print(Option_t *) const
62{
63 *fLog << all << underline << GetDescriptor() << endl;
64 for (int i=0; i<fRecTemp.GetSize(); i++)
65 *fLog << " " << fRecTemp[i];
66 *fLog << endl;
67}
68
69// --------------------------------------------------------------------------
70//
71// Return the minimum receiver board temperature
72//
73Float_t MCameraRecTemp::GetMin() const
74{
75 Float_t val = FLT_MAX;
76 for (int i=0; i<fRecTemp.GetSize(); i++)
77 val = TMath::Min(val, fRecTemp[i]);
78 return val;
79}
80
81// --------------------------------------------------------------------------
82//
83// Return the maximum receiver board temperature
84//
85Float_t MCameraRecTemp::GetMax() const
86{
87 Float_t val = -FLT_MAX;
88 for (int i=0; i<fRecTemp.GetSize(); i++)
89 val = TMath::Max(val, fRecTemp[i]);
90 return val;
91}
Note: See TracBrowser for help on using the repository browser.