96{
97
98 std::string nRun = std::to_string(runNumber);
99 std::string nEvent = std::to_string(eventNumber);
100
101
102
103
104
105
106
107
108
109 std::string commandStr;
110
111
112 commandStr += "nRun="+nRun+"; ";
113 commandStr += "nEvent="+nEvent+"; ";
114 if (humanTimestamp != "0") commandStr += "timestamp='"+humanTimestamp+"'; ";
115
116
117 commandStr += "img=`cat latest_vp1image`; ";
118 commandStr += "width=$(identify -format %W ${img}); ";
119 commandStr += "width=$(( ${width} * 3 / 10 )); ";
120
121
122 commandStr = commandStr
123 + "convert "
124 + "-background '#0008' "
125 + "-geometry +20+20 "
126 + "-gravity West "
127 + "-fill white "
128 + "-size ${width}x80 "
129
130 + "-font Courier "
131 + "-density 72 "
132 + "-pointsize 18 "
133
134
135
136
137 + "caption:'Run number: '${nRun}'\\nEvent number: '${nEvent}'\\n'${timestamp} "
138
139 + "${img} "
140 + "+swap "
141 + "-gravity SouthEast "
142 + "-composite "
143 + "${img}";
144
145
146 std::cout << " ===> overlay the event details: " << commandStr << std::endl;
147 try {
148 system(commandStr.c_str());
149 } catch (std::runtime_error& err) {
150 std::cout <<
"Exception caught: " <<
err.what() << std::endl;
151 std::cout << "Unable to run 'convert'!" << std::endl;
152 }
153}