FairRoot/PandaRoot
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
PndSdsCluster Class Referenceabstract

Class to store the Digis which belong to one cluster This class holds the information which Digi belongs to the actual cluster. The information is stored in a vector<Int_t> which contains the position of the digi in the TClonesArray where it is stored. More...

#include <PndSdsCluster.h>

Inheritance diagram for PndSdsCluster:
PndSdsClusterPixel PndSdsClusterStrip

Public Member Functions

 PndSdsCluster ()
 
 ~PndSdsCluster ()
 
 PndSdsCluster (std::vector< Int_t > list)
 
virtual void SetClusterList (Int_t DigiType, std::vector< Int_t > list, Int_t fileId, Int_t eventId)=0
 
std::vector< Int_t > GetClusterList () const
 
Int_t GetClusterSize () const
 
Int_t GetDigiIndex (Int_t i) const
 
bool DigiBelongsToCluster (Int_t digiIndex)
 
virtual void Print ()
 

Protected Member Functions

 ClassDef (PndSdsCluster, 2)
 

Protected Attributes

std::vector< Int_t > fClusterList
 

Friends

std::ostreamoperator<< (std::ostream &out, PndSdsCluster &cl)
 

Detailed Description

Class to store the Digis which belong to one cluster This class holds the information which Digi belongs to the actual cluster. The information is stored in a vector<Int_t> which contains the position of the digi in the TClonesArray where it is stored.

PndSdsCluster.h

Author
T.Stockmanns t.sto.nosp@m.ckma.nosp@m.nns@f.nosp@m.z-ju.nosp@m.elich.nosp@m..de

Definition at line 19 of file PndSdsCluster.h.

Constructor & Destructor Documentation

PndSdsCluster::PndSdsCluster ( )
inline

Definition at line 33 of file PndSdsCluster.h.

33 :fClusterList(){};
std::vector< Int_t > fClusterList
Definition: PndSdsCluster.h:47
PndSdsCluster::~PndSdsCluster ( )
inline

Definition at line 34 of file PndSdsCluster.h.

34 {};
PndSdsCluster::PndSdsCluster ( std::vector< Int_t >  list)

Definition at line 3 of file PndSdsCluster.cxx.

3  :
4 fClusterList(list)
5 {
6 }
std::vector< Int_t > fClusterList
Definition: PndSdsCluster.h:47

Member Function Documentation

PndSdsCluster::ClassDef ( PndSdsCluster  ,
 
)
protected
bool PndSdsCluster::DigiBelongsToCluster ( Int_t  digiIndex)

Definition at line 13 of file PndSdsCluster.cxx.

References fClusterList, and i.

Referenced by EventListing().

14 {
15  for (unsigned int i = 0; i < fClusterList.size(); i++)
16  if (fClusterList[i] == digiIndex) return true;
17 
18  return false;
19 }
Int_t i
Definition: run_full.C:25
std::vector< Int_t > fClusterList
Definition: PndSdsCluster.h:47
std::vector<Int_t> PndSdsCluster::GetClusterList ( ) const
inline
Int_t PndSdsCluster::GetClusterSize ( ) const
inline
Int_t PndSdsCluster::GetDigiIndex ( Int_t  i) const
inline
void PndSdsCluster::Print ( )
virtual

Definition at line 8 of file PndSdsCluster.cxx.

9 {
10  std::cout << *this;
11 }
virtual void PndSdsCluster::SetClusterList ( Int_t  DigiType,
std::vector< Int_t >  list,
Int_t  fileId,
Int_t  eventId 
)
pure virtual

Implemented in PndSdsClusterStrip, and PndSdsClusterPixel.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream out,
PndSdsCluster cl 
)
friend

Definition at line 22 of file PndSdsCluster.h.

22  {
23  std::vector<Int_t> list = cl.GetClusterList();
24  out << "Hits in Cluster: (" ;
25  for (UInt_t i = 0; i<list.size();i++)
26  out << list[i] << " ";
27  out << ")" << std::endl;
28 
29  return out;
30  }
std::vector< Int_t > GetClusterList() const
Definition: PndSdsCluster.h:38
Int_t i
Definition: run_full.C:25
TFile * out
Definition: reco_muo.C:20

Member Data Documentation

std::vector<Int_t> PndSdsCluster::fClusterList
protected

The documentation for this class was generated from the following files: