Index: /trunk/Mars/mraw/MRawEvtData.cc
===================================================================
--- /trunk/Mars/mraw/MRawEvtData.cc	(revision 11554)
+++ /trunk/Mars/mraw/MRawEvtData.cc	(revision 11555)
@@ -50,4 +50,5 @@
 //   ------------------
 //    + MArrayS *fStartCell
+//    + Bool_t   fIsSigned
 //
 //   Version 7
@@ -113,5 +114,5 @@
 //
 MRawEvtData::MRawEvtData(const char *name, const char *title)
-    : fRunHeader(0), fNumBytesPerSample(1)
+    : fRunHeader(0), fNumBytesPerSample(1), fIsSigned(false)
 {
     fName  = name  ? name  : "MRawEvtData";
@@ -288,6 +289,9 @@
     name += pix.GetPixelId();
 
+    fIsSigned = kTRUE;
 
     Bool_t same = str.Contains("same");
+
+    cout << "MIN/MAX=" << fNumBytesPerSample << " " << GetMin() << " " << GetMax() << endl;
 
     if (str.BeginsWith("graph"))
@@ -304,5 +308,5 @@
 
         graphhi->SetMaximum(GetMax()+0.5);
-        graphhi->SetMinimum(0);
+        graphhi->SetMinimum(GetMin());
 
         graphhi->SetBit(kCanDelete);
@@ -310,5 +314,5 @@
 
         TH1F *histhi = graphhi->GetHistogram();
-        histhi->SetMinimum(0);
+        histhi->SetMinimum(GetMin());
         histhi->SetMaximum(GetMax()+0.5);
  
@@ -325,5 +329,5 @@
 
         TH1F *histh = new TH1F(name, "FADC Samples", nh+nl, -0.5, nh+nl-.5);
-        histh->SetMinimum(0);
+        histh->SetMinimum(GetMin());
         histh->SetMaximum(GetMax()+0.5);
         histh->SetXTitle("Time [FADC Slices]");
Index: /trunk/Mars/mraw/MRawEvtData.h
===================================================================
--- /trunk/Mars/mraw/MRawEvtData.h	(revision 11554)
+++ /trunk/Mars/mraw/MRawEvtData.h	(revision 11555)
@@ -40,4 +40,6 @@
     UShort_t fNumBytesPerSample;
 
+    Bool_t fIsSigned;
+
     Int_t fConnectedPixels;       //!
 
@@ -47,11 +49,12 @@
     Int_t GetNumBytes() const;
 
-    UInt_t GetSample(const void *ptr, Int_t n) // Helper for Draw
+    Long_t GetSample(const void *ptr, Int_t n) // Helper for Draw
     {
+        fIsSigned = kTRUE;
         switch (fNumBytesPerSample)
         {
-        case 1: return reinterpret_cast<const Byte_t*>(ptr)[n];
-        case 2: return reinterpret_cast<const UShort_t*>(ptr)[n];
-        case 4: return reinterpret_cast<const UInt_t*>(ptr)[n];
+        case 1: return fIsSigned ? (Long_t)reinterpret_cast<const Char_t*>(ptr)[n]  : (Long_t)reinterpret_cast<const Byte_t*>(ptr)[n];
+        case 2: return fIsSigned ? (Long_t)reinterpret_cast<const Short_t*>(ptr)[n] : (Long_t)reinterpret_cast<const UShort_t*>(ptr)[n];
+        case 4: return fIsSigned ? (Long_t)reinterpret_cast<const Int_t*>(ptr)[n]   : (Long_t)reinterpret_cast<const UInt_t*>(ptr)[n];
         }
         return 0;
@@ -91,6 +94,14 @@
     UShort_t GetNumBytesPerSample() const { return fNumBytesPerSample; }
     UInt_t   GetScale() const { return 1<<((fNumBytesPerSample-1)*8); }
-    UInt_t   GetMax() const   { return (UInt_t)(~1)>>((4-fNumBytesPerSample)*8); }
-
+    Long_t   GetMin() const   { return fIsSigned ? -GetMax()-1 : 0; }
+    Long_t   GetMax() const   {
+        switch (fNumBytesPerSample)
+        {
+        case 1: return fIsSigned ?       0x7f :       0xff;
+        case 2: return fIsSigned ?     0x7fff :     0xffff;
+        case 4: return fIsSigned ? 0x7fffffff : 0xffffffff;
+        }
+    return 0;
+    }
     Byte_t   *GetSamples() const;
     UShort_t *GetStartCells() const;
