1 #include "ERGadastDigiPar.h" 3 #include "FairParamList.h" 4 #include "FairDetParIo.h" 6 #include "FairGenericParAsciiFileIo.h" 7 #include "FairGenericParRootFileIo.h" 8 #include "FairParAsciiFileIo.h" 9 #include "FairParRootFileIo.h" 25 : FairParGenericSet(name, title, context),
28 fCsILC(new TArrayF(64)),
29 fLaBrLC(new TArrayF(4)),
30 fCsIDispA(new TArrayF(64)),
31 fLaBrDispA(new TArrayF(4)),
32 fCsIDispB(new TArrayF(64)),
33 fLaBrDispB(new TArrayF(4))
59 std::cout <<
"*****************************************" << std::endl;
60 std::cout <<
" ERGadastDigiPar " << std::endl;
61 std::cout <<
"*****************************************" << std::endl;
62 std::cout <<
" ERGadastCsIMECount: " << fCsIMECount << std::endl;
63 std::cout <<
" ERGadastLaBrMECount: " << fLaBrMECount << std::endl;
64 std::cout <<
"*****************************************" << std::endl;
65 std::cout <<
" ERGadastCsILC: " << std::endl;
66 for (Int_t iElement = 0; iElement < 16; iElement++){
68 for (Int_t jElement = 0; jElement < 4; jElement++)
69 std::cout <<(*fCsILC)[iElement*4 + jElement] <<
"\t";
70 std::cout << std::endl;
72 std::cout <<
"*****************************************" << std::endl;
73 std::cout <<
" ERGadastCsIDispA: " << std::endl;
74 for (Int_t iElement = 0; iElement < 16; iElement++){
76 for (Int_t jElement = 0; jElement < 4; jElement++)
77 std::cout <<(*fCsIDispA)[iElement*4 + jElement] <<
"\t";
78 std::cout << std::endl;
80 std::cout <<
"*****************************************" << std::endl;
81 std::cout <<
" ERGadastCsIDispB: " << std::endl;
82 for (Int_t iElement = 0; iElement < 16; iElement++){
84 for (Int_t jElement = 0; jElement < 4; jElement++)
85 std::cout <<(*fCsIDispB)[iElement*4 + jElement] <<
"\t";
86 std::cout << std::endl;
88 std::cout <<
"*****************************************" << std::endl;
89 std::cout <<
" ERGadastLaBrLC: " << std::endl;
90 for (Int_t iElement = 0; iElement < 4; iElement++){
91 std::cout <<(*fLaBrLC)[iElement] <<
"\t";
93 std::cout << std::endl;
94 std::cout <<
"*****************************************" << std::endl;
95 std::cout <<
" ERGadastLaBrDispA: " << std::endl;
96 for (Int_t iElement = 0; iElement < 4; iElement++){
97 std::cout <<(*fLaBrDispA)[iElement] <<
"\t";
99 std::cout << std::endl;
100 std::cout <<
"*****************************************" << std::endl;
101 std::cout <<
" ERGadastLaBrDispB: " << std::endl;
102 for (Int_t iElement = 0; iElement < 4; iElement++){
103 std::cout <<(*fLaBrDispB)[iElement] <<
"\t";
105 std::cout << std::endl;
106 std::cout <<
"*****************************************" << std::endl;
109 void ERGadastDigiPar::putParams(FairParamList* l)
111 cout <<
" I am in ERGadastDigiPar::putParams " << endl;
114 Bool_t ERGadastDigiPar::getParams(FairParamList* l)
116 if (!l) {
return kFALSE; }
118 if ( ! l->fill(
"ERGadastCsIMECount", &fCsIMECount) ) {
return kFALSE; }
119 if ( ! l->fill(
"ERGadastLaBrMECount", &fLaBrMECount) ) {
return kFALSE; }
121 fCsILC->Set(fCsIMECount);
122 if ( ! l->fill(
"ERGadastCsILC", fCsILC) ) {
return kFALSE; }
124 fLaBrLC->Set(fLaBrMECount);
125 if ( ! l->fill(
"ERGadastLaBrLC", fLaBrLC) ) {
return kFALSE; }
127 fCsIDispA->Set(fCsIMECount);
128 if ( ! l->fill(
"ERGadastCsIDispA", fCsIDispA) ) {
return kFALSE; }
130 fLaBrDispA->Set(fLaBrMECount);
131 if ( ! l->fill(
"ERGadastLaBrDispA", fLaBrDispA) ) {
return kFALSE; }
133 fCsIDispB->Set(fCsIMECount);
134 if ( ! l->fill(
"ERGadastCsIDispB", fCsIDispB) ) {
return kFALSE; }
136 fLaBrDispB->Set(fLaBrMECount);
137 if ( ! l->fill(
"ERGadastLaBrDispB", fLaBrDispB) ) {
return kFALSE; }
143 std::cout << input->getFilename() << std::endl;
144 if ( TString(input->getFilename()).Contains(
".digi")){
145 FairGenericParAsciiFileIo* p=
new FairGenericParAsciiFileIo(((FairParAsciiFileIo*)input)->getFile());
146 return p->init(
this);
148 if ( TString(input->getFilename()).Contains(
".root")){
149 FairGenericParRootFileIo* p=
new FairGenericParRootFileIo(((FairParRootFileIo*)input)->getParRootFile());
150 return p->init(
this);
virtual Bool_t init(FairParIo *input)
virtual ~ERGadastDigiPar()
ERGadastDigiPar(const char *name="ERGadastDigiPar", const char *title="ERGadast Digitization Parameters", const char *context="Default")