40 #ifndef WAVEDESCRIPTION_H
41 #define WAVEDESCRIPTION_H
51 #include "libconfig.h++"
86 const bool fromTemplate =
false)
const;
94 const bool writeProdVert =
true);
98 const bool writeProdVert =
true);
102 const bool newConvention =
false,
121 const std::string& vertType,
128 const bool requirePartInTable =
true);
132 std::vector<isobarDecayVertexPtr>& decayVertices,
133 std::vector<particlePtr>& fsParticles,
134 const bool fromTemplate =
false);
145 static bool setXDecayKeys(libconfig::Setting& parentDecayKey,
150 const bool setProdVert =
true);
151 static bool setAmplitude(libconfig::Setting& amplitudeKey,
155 const bool setProdVert =
true);
158 const bool writeProdVert =
true);
161 const bool writeProdVert =
true);
171 static std::map<std::string, std::string>
isobars;
184 const bool writeProdVert)
187 int pipeFileDescriptors[2];
188 if (pipe(pipeFileDescriptors) == -1) {
189 printErr <<
"failed to create pipe. cannot write keys." << std::endl;
193 FILE* pipeWriteEnd = fdopen(pipeFileDescriptors[1],
"wt");
195 printErr <<
"could not open write end of pipe. cannot write keys." << std::endl;
199 if (not
writeKeyFile(*pipeWriteEnd, topoOrAmp, writeProdVert)) {
200 printWarn <<
"problems writing keys for decay topology. cannot write keys." << std::endl;
201 fclose(pipeWriteEnd);
204 fclose(pipeWriteEnd);
207 unsigned int countChar = 0;
208 while (read(pipeFileDescriptors[0], &buf, 1) > 0) {
212 close(pipeFileDescriptors[0]);
216 printWarn <<
"nothing was written" << std::endl;
227 const bool writeProdVert)
230 printDebug <<
"writing key file '" << keyFileName <<
"'" << std::endl;
231 std::ofstream outFile(keyFileName.c_str());
233 printErr <<
"cannot create key file '" << keyFileName <<
"'" << std::endl;
240 printWarn <<
"problems writing keys for decay topology. cannot write key file." << std::endl;
250 #endif // WAVEDESCRIPTION_H