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

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