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

Last change on this file since 6751 was 6725, checked in by gaug, 20 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): 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//
42// Default constructor.
43//
44// Sets:
45// - fDataFlag to kIsUseRootData
46// - fRuns to NULL
47// - fCheckedPixId to fgCheckedPixId
48// - fPixelCheck to kFALSE
49// - fPulsePosCheck to kFALSE
50//
51MJCalib::MJCalib() : fDataFlag(kIsUseRootData), fStorage(0),
52 fPixelCheck(kFALSE), fPulsePosCheck(kFALSE),
53 fRuns(NULL)
54{
55 SetCheckedPixId();
56}
57
58Bool_t MJCalib::CheckEnvLocal()
59{
60 if (HasEnv("PixelCheck"))
61 SetPixelCheck(GetEnv("PixelCheck", fPixelCheck));
62
63 if (HasEnv("PulsePosCheck"))
64 SetPulsePosCheck(GetEnv("PulsePosCheck", fPulsePosCheck));
65
66 if (HasEnv("CheckedPixId"))
67 SetCheckedPixId(GetEnv("CheckedPixId",fCheckedPixId));
68
69 if (HasEnv("StorageType"))
70 {
71 TString type = GetEnv("StorageType", "");
72 type = type.Strip(TString::kBoth);
73 type.ToLower();
74
75 if (type == (TString)"hists")
76 SetHistsStorage();
77
78 if (type == (TString)"no" || type == (TString)"nostorage")
79 SetNoStorage();
80 }
81
82 if (!HasEnv("DataType"))
83 return kTRUE;
84
85 TString dat = GetEnv("DataType", "");
86 dat = dat.Strip(TString::kBoth);
87 dat.ToLower();
88
89 if (dat == (TString)"raw")
90 SetUseRawData();
91
92 if (dat == (TString)"mc" || dat == (TString)"montecarlo")
93 SetUseMC();
94
95 if (dat == (TString)"root")
96 SetUseRootData();
97
98 return kTRUE;
99}
Note: See TracBrowser for help on using the repository browser.