19 : fE1(kInvalidD), fE2(kInvalidD),
20 fP1(kInvalidD), fP2(kInvalidD),
21 fTiming(kInvalidD), fTVec() {
22 TDataObject::SetID(kInvalidI);
39 TDataObject::operator=(rhs);
51 TDataObject::Copy(dest);
52 auto *cobj =
dynamic_cast<TMUXData *
>(&dest);
54 cobj->fE1 = this->
GetE1();
55 cobj->fE2 = this->
GetE2();
56 cobj->fP1 = this->
GetP1();
57 cobj->fP2 = this->
GetP2();
58 cobj->fTiming = this->
GetTrig();
59 cobj->fTVec = this->
fTVec;
61 Error(
"Copy",
"Cannot cast TObject to TMUXData.");
66 TDataObject::Clear(opt);
67 TDataObject::SetID(kInvalidI);
74 fTVec.shrink_to_fit();
78 fTVec.emplace_back(value);
82 if (index >= 0 && index <
static_cast<Int_t
>(
fTVec.size())) {
ClassImp(art::crib::TMUXData)
ROOT macro for class implementation.
Header file for the TMUXData class.
Represents data from the MUX module (E1, E2, P1, P2, T).
Double_t fP2
Second position value.
Double_t fP1
First position value.
Double_t GetE1() const
Get the first energy value.
std::vector< Double_t > fTVec
Vector of timing values from MHTDC.
Double_t GetP2() const
Get the second position value.
Double_t fE2
Second energy value.
void PushTiming(Double_t value)
Add a new timing value.
void Copy(TObject &dest) const override
Copy the contents of this object to another TObject.
~TMUXData() override
Destructor.
Double_t GetP1() const
Get the first position value.
Double_t fE1
First energy value.
Double_t fTiming
Timing value for the trigger.
void Clear(Option_t *opt="") override
Clear the object's contents.
Double_t GetT(Int_t index=0) const
Get the timing value at a specific index.
Double_t GetE2() const
Get the second energy value.
TMUXData & operator=(const TMUXData &rhs)
Copy assignment operator.
Double_t GetTrig() const
Get the timing value.