20 mFile =
new TFile (fFileName.c_str(),
"RECREATE");
25 for (
size_t i = 0;
i <
mTrees.size(); ++
i) {
35 TDirectory* currentDirectory = gDirectory;
39 mTrees.push_back (
new TTree (fName.c_str(), fName.c_str()));
43 std::cerr <<
"HPDNoiseMaker::addHpd-> Can not make branch HPDNoiseData to the tree " << fName << std::endl;
45 currentDirectory->cd();
50 float fIonFeedbackFirstPeakRate,
float fIonFeedbackSecondPeakRate,
float fElectronEmissionRate) {
51 mCatalog->
setRate (fName, fDischargeRate, fIonFeedbackFirstPeakRate, fIonFeedbackSecondPeakRate, fElectronEmissionRate);
55 for (
size_t i = 0;
i <
mNames.size(); ++
i) {
67 branch->SetAddress(&data);
72 <<
" in the tree" << std::endl;
78 for (
size_t i = 0;
i <
mNames.size(); ++
i) {
HPDNoiseDataCatalog * mCatalog
void setRate(const std::string &fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate)
set discharge/IonFeedback/Electron emission noise rates
std::vector< std::string > mNames
HPDNoiseMaker(const std::string &fFileName)
std::vector< TTree * > mTrees
static const char * objectName()
object name
static const char * className()
class name
static const char * branchName()
branch name
unsigned long totalEntries(const std::string &mName) const
get number of stored events by HPD index
void addHpd(const std::string &fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate)
add new HPD instance to the catalog
void newHpdEvent(const std::string &mName, const HPDNoiseData &mData)
add new HPD noise event by HPD name
void setRate(const std::string &fName, float fDischargeRate, float fIonFeedbackFirstPeakRate, float fIonFeedbackSecondPeakRate, float fElectronEmissionRate)
set noise rate for the instance by using different processes
int addHpd(const std::string &fName)
define new HPD instance