source: trunk/MagicSoft/Mars/mcamera/MCameraTH.cc@ 7562

Last change on this file since 7562 was 7446, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 2.5 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-2005
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MCameraTH (PRELIMINARY)
29//
30/////////////////////////////////////////////////////////////////////////////
31#include "MCameraTH.h"
32
33#include <TMath.h>
34
35#include "MLog.h"
36#include "MLogManip.h"
37
38ClassImp(MCameraTH);
39
40using namespace std;
41
42// --------------------------------------------------------------------------
43//
44// Default constructor.
45//
46MCameraTH::MCameraTH(Int_t size, const char *name, const char *title)
47 : fTH(size)
48{
49 fName = name ? name : "MCameraTH";
50 fTitle = title ? title : "Storage container for the pixel discriminator threshold";
51}
52
53// --------------------------------------------------------------------------
54//
55// Print the discriminator thresholds
56//
57void MCameraTH::Print(Option_t *) const
58{
59 *fLog << all << underline << GetDescriptor() << endl;
60 for (int i=0; i<fTH.GetSize(); i++)
61 *fLog << " " << (int)fTH[i];
62 *fLog << endl;
63}
64
65// --------------------------------------------------------------------------
66//
67// Return the discriminator thresholds
68//
69Byte_t MCameraTH::GetMin() const
70{
71 Byte_t val = 0xff;
72 for (int i=0; i<fTH.GetSize(); i++)
73 val = TMath::Min(val, fTH[i]);
74 return val;
75}
76
77// --------------------------------------------------------------------------
78//
79// Return the discriminator thresholds
80//
81Byte_t MCameraTH::GetMax() const
82{
83 Byte_t val = 0;
84 for (int i=0; i<fTH.GetSize(); i++)
85 val = TMath::Max(val, fTH[i]);
86 return val;
87}
Note: See TracBrowser for help on using the repository browser.