FairRoot/PandaRoot
PndSdsDigiStrip.h
Go to the documentation of this file.
1 // --------------------------------------------------------
2 // ---- PndSdsDigiStrip header file ---
3 // ---- Created 10.07.07 by Ralf Kliemt ---
4 // --------------------------------------------------------
5 
10 #ifndef PNDSDSDIGISTRIP_H
11 #define PNDSDSDIGISTRIP_H
12 
13 
14 #include "PndSdsDigi.h"
15 #include "PndDetectorList.h"
16 
17 #include "TObject.h"
18 #include "TString.h"
19 #include <iostream>
20 
22 
30  {
31  public :
33 
34  PndSdsDigiStrip(std::vector<Int_t> index, Int_t detID, Int_t sensorID, Int_t fe, Int_t chan, Double_t charge, Double_t timestamp = -1);
35  PndSdsDigiStrip(Int_t index, Int_t detID, Int_t sensorID, Int_t fe, Int_t chan, Double_t charge, Double_t timestamp = -1);
37 
39 
40 
41  // Int_t GetIndex() const { return fIndex; }
42  // Int_t GetDetID() const { return fDetID;}
43  // TString GetDetName() const { return fDetName; }
44  // Int_t GetFE() const { return fFE; }
45  Int_t GetChannel() const { return fChannel; }
46  // Int_t GetTimestamp() const { return fTimestamp; }
47  // Double_t GetCharge() const { return fCharge; }
48  // Int_t GetMCID() const { return fMCID; }
49 
50  // void SetIndex ( Int_t index ) { fIndex = index; }
51  // void SetDetID ( Int_t detID ) { fDetID = detID; }
52  // void SetDetName ( const TString& detName ) { fDetName = detName; }
53  // void SetFE ( Int_t fe ) { fFE = fe; }
54  // void SetChannel ( Int_t channel ) { fChannel = channel; }
55  // void SetCharge ( Double_t charge ) { fCharge = charge; }
56  // void SetMCID ( Int_t mcID ) { fMCID = mcID; }
57 
58  // const void Print();
59 
60  Bool_t operator==(const PndSdsDigiStrip& d2) const;
61  // Bool_t const HasNeighbour(const PndSdsDigiStrip& d2);
62 
63  virtual bool equal(FairTimeStamp* data);
64 
65  virtual bool operator<(const PndSdsDigiStrip& myDigi) const{
66  if (fDetID < myDigi.GetDetID()) return true; else if(fDetID > myDigi.GetDetID()) return false;
67  if (fSensorID < myDigi.GetSensorID()) return true; else if (fSensorID > myDigi.GetSensorID()) return false;
68  if (fFE < myDigi.GetFE()) return true; else if (fFE > myDigi.GetFE()) return false;
69  if (fChannel < myDigi.GetChannel()) return true; else if (fChannel > myDigi.GetChannel()) return false;
70  return false;
71  }
72 
74  if (this != &strip){
75  this->PndSdsDigi::operator=(strip);
76  fChannel = strip.GetChannel();
77  }
78  return *this;
79  }
80 
81  std::ostream& Print(std::ostream& out = std::cout) const{
82  out << GetDetID() << " PndSds DigiStrip in sensor: " << GetSensorID() << " FE: "
83  << GetFE() << " Channel: " << GetChannel()
84  << " charge: " << GetCharge() << " (e or tot)"
85  << " timestamp: "<< GetTimeStamp()
86  << ", from Point(s): ";
87  std::vector<Int_t>indices = GetIndices();
88  for (unsigned int i = 0; i < indices.size(); i++){
89  out << indices[i] << " ";
90  }
91  out << std::endl;
92  return out;
93  }
94 
95  #ifndef __CINT__ // for BOOST serialization
96  template<class Archive>
97  void serialize(Archive & ar, const unsigned int version)
98  {
99  boost::serialization::void_cast_register<PndSdsDigiStrip, PndSdsDigi>();
100  ar & boost::serialization::base_object<PndSdsDigi>(*this);
101  ar & fChannel;
102  }
103  #endif // for BOOST serialization
104 
105  private :
106 
107  #ifndef __CINT__ // for BOOST serialization
109  #endif // for BOOST serialization
110 
111  Int_t fChannel;
112 
114  };
115 
116 #endif
std::ostream & Print(std::ostream &out=std::cout) const
PndSdsDigiStrip & operator=(const PndSdsDigiStrip &strip)
friend class boost::serialization::access
TClonesArray * digi
Int_t GetSensorID() const
Definition: PndSdsDigi.h:59
Base class for Digi information.
Definition: PndSdsDigi.h:29
Int_t fSensorID
Definition: PndSdsDigi.h:112
Int_t i
Definition: run_full.C:25
virtual bool operator<(const PndSdsDigiStrip &myDigi) const
Class for digitised strip hits.
Double_t GetCharge() const
Definition: PndSdsDigi.h:60
Int_t GetFE() const
Definition: PndSdsDigi.h:57
Int_t fDetID
Definition: PndSdsDigi.h:111
Double_t
friend std::ostream & operator<<(std::ostream &out, const PndSdsDigiStrip &digi)
TFile * out
Definition: reco_muo.C:20
Bool_t operator==(const PndSdsDigiStrip &d2) const
Int_t fFE
Definition: PndSdsDigi.h:113
void serialize(Archive &ar, const unsigned int version)
ClassDef(PndSdsDigiStrip, 6)
Frontend Channel.
std::vector< Int_t > GetIndices() const
Definition: PndSdsDigi.h:62
Int_t GetDetID() const
Definition: PndSdsDigi.h:61
int fe
Definition: anaLmdDigi.C:67
Int_t GetChannel() const
virtual bool equal(FairTimeStamp *data)