39 detectors=
new TList();
48 if (shapes) {
delete shapes; shapes = 0; }
59 return ((
HDetector*)detectors->FindObject(name));
67 TIter next(detectors);
70 if (!det->
init())
return kFALSE;
79 const Char_t* ioName=io->IsA()->GetName();
80 if (strcmp(ioName,
"HParOraIo")==0) {
84 if (strcmp(ioName,
"HParRootFileIo")==0) {
91 if (strcmp(ioName,
"HParAsciiFileIo")==0) {
100 TIter next(detectors);
111 if (io)
return write(io);
112 cerr<<
"actual setup couldn't be written to output"<<endl;
118 TIter next(detectors);
122 if (det->
write(io)==kFALSE) rc=kFALSE;
124 if (rc==kTRUE) changed=kFALSE;
125 else cerr<<
"actual setup couldn't be written to output"<<endl;
136 cout<<
"Actual setup for Hades Spectrometer:"<<
"\n";
137 TIter next(detectors);
144 void HSpectrometer::Streamer(TBuffer &R__b)
148 if (R__b.IsReading()) {
149 Version_t R__v = R__b.ReadVersion();
if (R__v) { }
150 TObject::Streamer(R__b);
153 if (detectors->GetSize() == 0) {
154 printf(
" detectors list empty ! \n");
158 R__b.WriteVersion(HSpectrometer::IsA());
159 TObject::Streamer(R__b);
HGeomShapes * getShapes()
void activateParIo(HParIo *io)
virtual Bool_t write(HParIo *)
HRuntimeDb * getRuntimeDb(void)
virtual void setDetParIo(HDetParIo *)
void addDetector(HDetector *det)
virtual void activateParIo(HParIo *)
HDetector * getDetector(const Char_t *name)
ClassImp(HSpectrometer) HSpectrometer
virtual Bool_t init(void)