source: trunk/MagicSoft/Mars/msignal/MArrivalTime.cc@ 3629

Last change on this file since 3629 was 3306, checked in by hbartko, 21 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): Sebastian Raducci, 12/2003 <mailto:raducci@fisica.uniud.it>
19!
20! Copyright: MAGIC Software Development, 2000-2004
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MArrivalTime
28//
29// Times are calculated using the TSpline5 Root Class
30//
31/////////////////////////////////////////////////////////////////////////////
32#include "MArrivalTime.h"
33
34#include "MGeomCam.h"
35#include "MGeomPix.h"
36
37#include "MLog.h"
38#include "MLogManip.h"
39
40#include "MRawEvtPixelIter.h"
41#include "MRawEvtData.h"
42
43ClassImp(MArrivalTime);
44
45using namespace std;
46
47
48// --------------------------------------------------------------------------
49//
50// Creates an object containing the arrival time for each pixel in the event
51//
52MArrivalTime::MArrivalTime(const char *name, const char *title)
53{
54 fName = name ? name : "MArrivalTime";
55 fTitle = title ? title : "Photons arrival times Information";
56}
57
58// -------------------------------------------------------------------------
59//
60// Sets every pixel arrival time to -1
61//
62void MArrivalTime::Reset()
63{
64 fData.Reset(-1);
65}
66
67void MArrivalTime::InitSize(Int_t i)
68{
69 fData.Set(i);
70}
71
72// -------------------------------------------------------------------------
73//
74// Set the arrival time in one pixel
75//
76void MArrivalTime::SetTime(const Int_t i, const Float_t t)
77{
78 fData[i] = t;
79}
80
81// --------------------------------------------------------------------------
82//
83// Returns the arrival time value
84//
85Bool_t MArrivalTime::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
86{
87 if (idx<0 || idx>=fData.GetSize())
88 return kFALSE;
89
90 switch (type)
91 {
92 case 0:
93 case 1:
94 val = fData[idx];
95 break;
96 }
97
98 return kTRUE;
99}
100
101void MArrivalTime::DrawPixelContent(Int_t num) const
102{
103 *fLog << warn << "MArrivalTime::DrawPixelContent - not available." << endl;
104}
Note: See TracBrowser for help on using the repository browser.