#include <RecoControl.h>
Public Types | |
| enum | rectype { NONE, GEOM, GEVT } |
Public Member Functions | |
| RecoControl () | |
| void | init (const char *, int) |
| virtual | ~RecoControl () |
| void | clear () |
| rectype | nextRecord () |
| void | reconstruction () |
| void | setOutputFile (const char *) |
| void | setInputFile (const char *) |
| void | setDstFile (const char *) |
| void | closeAll () |
| int | eof () |
| const char * | eventTitle () |
| void | setPrintStream (ostream *o) |
| void | printEvent () |
| virtual void | giveEventTo (REROOT_Visitor &) |
| virtual void | giveGeomTo (REROOT_Visitor &) |
| REROOT_Event * | curevent () |
| REROOT_Geom * | curgeom () |
Private Attributes | |
| const char * | _iniFile |
| const char * | _inputFileName |
| int | _nevtot |
| long | _record |
| REROOT_Event * | _curevent |
| REROOT_Geom * | _curgeom |
| ADAMO_Shell * | _ads |
| istream * | _inputStream |
| ostream * | _outputStream |
| ostream * | _tupleFile |
| ostream * | pstream |
|
|
Definition at line 25 of file RecoControl.h. Referenced by nextRecord(). 00025 {NONE, GEOM, GEVT};
|
|
|
Definition at line 10 of file RecoControl.cxx. 00010 : 00011 _iniFile(0) 00012 , _inputFileName(0) 00013 , _nevtot(0) 00014 , _record(0) 00015 , _curevent(0) 00016 , _curgeom(0) 00017 , _ads(0) 00018 , _inputStream(0) 00019 , _outputStream(0) 00020 , _tupleFile(0) 00021 , pstream(&cout) 00022 {}
|
|
|
Definition at line 24 of file RecoControl.cxx. References closeAll(). 00025 {
00026 closeAll();
00027 delete _curevent;
00028 delete _curgeom;
00029 delete _ads;
00030 }
|
|
|
Definition at line 81 of file RecoControl.cxx. 00082 {
00083 }
|
|
|
Definition at line 59 of file RecoControl.cxx. References _inputStream, _outputStream, and _tupleFile. Referenced by ~RecoControl(). 00060 {
00061 if ( _inputStream ) {
00062 delete _inputStream;
00063 _inputStream = 0;
00064 }
00065 if ( _outputStream ) {
00066 delete _outputStream;
00067 _outputStream=0;
00068 }
00069 if ( _tupleFile ) {
00070 delete _tupleFile;
00071 _tupleFile=0;
00072 }
00073 }
|
|
|
Definition at line 55 of file RecoControl.h. Referenced by processSingleFile(). 00055 {return _curevent;}
|
|
|
Definition at line 56 of file RecoControl.h. Referenced by processSingleFile(). 00056 {return _curgeom;}
|
|
|
Definition at line 118 of file RecoControl.cxx. References _inputStream. 00119 {
00120 return (_inputStream==0)? 0 : _inputStream->eof();
00121 }
|
|
|
|
|
|
Definition at line 140 of file RecoControl.cxx. References _curevent, and REROOT_Event::accept(). Referenced by processSingleFile().
|
|
|
Definition at line 145 of file RecoControl.cxx. References _curgeom, and REROOT_Geom::accept(). Referenced by processSingleFile().
|
|
||||||||||||
|
Definition at line 32 of file RecoControl.cxx. References _ads, _iniFile, and _nevtot. Referenced by processSingleFile(). 00033 {
00034 _iniFile = infile;
00035 _nevtot = nevtot;
00036
00037 if (!_ads) _ads = new ADAMO_Shell();
00038 }
|
|
|
Definition at line 85 of file RecoControl.cxx. References _ads, _curevent, _curgeom, _iniFile, REROOT_Geom::fill_objects_from_GAF(), REROOT_Event::fill_objects_from_GAF(), ADAMO_Shell::gettab(), ADAMO_Shell::read(), rectype, REROOT_Event::Set_curevent(), and REROOT_Geom::Set_curgeom(). Referenced by processSingleFile(). 00086 {
00087
00088 // Get next ADAMO record from input file.
00089 if (_ads->read(_iniFile))
00090 return NONE;
00091
00092 // Construct new current Event object from new GAF record.
00093 if (!strncmp((_ads->gettab((GAFKEY_DEF *) 0,1))->Type,"GEVT",4)) {
00094 // cout << "RecoControl::nextEvent: Accept GEVT record" << "\n";
00095 delete _curevent;
00096 _curevent = new REROOT_Event;
00097 _curevent->fill_objects_from_GAF(_ads);
00098 REROOT_Event::Set_curevent(_curevent);
00099 return GEVT;
00100 }
00101
00102 // Construct new current Geom object from new GAF record.
00103 else if (!strncmp((_ads->gettab((GAFKEY_DEF *) 0,1))->Type,"GEOM",4)) {
00104 // cout << "RecoControl::nextEvent: Accept GEOM record" << "\n";
00105 delete _curgeom;
00106 _curgeom = new REROOT_Geom;
00107 _curgeom->fill_objects_from_GAF(_ads);
00108 REROOT_Geom::Set_curgeom(_curgeom);
00109 return GEOM;
00110 }
00111 else {
00112 cout << "RecoControl::nextEvent: Skip unknown record" << "\n";
00113 return NONE;
00114 }
00115 return NONE;
00116 }
|
|
|
Definition at line 135 of file RecoControl.cxx. 00136 {
00137 // if (_curevent) _curevent->printEvent(*pstream);
00138 }
|
|
|
Definition at line 130 of file RecoControl.cxx. Referenced by processSingleFile(). 00131 {
00132 }
|
|
|
Definition at line 75 of file RecoControl.cxx. References _tupleFile. 00076 {
00077 if ( strcmp(fileName, "cout")==0 ) _tupleFile = &cout;
00078 else _tupleFile = new ofstream(fileName);
00079 }
|
|
|
Definition at line 46 of file RecoControl.cxx. References _inputFileName, _inputStream, and _record. 00047 {
00048 if ( _inputStream ) delete _inputStream;
00049 _inputFileName = fileName;
00050 _inputStream = new ifstream(fileName);
00051 _record = 0;
00052 if ( ! _inputStream ) {
00053 // gmi WARNING("Cant read from file");
00054 delete _inputStream;
00055 _inputStream = 0;
00056 }
00057 }
|
|
|
Definition at line 40 of file RecoControl.cxx. References _outputStream. 00041 {
00042 if ( _outputStream ) delete _outputStream;
00043 _outputStream = new ofstream(fileName);
00044 }
|
|
|
Definition at line 49 of file RecoControl.h. 00049 {pstream = o;}
|
|
|
Definition at line 70 of file RecoControl.h. Referenced by init(), and nextRecord(). |
|
|
Definition at line 66 of file RecoControl.h. Referenced by giveEventTo(), and nextRecord(). |
|
|
Definition at line 67 of file RecoControl.h. Referenced by giveGeomTo(), and nextRecord(). |
|
|
Definition at line 60 of file RecoControl.h. Referenced by init(), and nextRecord(). |
|
|
Definition at line 61 of file RecoControl.h. Referenced by setInputFile(). |
|
|
Definition at line 73 of file RecoControl.h. Referenced by closeAll(), eof(), and setInputFile(). |
|
|
Definition at line 62 of file RecoControl.h. Referenced by init(). |
|
|
Definition at line 74 of file RecoControl.h. Referenced by closeAll(), and setOutputFile(). |
|
|
Definition at line 63 of file RecoControl.h. Referenced by setInputFile(). |
|
|
Definition at line 75 of file RecoControl.h. Referenced by closeAll(), and setDstFile(). |
|
|
Definition at line 76 of file RecoControl.h. |
1.3.9.1