#include "TG4Globals.h"
#include <G4VProcess.hh>
+#include <g4std/strstream>
#include <math.h>
}
//_____________________________________________________________________________
-void TG4G3ControlVector::Print() const
+G4String TG4G3ControlVector::Format() const
{
-// Prints the controls.
+// Formats the output into a string.
// ---
- G4cout << " G3 control vector:" << G4endl;
+ strstream tmpStream;
+
+ tmpStream << " G3 control vector:" << G4endl;
for (G4int i=0; i<kNoG3Controls; i++)
//if (i != kDRAY) {
- G4cout << " " << fgControlNameVector[i]
- << " control value: " << fControlVector[i] << G4endl;
+ tmpStream << " " << fgControlNameVector[i]
+ << " control value: " << fControlVector[i] << G4endl;
//}
+
+ return tmpStream.str();
+}
+
+//_____________________________________________________________________________
+void TG4G3ControlVector::Print() const
+{
+// Prints the controls.
+// ---
+
+ G4cout << Format();
}
//_____________________________________________________________________________