Index: trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc	(revision 6469)
+++ trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc	(revision 6477)
@@ -1182,6 +1182,9 @@
 //
 // In addition to the resources of the base-class MExtractor:
-//   MJPedestal.MExtractor.WindowSizeHiGain: 6
-//   MJPedestal.MExtractor.WindowSizeLoGain: 6
+//   Resolution
+//   RiseTimeHiGain
+//   FallTimeHiGain
+//   LoGainStretch
+//   ExtractionType: amplitude, integral
 //
 Int_t MExtractTimeAndChargeSpline::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
@@ -1214,17 +1217,36 @@
 
   if (IsEnvDefined(env, prefix, "Amplitude", print))
-    {
+  {
       b = GetEnvValue(env, prefix, "Amplitude", IsExtractionType(kAmplitude));
-      if (b) 
-        SetChargeType(kAmplitude);
+      if (b)
+          SetChargeType(kAmplitude);
       rc = kTRUE;
-    }
+  }
   if (IsEnvDefined(env, prefix, "Integral", print))
-    {
+  {
       b = GetEnvValue(env, prefix, "Integral", IsExtractionType(kIntegral));
-      if (b) 
-        SetChargeType(kIntegral);
+      if (b)
+          SetChargeType(kIntegral);
       rc = kTRUE;
-    }
+  }
+
+  if (IsEnvDefined(env, prefix, "ExtractionType", print))
+  {
+      TString type = GetEnvValue(env, prefix, "ExtractionType", "");
+      type.ToLower();
+      type = type.Strip(TString::kBoth);
+      if (type==(TString)"amplitude")
+          SetChargeType(kAmplitude);
+      if (type==(TString)"integral")
+          SetChargeType(kIntegral);
+      if (type==(TString)"maximum")
+          SetChargeType(kMaximum);
+      if (type==(TString)"halfmaximum")
+          SetChargeType(kHalfMaximum);
+      rc=kTRUE;
+  }
+
+
+
 
   return MExtractTimeAndCharge::ReadEnv(env, prefix, print) ? kTRUE : rc;
