DigiSignal.cxx File Reference

#include "DigiSignal.h"
#include "DigiPE.h"
#include "Conventions/Munits.h"
#include "TString.h"

Go to the source code of this file.

Functions

const char * AsString (DigiSignal::DigiPmtTruth_t truth)
std::ostream & operator<< (std::ostream &os, const DigiSignal &s)

Variables

static UInt_t sSignalIdCounter = 0

Function Documentation

const char* AsString ( DigiSignal::DigiPmtTruth_t  truth  ) 

Definition at line 101 of file DigiSignal.cxx.

References CalDetParticleType::AsString(), Form(), DigiSignal::kCrosstalk, DigiSignal::kCrosstalkOptical, DigiSignal::kDarkNoise, CalDetParticleType::kElectron, DigiSignal::kFibreLight, DigiSignal::kGenuine, CalDetParticleType::kKaon, DigiSignal::kLeakFromNextBucket, DigiSignal::kLeakFromPrevBucket, UtilIstHEP::kMDecay, CalDetParticleType::kMuon, UtilIstHEP::kNProdMethod, CalDetParticleType::kPion, UtilIstHEP::kProdMethodOffset, CalDetParticleType::kProton, DigiSignal::kUnknown, and CalDetParticleType::kUnknown.

Referenced by NtpMCStdHep::Print(), PTSimValidate::TestParticle(), and MCAppValidate::TestParticle().

00102 {
00103   // Global function to get a string.
00104 
00105   if(truth == DigiSignal::kUnknown) return "|Unknown|";
00106    
00107    std::string result("|");
00108    if(truth & DigiSignal::kGenuine)            result = result + "Genuine|";
00109    if(truth & DigiSignal::kDarkNoise)          result = result + "DarkNoise|";
00110    if(truth & DigiSignal::kFibreLight)         result = result + "FibreLight|";
00111    if(truth & DigiSignal::kCrosstalk)          result = result + "CrossTalk|";
00112    if(truth & DigiSignal::kCrosstalkOptical)   result = result + "CrossTalkOptical|";
00113    if(truth & DigiSignal::kLeakFromNextBucket) result = result + "LeakFromNextBucket|";
00114    if(truth & DigiSignal::kLeakFromPrevBucket) result = result + "LeakFromPrevBucket|";
00115    // Hack: use ROOT's circular buffer of strings. neat,huh?
00116    return Form("%s",result.c_str()); 
00117 }

std::ostream& operator<< ( std::ostream &  os,
const DigiSignal s 
)

Definition at line 121 of file DigiSignal.cxx.

References DigiSignal::FormatToOStream().

00122 { return s.FormatToOStream(os); }


Variable Documentation

UInt_t sSignalIdCounter = 0 [static]

Definition at line 10 of file DigiSignal.cxx.

Referenced by DigiSignal::DigiSignal().


Generated on 15 Jul 2018 for loon by  doxygen 1.6.1