source: trunk/MagicSoft/Mars/mcamera/MCameraTD.cc@ 7685

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