40 Double_t mean = 1500.0;
41 Double_t sigma = 300.0;
42 UInt_t fV775Dataword = abs( (Int_t)gRandom->Gaus(mean,sigma) );
44 UInt_t fV775SlotNumber = SlotNum;
45 UInt_t fV775ChannelNumber = ChanNum;
46 const UInt_t fV775DataValidBit = 0x00004000;
48 UInt_t word = fV775Dataword | (fV775SlotNumber<<27);
49 word = word | (fV775ChannelNumber<<16) | fV775DataValidBit;
64 localbuf = (Long_t) (this->
fValue);
65 TrigBuffer.push_back(localbuf);
85 if (folder != NULL) folder->cd();
91 TString basename, fullname;
141 std::cerr <<
"QwPMT_Channel::FillTreeVector: fTreeArrayNumEntries=="
144 std::cerr <<
"QwPMT_Channel::FillTreeVector: values.size()=="
146 <<
"; fTreeArrayIndex+fTreeArrayNumEntries=="
159 if (
this != &value) {
197 << std::setw(15) << std::left <<
GetValue()
204 std::cout <<
"QwPMT_Channel::Print() not implemented yet." << std::endl;
Helper functions and utilities for ROOT histogram management.
QwHistogramHelper gQwHists
Globally defined instance of the QwHistogramHelper class.
A logfile class, based on an identical class in the Hermes analyzer.
#define QwMessage
Predefined log drain for regular messages.
ROOT file and tree management wrapper classes.
PMT channel data element for tracking subsystem.
std::vector< TH1_ptr > fHistograms
Histograms associated with this data element.
static std::ostream & endl(std::ostream &)
End of the line.
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)
Construct a ROOT branch and append a value slot to the vector.
void ProcessEvent()
Process the event (no-op for simple PMT channel).
void EncodeEventData(std::vector< UInt_t > &TrigBuffer)
Encode this channel's word into the trigger buffer.
void RandomizeEventData(int helicity, int SlotNum, int ChanNum)
Generate a mock ADC word for testing.
static const Double_t kPMT_VoltsPerBit
QwPMT_Channel & operator-=(const QwPMT_Channel &value)
static const Bool_t kDEBUG
void FillHistograms() override
Fill histograms for this channel if present.
void ClearEventData() override
Clear the event-scoped ADC word value.
void Sum(const QwPMT_Channel &value1, const QwPMT_Channel &value2)
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Create histograms for this channel within an optional folder.
Double_t GetValue() const
void PrintInfo() const override
Print a placeholder info line for this PMT channel.
size_t fTreeArrayNumEntries
void FillTreeVector(QwRootTreeBranchVector &values) const
Write this channel's value into the tree vector slot.
QwPMT_Channel & operator+=(const QwPMT_Channel &value)
void PrintValue() const override
Print a compact value summary for this PMT channel.
QwPMT_Channel()
Default constructor.
void Difference(const QwPMT_Channel &value1, const QwPMT_Channel &value2)
QwPMT_Channel & operator=(const QwPMT_Channel &value)
Copy-assign from another PMT channel (event-scoped data).
A helper class to manage a vector of branch entries for ROOT trees.
size_type size() const noexcept
std::string LeafList(size_type start_index=0) const
void push_back(const std::string &name, const char type='D')
void SetValue(size_type index, Double_t val)
virtual const TString & GetElementName() const
Get the name of this element.
Bool_t IsNameEmpty() const
Is the name of this element empty?
VQwDataElement & operator=(const VQwDataElement &value)
Arithmetic assignment operator: Should only copy event-based data.