12#include "FairRootManager.h"
29 , fEventRate(eventRate)
36 if (
fTimeDist == TimeDist::Poisson && eventRate > 0.) {
37 Double_t mean = 1.e9 / eventRate;
38 fDeltaDist =
new TF1(
"DeltaDist",
"exp(-x/[0])/[0]", 0., 10. * mean,
"NL");
50 for (
auto const& entry :
fInputs)
51 if (entry.second)
delete entry.second;
61 for (
auto const& mapEntry :
fInputs) {
64 input->
GetChain()->SetBranchStatus(branchName, 1);
65 input->
GetChain()->SetBranchAddress(branchName,
object);
79 LOG(fatal) <<
"MCInputSet: invalid chain for input ID " << inputId <<
"!";
85 LOG(fatal) <<
"MCInputSet: input ID " << inputId <<
" is already defined!";
98 LOG(fatal) <<
"MCInputSet: Incompatible branch list!";
115 Bool_t success = kTRUE;
119 LOG(debug) <<
"MCInputSet: Required branch " << entry <<
" not present in input!";
126 std::stringstream ss;
127 ss <<
"MCInputSet: Reference branch list is ";
130 LOG(info) << ss.str();
131 std::stringstream ss1;
132 ss1 <<
"MCInputSet: Input branch list is ";
135 LOG(info) << ss1.str();
154 else if (
fTimeDist == TimeDist::Uniform) {
171 for (
auto const& entry :
fInputs) {
172 Int_t test = entry.second->GetMaxNofEvents();
173 LOG(info) <<
"MCInputSet: Max. number of events for input " << entry.first <<
" is " << test;
174 if (test >= 0 && (minimum == -1 || test < minimum)) minimum = test;
178 LOG(info) <<
"MCInputSet: Maximal number of events is " << minimum;
190 Bool_t allInputsUsed = kFALSE;
200 allInputsUsed = kTRUE;
204 return std::make_tuple(allInputsUsed, inputId, entry);
212 for (
auto const& mapEntry :
fInputs) {
213 FairRootManager::Instance()->SetInChain(mapEntry.second->GetChain(), mapEntry.first);
ClassImp(CbmConverterManager)
ECbmTreeAccess
Mode to read entries from a ROOT TTree.