diff --git a/src/THcShower.h b/src/THcShower.h
index fd5bac7d1cabef2df6f7da0f4d9983763a4b80e0..738bdace5c61dbdbb31e4b276df49ec0dd16da90 100644
--- a/src/THcShower.h
+++ b/src/THcShower.h
@@ -308,6 +308,7 @@ protected:
   void ClusterHits(THcShowerHitSet& HitSet);
 
   friend class THcShowerPlane;   //to access debug flags.
+  friend class THcShowerArray;   //to access debug flags.
 
   ClassDef(THcShower,0)          // Shower counter detector
 };
diff --git a/src/THcShowerArray.cxx b/src/THcShowerArray.cxx
index 740a3b33d24228f332de509c020c2fe2611ab0bc..68457191bcd43d3a6681e8ccf2ffc791e4fae219 100644
--- a/src/THcShowerArray.cxx
+++ b/src/THcShowerArray.cxx
@@ -98,8 +98,22 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
 
   fNelem = fNRows*fNColumns;
 
-  // Here read the 2-D arras of pedestals, gains, etc.
+  // Here read the 2-D arrays of pedestals, gains, etc.
 
+  // Pedestal limits per channel.
+
+  fPedLimit = new Int_t [fNelem];
+
+  THcShower* fParent;
+  fParent = (THcShower*) GetParent();
+
+  for(Int_t i=0;i<fNelem;i++) {
+    fPedLimit[i] = fParent->GetPedLimit(i,fLayerNum,0);   //layer 2, neg. side
+  }
+
+  fMinPeds = fParent->GetMinPeds();
+
+  InitializePedestals();
 
   // Event by event amplitude and pedestal
   fA = new Double_t[fNelem];
@@ -113,6 +127,27 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
   piccolumn=0;
 #endif
 
+  // Debug output.
+
+  if (fParent->fdbg_init_cal) {
+    cout << "---------------------------------------------------------------\n";
+    cout << "Debug output from THcShowerArray::ReadDatabase for "
+    	 << GetParent()->GetPrefix() << ":" << endl;
+
+    cout << "  Layer #" << fLayerNum << ", number of elements " << fNelem
+	 << endl;
+
+    //    cout << "  Origin of Layer at  X = " << fOrigin.X()
+    //	 << "  Y = " << fOrigin.Y() << "  Z = " << fOrigin.Z() << endl;
+
+    cout << "  fPedLimit:";
+    for(Int_t i=0;i<fNelem;i++) cout << " " << fPedLimit[i];
+    cout << endl;
+
+    cout << "  fMinPeds = " << fMinPeds << endl;
+    cout << "---------------------------------------------------------------\n";
+  }
+
   return kOK;
 }
 
diff --git a/src/THcShowerArray.h b/src/THcShowerArray.h
index 1bdbacc66dd650a4f70b0ed61fd8fab87162d179..372c77072dce83cb89ee690f4c842875bac6f42e 100644
--- a/src/THcShowerArray.h
+++ b/src/THcShowerArray.h
@@ -68,9 +68,6 @@ protected:
 
   TClonesArray* fADCHits;	// List of ADC hits
 
-  Int_t fNPedestalEvents;	/* Pedestal event counter */
-  Int_t fMinPeds;		/* Only analyze/update if num events > */
-
   // Parameters
   Int_t fNRows;
   Int_t fNColumns;
@@ -81,9 +78,23 @@ protected:
   Int_t fDataSampHigh;		// sample integration
 
   Int_t fLayerNum;		// 2 for SHMS
+
   // Accumulators for pedestals go here
+
+  Int_t fNPedestalEvents;	/* Pedestal event counter */
+  Int_t fMinPeds;		/* Only analyze/update if num events > */
+
   // 2D arrays
 
+  Int_t *fPedSum;		/* Accumulators for pedestals */
+  Int_t *fPedSum2;
+  Int_t *fPedLimit;          // Analyze pedestal if ADC signal < PedLimit
+  Int_t *fPedCount;          // [fNelem] counter of pedestal analysis
+
+  Float_t *fPed;             // [fNelem] pedestal positions
+  Float_t *fSig;             // [fNelem] pedestal rms-s
+  Float_t *fThresh;          // [fNelem] ADC thresholds
+
   virtual Int_t  ReadDatabase( const TDatime& date );
   virtual Int_t  DefineVariables( EMode mode = kDefine );
   //virtual void  InitializePedestals( );