00001 #ifndef HPDLibrary_HPDNoiseDataFrame_h 00002 #define HPDLibrary_HPDNoiseDataFrame_h 00003 00004 // -------------------------------------------------------- 00005 // Object to store all timeslices of noise signal frame 00006 // Project: HPD noise library 00007 // Author: F.Ratnikov UMd, Jan. 15, 2008 00008 // $Id: HPDNoiseDataFrame.h,v 1.1 2008/01/16 02:12:38 fedor Exp $ 00009 // -------------------------------------------------------- 00010 00011 #include "TObject.h" 00012 00013 #include <iostream> 00014 #include <stdint.h> 00015 #include "DataFormats/HcalDetId/interface/HcalDetId.h" 00016 00017 00018 namespace { 00019 const unsigned int FRAMESIZE = 10; 00020 } 00021 00022 class HPDNoiseDataFrame { 00023 public: 00024 HPDNoiseDataFrame () {}; 00025 HPDNoiseDataFrame (HcalDetId fId, const float* fCharges); 00026 virtual ~HPDNoiseDataFrame (); 00028 HcalDetId id () const {return HcalDetId (mId);} 00030 float charge (unsigned i) const {return (i < FRAMESIZE) ? mCharge[i] : -1.;} 00032 const float* getFrame () const {return mCharge;} 00033 private: 00034 uint32_t mId; 00035 float mCharge [10]; 00036 ClassDef(HPDNoiseDataFrame,1) 00037 }; 00038 00040 std::ostream& operator<< (std::ostream&, const HPDNoiseDataFrame&); 00041 00042 #endif