58 file =
new std::fstream();
62 if (!filedir.IsNull()) {
63 filename = filedir +
"/" + fname;
67 filename = filename.Strip();
68 if (strcmp(status,
"in") == 0) {
69 file->open(filename, ios::in);
72 if (strcmp(status,
"out") == 0) {
73 file->open(filename, ios::in);
77 file->open(filename, ios::out);
81 Error(
"open",
"Output file %s exists already and will not be recreated.", filename.Data());
85 Error(
"open",
"Invalid file option!");
88 if (file->rdbuf()->is_open() == 0) {
89 Fatal(
"open",
"Failed to open file %s", filename.Data());
98 if (file && file->rdbuf()->is_open() == 1) {
107 if (
isOpen() && writable) {
127 cout <<
"Open output file: " << filename << endl;
129 cout <<
"Open input file: " << filename << endl;
132 cout <<
"No file open." << endl;
139 if (!
isOpen() || writable || media == 0) {
149 if (!
isOpen() || writable || set == 0) {
152 set->
read(*file, media);
159 if (!
isOpen() || !writable || media == 0) {
169 if (!
isOpen() || !writable || set == 0) {
179 if (!
isOpen() || writable || interface == 0) {
183 TString simRefRun, historyDate;
185 while (!(*file).eof()) {
188 if (!
buf.IsNull() &&
buf(0, 2) !=
"//" &&
buf(0, 1) !=
"*") {
189 if (
buf.Contains(
".geo") ||
buf.Contains(
"_gdb")) {
192 if (
buf.Contains(
".setup")) {
195 if (
buf.Contains(
"SimulRefRunDb:")) {
196 k =
buf.Last(
' ') + 1;
198 simRefRun =
buf(k,
buf.Length() - k);
201 if (
buf.Contains(
"HistoryDateDb:")) {
202 k =
buf.First(
' ') + 1;
203 if (
buf.Length() > k) {
204 historyDate =
buf(k,
buf.Length() - k);
205 historyDate = historyDate.Strip(historyDate.kBoth);
216 if (historyDate.Length() > 0) {
219 if (rc && simRefRun.Length() > 0) {
229 if (!
isOpen() || writable || interface == 0) {
232 const Int_t maxbuf = 256;
236 Int_t maxModules = 0, secNo = -1;
238 const char d[] =
" ";
239 while (!(*file).eof()) {
240 (*file).getline(
buf, maxbuf);
241 if (strlen(
buf) >= 3 &&
buf[1] !=
'/') {
247 Ssiz_t
n =
s.First(
']');
252 Error(
"readDetectorSetup",
"Detector %s not found", det.Data());
257 mod =
new Int_t[maxModules];
260 char* ss = strtok(
buf,
d);
261 if (ss && strlen(ss) > 3) {
262 secNo =
static_cast<Int_t
>(ss[3] -
'0') - 1;
263 for (Int_t
i = 0;
i < maxModules && mod;
i++) {
264 ss = strtok(
nullptr,
d);
266 sscanf(ss,
"%i", &mod[
i]);
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h configStandalone Internal display display_internal Number of updates the Qt GUI may send ahead of the last one the display has before it waits for the display Opacity of the console background Number of console lines the history is shortened to this when it reaches twice the size Time in seconds an info message fades out after setInfoTime h OpenGL display display Font size Do not use Freetype for font Renderer for event Frontend to use for event ROOT macros used as track filter Console script file
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
Bool_t readGeomConfig(FairGeoInterface *)
virtual ~FairGeoAsciiIo()
Bool_t read(FairGeoMedia *)
Bool_t open(const char *, const Text_t *status="in")
Bool_t write(FairGeoMedia *)
Bool_t readDetectorSetup(FairGeoInterface *)
FairGeoSet * findSet(const char *)
void addInputFile(const char *)
void addSetupFile(const char *f)
FairGeoIo * getOraInput()
virtual Bool_t setHistoryDate(const char *)=0
virtual Bool_t setSimulRefRun(const char *)=0
Int_t getMaxModules(void)
void setModules(Int_t, Int_t *)
virtual void write(std::fstream &)
virtual Bool_t read(std::fstream &, FairGeoMedia *)
GLenum GLuint GLenum GLsizei const GLchar * buf