17 #include <TClonesArray.h>
20 :
FairTask(
"TutorialDetDigitizer", 0)
21 , fTutorialDetPoints(nullptr)
28 , fTutorialDetPoints(nullptr)
43 LOG(debug) <<
"FairTutorialDet2Digitizer :: SetParContainers() ";
57 LOG(info) <<
" FairTutorialDet2Digitizer :: ReInit() ";
69 LOG(debug) <<
" FairTutorialDet2Digitizer :: Init() ";
73 LOG(fatal) <<
"No FairRootManager";
76 fTutorialDetPoints =
static_cast<TClonesArray*
>(ioman->
GetObject(
"TutorialDetPoint"));
77 if (!fTutorialDetPoints) {
78 LOG(error) <<
"No TutorialDetPoints array!";
79 LOG(error) <<
"Task will be inactive";
80 LOG(info) <<
" Task FairTutorialDet2Digitizer will be inactive, No TutorialDetPoints";
84 fCustomData = ioman->
InitObjectAs<std::vector<CustomClass>
const*>(
"TutorialCustomData");
86 LOG(error) <<
"Custom Data cannot be created!";
87 LOG(error) <<
"Task will be inactive";
88 LOG(info) <<
" Task FairTutorialDet2Digitizer will be inactive, No Custom Data Vector";
110 LOG(debug) <<
" I am in FairTutorialDet2Digitizer::Exec";
112 LOG(debug) <<
" The custom data input vector has size" << fCustomData->size() <<
"\n";
114 for (
auto& entry : *fCustomData) {
115 LOG(debug) <<
" Got entry " << entry.GetX() <<
" " << entry.GetQ() <<
"\n";
117 fCustomData2->emplace_back(entry.GetX() * 2, entry.GetQ() * 10);
190 LOG(info) <<
"Digitizer::Register\n";
list of container factories
virtual InitStatus ReInit()
virtual ~FairTutorialDet2Digitizer()
virtual void printparams()
virtual void Exec(Option_t *option)
T InitObjectAs(const char *BrName)
virtual InitStatus Init()
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
TObject * GetObject(const char *BrName)
FairParSet * getContainer(const Text_t *)
static FairRunAna * Instance()
FairTutorialDet2Digitizer()
FairRuntimeDb * GetRuntimeDb(void)
virtual void SetParContainers()
void RegisterAny(const char *name, T *&obj, Bool_t toFile)