• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/cosy-jan12/go4/STS/TSTSCluster.h (r4864/r3071)

Go to the documentation of this file.
00001 /*
00002  * TSTSCluster.h
00003  *
00004  *  Created on: Jan 7, 2012
00005  *      Author: isorokin
00006  */
00007 
00008 #ifndef TSTSCLUSTER_H
00009 #define TSTSCLUSTER_H
00010 
00011 #include "TSTSDigi.h"
00012 
00013 class TSTSCluster {
00014 private:
00015         std::vector<TSTSDigi> fDigis;
00016         mutable Float_t fCachedAmplitude;
00017     mutable TSTSDigi fCachedMainDigi;
00018     mutable Int_t fCachedMainStrip;
00019     mutable Float_t fCachedCogStrip;
00020     mutable Long64_t fCachedTime;
00021         mutable Long64_t fCachedTimeLength;
00022         mutable Bool_t fCacheActual;
00023 
00024         void EnsureCacheActual() const;
00025     void UpdateCache() const;
00026 
00027 public:
00028         TSTSCluster();
00029         virtual ~TSTSCluster() {}
00030     void                            AddDigi( const TSTSDigi & digi );
00031     void                Reset() { fDigis.clear(); fCacheActual = kFALSE; }
00032     Int_t               GetNDigis() const { return fDigis.size(); }
00033     const TSTSDigi &    GetDigi(Int_t iDigi ) const { return fDigis.at( iDigi ); }
00034     Float_t                 GetAmplitude() const;
00035     const TSTSDigi &    GetMainDigi() const;
00036     Int_t                           GetMainStrip() const;
00037     Float_t                 GetCogStrip() const;
00038     Long64_t            GetTime() const;
00039     Long64_t            GetTimeLength() const;
00040     void                        Print() const;
00041     ClassDef( TSTSCluster, 1 )
00042 };
00043 
00044 #endif /* TSTSCLUSTER_H */

Generated on Tue Dec 10 2013 04:52:18 for ROCsoft by  doxygen 1.7.1