21 mFile =
new TFile (fFileName.c_str(),
"RECREATE");
26 for (
size_t i = 0;
i <
mTrees.size(); ++
i) {
36 TDirectory* currentDirectory = gDirectory;
40 mTrees.push_back (
new TTree (fName.c_str(), fName.c_str()));
44 std::cerr <<
"HPDNoiseMaker::addHpd-> Can not make branch HPDNoiseData to the tree " << fName << std::endl;
46 currentDirectory->cd();
51 float fIonFeedbackFirstPeakRate,
float fIonFeedbackSecondPeakRate,
float fElectronEmissionRate) {
52 mCatalog->
setRate (fName, fDischargeRate, fIonFeedbackFirstPeakRate, fIonFeedbackSecondPeakRate, fElectronEmissionRate);
56 for (
size_t i = 0;
i <
mNames.size(); ++
i) {
68 branch->SetAddress(&data);
73 <<
" in the tree" << std::endl;
79 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
char data[epos_bytes_allocation]
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