75 Error(
"THaApparatus",
"Detector with name %s already exists for this"
76 " apparatus. Not added.", pdet->
GetName() );
110 if( !strchr(opt,
'I') ) {
112 while(
auto* theDetector =
static_cast<THaDetector*
>( next() )) {
114 if(
fDebug>1 ) cout <<
"Clearing " << theDetector->GetName()
117 theDetector->Clear(opt);
119 if(
fDebug>1 ) cout <<
"done.\n" << flush;
131 while(
auto* theDetector =
static_cast<THaDetector*
>( next() )) {
133 if(
fDebug>1 ) cout <<
"Decoding " << theDetector->GetName()
136 theDetector->Decode( evdata );
138 if(
fDebug>1 ) cout <<
"done.\n" << flush;
191 while(
TObject* obj = next() ) {
192 auto* theDetector =
dynamic_cast<THaDetector*
>( obj );
194 Error(
Here(
"Init()"),
"Detector %s (\"%s\") is not a THaDetector. "
195 "Initialization of apparatus %s (\"%s\") failed.",
200 if(
fDebug>0 ) cout <<
"Initializing "
201 << theDetector->GetName() <<
"... "
204 theDetector->Init( run_time );
206 if(
fDebug>0 ) cout <<
"done.\n" << flush;
208 if( !theDetector->IsOK() ) {
209 Error(
Here(
"Init()"),
"While initializing apparatus %s (\"%s\") "
210 "got error %d from detector %s (\"%s\")",
212 theDetector->GetName(), theDetector->GetTitle());
241 while(
auto* theDetector =
static_cast<THaDetector*
>( next() )) {
242 theDetector->SetDebug( level );
virtual void Print(Option_t *option, const char *wildcard, Int_t recurse=1) const
virtual Int_t GetSize() const
virtual void SetDebug(Int_t level)
virtual const char * Here(const char *) const
virtual void Print(Option_t *opt="") const
virtual void Print(Option_t *opt="") const
virtual THaDetector * GetDetector(const char *name)
virtual Int_t AddDetector(THaDetector *det, Bool_t quiet=false, Bool_t first=false)
virtual Int_t End(THaRunBase *r=nullptr)
virtual void SetDebugAll(Int_t level)
virtual void Clear(Option_t *opt="")
virtual Int_t Begin(THaRunBase *r=nullptr)
virtual Int_t Decode(const THaEvData &)
virtual void SetApparatus(THaApparatus *)
TObject * FindObject(const char *name) const override
void AddLast(TObject *obj) override
void Delete(Option_t *option="") override
void AddFirst(TObject *obj) override
const char * GetName() const override
const char * GetTitle() const override
virtual void Error(const char *method, const char *msgfmt,...) const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const