GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TEaglePulser.cxx
Go to the documentation of this file.
1#include "TEaglePulser.h"
2
3#include "TClass.h"
4#include <cmath>
5#include "TMath.h"
6
7#include "TGRSIOptions.h"
8
13
15
17{
18 rhs.Copy(*this);
19 return *this;
20}
21
23{
24 rhs.Copy(*this);
25}
26
27void TEaglePulser::AddFragment(const std::shared_ptr<const TFragment>& frag, TChannel* chan)
28{
29
30 /// This function creates TEaglePulserHits for each fragment and stores them in separate front and back vectors
31 if(frag == nullptr || chan == nullptr) {
32 return;
33 }
34
35 auto hit = new TDetectorHit(*frag);
36 Hits().push_back(hit);
37}
38
39void TEaglePulser::Print(Option_t*) const
40{
41 /// Prints out TEaglePulser information
42 Print(std::cout);
43}
44
45void TEaglePulser::Print(std::ostream& out) const
46{
47 /// Prints TEaglePulser information to out
48 std::ostringstream str;
49 str << this << ": " << Hits().size() << " hits" << std::endl;
50 for(const auto& hit : Hits()) {
51 hit->Print(str);
52 }
53 str << "----------------------------------------" << std::endl;
54 out << str.str();
55}
void Copy(TObject &) const override
!
Definition TDetector.cxx:24
void Clear(Option_t *="") override
!
Definition TDetector.cxx:54
std::vector< TDetectorHit * > & Hits()
Definition TDetector.h:78
~TEaglePulser() override
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
void Print(Option_t *opt="") const override
!
TEaglePulser & operator=(const TEaglePulser &)