127 Bool_t initOK {kTRUE};
130 fRunId = fConfig->GetValue<
string>(
"run-id");
131 fvmcworkdir = fConfig->GetValue<
string>(
"vmcworkdir");
134 LOG(info) <<
"Init parameter containers for CbmDeviceStsLocalReco.";
139 std::string message {
"CbmStsDigitizeParameters,"};
141 LOG(info) <<
"Requesting parameter container CbmStsDigitizeParameters, "
145 FairMQMessagePtr req(NewSimpleMessage(message));
146 FairMQMessagePtr rep(NewMessage());
148 if (Send(req,
"parameters") > 0) {
149 if (Receive(rep,
"parameters") >= 0) {
150 if (rep->GetSize() != 0) {
152 fDigiPar =
dynamic_cast<CbmStsDigitizeParameters*
>(tmsg.ReadObject(tmsg.GetClass()));
153 LOG(info) <<
"Received unpack parameter from parmq server: " <<
fDigiPar;
159 throw InitTaskError(
"Received empty reply. Parameter not available");
164 std::string message1 {
"FairGeoParSet,"};
166 LOG(info) <<
"Requesting parameter container FairGeoParSet, sending message: " << message1;
168 FairMQMessagePtr req1(NewSimpleMessage(message1));
169 FairMQMessagePtr rep1(NewMessage());
171 if (Send(req1,
"parameters") > 0) {
172 if (Receive(rep1,
"parameters") >= 0) {
173 if (rep1->GetSize() != 0) {
175 fGeoPar =
static_cast<FairGeoParSet*
>(tmsg.ReadObject(tmsg.GetClass()));
176 LOG(info) <<
"Received unpack parameter from parmq server: " <<
fGeoPar;
178 if (!gGeoManager) {
throw InitTaskError(
"No gGeoManager found in FairGeoParSet"); }
180 gGeoManager->Print();
184 throw InitTaskError(
"Received empty reply. Parameter not available");
189 std::string message2 {
"CbmFieldPar,"};
191 LOG(info) <<
"Requesting parameter container CbmFieldPar, sending message: " << message2;
193 FairMQMessagePtr req2(NewSimpleMessage(message2));
194 FairMQMessagePtr rep2(NewMessage());
196 if (Send(req2,
"parameters") > 0) {
197 if (Receive(rep2,
"parameters") >= 0) {
198 if (rep2->GetSize() != 0) {
201 LOG(info) <<
"Received unpack parameter from parmq server: " <<
fGeoPar;
205 LOG(info) <<
"Before creating the field";
207 LOG(info) <<
"After creating the field";
208 FairRunAna* run =
new FairRunAna();
209 run->SetField(field);
213 LOG(error) <<
"Received empty reply. Parameter not available";