source: trunk/MagicSoft/Mars/mjobs/MJCalib.cc@ 6491

Last change on this file since 6491 was 6475, checked in by gaug, 20 years ago
*** empty log message ***
File size: 2.1 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): Markus Gaug, 2/2005 <mailto:markus@ifae.es>
19!
20! Copyright: MAGIC Software Development, 2000-2005
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MJCalib
28//
29// A base class for the calibration jobs
30//
31/////////////////////////////////////////////////////////////////////////////
32#include "MJCalib.h"
33
34ClassImp(MJCalib);
35
36using namespace std;
37
38const Int_t MJCalib::fgCheckedPixId = 100;
39// --------------------------------------------------------------------------
40//
41// Default constructor.
42//
43// Sets:
44// - fDataFlag to kIsUseRootData
45// - fRuns to NULL
46// - fCheckedPixId to fgCheckedPixId
47// - fPixelCheck to kFALSE
48//
49MJCalib::MJCalib() : fDataFlag(kIsUseRootData), fPixelCheck(kFALSE), fRuns(NULL)
50{
51 SetCheckedPixId();
52}
53
54Bool_t MJCalib::CheckEnvLocal()
55{
56
57 if (HasEnv("PixelCheck"))
58 SetPixelCheck();
59
60 if (HasEnv("CheckedPixId"))
61 SetCheckedPixId(GetEnv("CheckedPixId",fCheckedPixId));
62
63 if (!HasEnv("DataType"))
64 return kTRUE;
65
66 TString dat = GetEnv("DataType", "");
67 dat = dat.Strip(TString::kBoth);
68 dat.ToLower();
69
70 if (dat == (TString)"raw")
71 SetUseRawData();
72
73 if (dat == (TString)"mc" || dat == (TString)"montecarlo")
74 SetUseMC();
75
76 if (dat == (TString)"root")
77 SetUseRootData();
78
79 return kTRUE;
80}
Note: See TracBrowser for help on using the repository browser.