193 for (Int_t il=0; il<nlinks; il++)
199 if (obj->InheritsFrom(
"NcDevice"))
270 for (Int_t i=1; i<=n; i++)
283 for (Int_t j=1; j<=n; j++)
296 for (Int_t k=1; k<=n; k++)
303 for (Int_t m=1; m<=n; m++)
314 for (Int_t idx=0; idx<n; idx++)
316 slot=slotarr.At(idx);
318 TObject* obj=s.
GetLink(slot,pos);
319 if (obj)
SetLink(obj,slot,pos);
326 for (Int_t it=1; it<=ntk; it++)
369 if (mode<0 || mode>1)
371 cout <<
" *NcSignal::Reset* Invalid argument mode = " << mode << endl;
372 cout <<
" Default mode=0 will be used." << endl;
414 cout <<
" *NcSignal::ResetSignals* Invalid argument mode = " << mode << endl;
415 cout <<
" Default mode=0 will be used." << endl;
422 if (
fSignals && (abs(mode)==0 || abs(mode)==1))
424 for (Int_t i=1; i<=
fSignals->GetSize(); i++)
432 if (
fDsignals && (abs(mode)==0 || abs(mode)==2))
434 for (Int_t j=1; j<=
fDsignals->GetSize(); j++)
467 cout <<
" *NcSignal::DeleteSignals* Invalid argument mode = " << mode << endl;
468 cout <<
" Default mode=0 will be used." << endl;
472 if (
fSignals && (abs(mode)==0 || abs(mode)==1))
478 if (
fDsignals && (abs(mode)==0 || abs(mode)==2))
492 else if (abs(mode)==1)
494 for (Int_t i=1; i<=
fSigflags->GetSize(); i++)
500 else if (abs(mode)==2)
502 for (Int_t j=1; j<=
fSigflags->GetSize(); j++)
616 Float_t sum=(
fSignals->At(j-1))+sig;
711 if (abs(mode)>8)
return 0;
722 if ((abs(mode)==2 || abs(mode)>=4) && parent)
729 if (mode==-8) mode=-7;
759 if (abs(mode)==2 || abs(mode)>=4)
764 if (!sx && abs(mode)>=5) sx=(
NcSignal*)
this;
766 if (mode==-5) mode=-2;
768 if (mode==-6) mode=-3;
772 if (j>0 && j<=(
fSignals->GetSize()))
776 if (mode==0 || !sx)
return sig;
782 if (abs(mode)==1 || abs(mode)==2)
789 if (mode>0) sig=(sig/gain)-offset;
790 if (mode<0) sig=(sig+offset)*gain;
800 if (abs(mode)==3 || abs(mode)==4)
804 if (f) sig=f->Eval(sig);
810 cout <<
" *NcSignal::GetSignal* Index j = " << j <<
" invalid." << endl;
931 cout <<
" *NcSignal::GetSignalError* Index j = " << j <<
" invalid." << endl;
979 const char* name=GetName();
980 const char* title=GetTitle();
982 cout <<
" *" << ClassName() <<
"::Data* Id : " << GetUniqueID();
983 if (strlen(name)) cout <<
" Name : " << name;
984 if (strlen(title)) cout <<
" Title : " << title;
993 const char* devname=
fDevice->GetName();
994 const char* devtitle=
fDevice->GetTitle();
995 cout <<
" Owned by device : " <<
fDevice->ClassName() <<
" Id : " <<
fDevice->GetUniqueID();
996 if (strlen(devname)) cout <<
" Name : " << devname;
997 if (strlen(devtitle)) cout <<
" Title : " << devtitle;
1028 cout <<
" *NcSignal::List* Invalid argument j = " << j << endl;
1034 const char* name=GetName();
1035 const char* title=GetTitle();
1037 cout <<
" *" << ClassName() <<
"::Data* Id : " << GetUniqueID();
1038 if (strlen(name)) cout <<
" Name : " << name;
1039 if (strlen(title)) cout <<
" Title : " << title;
1043 const char* devname=
fDevice->GetName();
1044 const char* devtitle=
fDevice->GetTitle();
1045 cout <<
" Owned by device : " <<
fDevice->ClassName();
1046 if (strlen(devname)) cout <<
" Name : " << devname;
1047 if (strlen(devtitle)) cout <<
" Title : " << devtitle;
1055 if (nlinkslots>n) n=nlinkslots;
1064 for (Int_t i=1; i<=n; i++)
1071 cout <<
" Slot : " << i;
1077 for (Int_t k=0; k<nrefs; k++)
1083 cout <<
" Link at position " << pos <<
" to : " << obj->ClassName();
1084 if (obj->InheritsFrom(
"TNamed"))
1086 const char* lname=obj->GetName();
1087 const char* ltitle=obj->GetTitle();
1088 if (strlen(lname)) cout <<
" Name : " << lname;
1089 if (strlen(ltitle)) cout <<
" Title : " << ltitle;
1106 cout <<
" Slot : " << j;
1112 for (Int_t kj=0; kj<nrefs; kj++)
1118 cout <<
" Link at position " << pos <<
" to : " << obj->ClassName();
1119 if (obj->InheritsFrom(
"TNamed"))
1121 const char* lnamej=obj->GetName();
1122 const char* ltitlej=obj->GetTitle();
1123 if (strlen(lnamej)) cout <<
" Name : " << lnamej;
1124 if (strlen(ltitlej)) cout <<
" Title : " << ltitlej;
1166 cout <<
" *NcSignal::ListWaveform* Invalid argument j = " << j << endl;
1172 const char* name=GetName();
1173 const char* title=GetTitle();
1175 cout <<
" *" << ClassName() <<
"::Data* Id :" << GetUniqueID();
1176 if (strlen(name)) cout <<
" Name : " << name;
1177 if (strlen(title)) cout <<
" Title : " << title;
1181 const char* devname=
fDevice->GetName();
1182 const char* devtitle=
fDevice->GetTitle();
1183 cout <<
" Owned by device : " <<
fDevice->ClassName();
1184 if (strlen(devname)) cout <<
" Name : " << devname;
1185 if (strlen(devtitle)) cout <<
" Title : " << devtitle;
1195 for (Int_t i=1; i<=n; i++)
1200 const char* wfname=obj->GetName();
1201 const char* wftitle=obj->GetTitle();
1202 cout <<
" Waveform " << i <<
" : " << obj->ClassName();
1203 if (strlen(wfname)) cout <<
" Name : " << wfname;
1204 if (strlen(wftitle)) cout <<
" Title : " << wftitle;
1216 const char* wfnamej=obj->GetName();
1217 const char* wftitlej=obj->GetTitle();
1218 cout <<
" Waveform " << j <<
" : " << obj->ClassName();
1219 if (strlen(wfnamej)) cout <<
" Name : " << wfnamej;
1220 if (strlen(wftitlej)) cout <<
" Title : " << wftitlej;
1241 cout <<
" *NcSignal::ListSample* Invalid argument j = " << j << endl;
1247 const char* name=GetName();
1248 const char* title=GetTitle();
1250 cout <<
" *" << ClassName() <<
"::Data* Id :" << GetUniqueID();
1251 if (strlen(name)) cout <<
" Name : " << name;
1252 if (strlen(title)) cout <<
" Title : " << title;
1256 const char* devname=
fDevice->GetName();
1257 const char* devtitle=
fDevice->GetTitle();
1258 cout <<
" Owned by device : " <<
fDevice->ClassName();
1259 if (strlen(devname)) cout <<
" Name : " << devname;
1260 if (strlen(devtitle)) cout <<
" Title : " << devtitle;
1270 for (Int_t i=1; i<=n; i++)
1275 const char* sname=obj->GetName();
1276 const char* stitle=obj->GetTitle();
1277 cout <<
" Sample " << i <<
" : " << obj->ClassName();
1278 if (strlen(sname)) cout <<
" Name : " << sname;
1279 if (strlen(stitle)) cout <<
" Title : " << stitle;
1291 const char* snamej=obj->GetName();
1292 const char* stitlej=obj->GetTitle();
1293 cout <<
" Sample " << j <<
" : " << obj->ClassName();
1294 if (strlen(snamej)) cout <<
" Name : " << snamej;
1295 if (strlen(stitlej)) cout <<
" Title : " << stitlej;
1316 cout <<
" *NcSignal::ListTrack* Invalid argument j = " << j << endl;
1322 const char* name=GetName();
1323 const char* title=GetTitle();
1325 cout <<
" *" << ClassName() <<
"::Data* Id :" << GetUniqueID();
1326 if (strlen(name)) cout <<
" Name : " << name;
1327 if (strlen(title)) cout <<
" Title : " << title;
1331 const char* devname=
fDevice->GetName();
1332 const char* devtitle=
fDevice->GetTitle();
1333 cout <<
" Owned by device : " <<
fDevice->ClassName();
1334 if (strlen(devname)) cout <<
" Name : " << devname;
1335 if (strlen(devtitle)) cout <<
" Title : " << devtitle;
1345 for (Int_t i=1; i<=n; i++)
1350 const char* txname=tx->GetName();
1351 const char* txtitle=tx->GetTitle();
1352 cout <<
" Track " << i <<
" : " << tx->ClassName() <<
" Id : " << tx->
GetId();
1353 if (strlen(txname)) cout <<
" Name : " << txname;
1354 if (strlen(txtitle)) cout <<
" Title : " << txtitle;
1366 const char* txnamej=tx->GetName();
1367 const char* txtitlej=tx->GetTitle();
1368 cout <<
" Track " << j <<
" : " << tx->ClassName() <<
" Id : " << tx->
GetId();
1369 if (strlen(txnamej)) cout <<
" Name : " << txnamej;
1370 if (strlen(txtitlej)) cout <<
" Title : " << txtitlej;
1388 for (Int_t i=1; i<=
fSigflags->GetSize(); i++)
1407 for (Int_t i=1; i<=
fSigflags->GetSize(); i++)
1430 cout <<
" *NcSignal::SetSigFlags* Invalid argument j = " << j << endl;
1446 Int_t word=10*is+ie;
1467 cout <<
" *NcSignal::GetSignalFlag* Invalid argument j = " << j << endl;
1524 cout <<
" *NcSignal::GetErrorFlag* Invalid argument j = " << j << endl;
1578 for (Int_t i=0; i<
fSigflags->GetSize(); i++)
1583 if (n<nflags) n=nflags;
1644 for (Int_t i=1; i<=n; i++)
1649 str=waveform->GetName();
1650 if (str.Contains(name))
return waveform;
1675 for (Int_t i=1; i<=n; i++)
1680 str=waveform->GetName();
1681 if (str.Contains(name))
return i;
1725 if (waveform != hcur)
1735 hcur=
new TH1F(*waveform);
1757 if ((j>=0) && (j<=size))
1762 if (hwave) hwave->Reset();
1766 for (Int_t i=0; i<size; i++)
1769 if (hwave) hwave->Reset();
1775 cout <<
" *NcSignal::ResetWaveform* Index j = " << j <<
" invalid." << endl;
1806 if ((j>=0) && (j<=size))
1825 cout <<
" *NcSignal::DeleteWaveform* Index j = " << j <<
" invalid." << endl;
1898 for (Int_t i=1; i<=n; i++)
1903 str=sample->GetName();
1904 if (str.Contains(name))
return sample;
1929 for (Int_t i=1; i<=n; i++)
1934 str=sample->GetName();
1935 if (str.Contains(name))
return i;
2010 if ((j>=0) && (j<=size))
2015 if (sample) sample->
Reset();
2019 for (Int_t i=0; i<size; i++)
2022 if (sample) sample->
Reset();
2028 cout <<
" *NcSignal::ResetSample* Index j = " << j <<
" invalid." << endl;
2059 if ((j>=0) && (j<=size))
2078 cout <<
" *NcSignal::DeleteSample* Index j = " << j <<
" invalid." << endl;
2109 cout <<
" *NcSignal::GetNlinks* Index j = " << j <<
" invalid." << endl;
2228 fLinks->EnterObject(k,j,obj);
2231 if (obj->InheritsFrom(
"NcTrack"))
2323 if (!obj || j<=0)
return;
2330 for (Int_t k=1; k<=n; k++)
2493 if (!obj && !j && !k)
2500 fLinks->RemoveObjects(obj,k,j);
2715 fLinks->SetSwapMode(swap);
2746 cout <<
" *" << ClassName() <<
"::SetDevice* Invokation by public users is not allowed." << endl;
2785 for (Int_t i=0; i<ntk; i++)
2787 if (&t==
fTracks->At(i))
return;
2816 if (test)
fTracks->Compress();
2845 for (Int_t i=0; i<ntk; i++)
2874 Int_t ntk=
fTracks->GetEntries();
2878 for (Int_t i=0; i<ntk; i++)
2881 if (tx==t)
return 1;
2904 cout <<
" *NcSignal* track number : " << j <<
" out of range."
2924 if (
id == tx->
GetId())
return tx;
3016 if (strlen(name)) sig->SetName(name);
TString GetSlotName(Int_t j=1) const
Float_t GetGain(Int_t j=1) const
virtual Int_t GetNslots() const
Int_t GetGainFlag(Int_t j=1) const
Int_t GetDeadValue(Int_t j=1) const
Int_t GetCalWord(Int_t j=1) const
Int_t GetSlotIndex(TString name, Int_t opt=0) const
Float_t GetOffset(Int_t j=1) const
void DeleteCalibrations(Int_t mode=0)
TF1 * GetCalFunction(Int_t j=1) const
Int_t GetOffsetFlag(Int_t j=1) const
Int_t GetLockValue(Int_t j=1) const
virtual void List(Int_t j=0) const
TF1 * GetDecalFunction(Int_t j=1) const
Signal (Hit) handling of a generic device.
void RemoveHit(NcSignal &s)
Handling of a matrix structure of objects.
virtual void Data(TString f="car", TString u="rad") const
Sampling and statistics tools for various multi-dimensional data samples.
Int_t GetDimension() const
TGraph GetGraph(Int_t i, TF1 *f=0)
Generic handling of (extrapolated) detector signals.
virtual void DeleteSignals(Int_t mode=0)
void SetSigFlags(Int_t is, Int_t ie, Int_t j)
Int_t GetNwaveforms() const
virtual void ResetSignals(Int_t mode=0)
virtual void Reset(Int_t mode=0)
void DeleteWaveform(Int_t j=1)
virtual void List(Int_t j=0) const
Int_t GetNtracks(NcTrack *t=0) const
NcSample * DisplaySample(Int_t j=1, Int_t i=1) const
void ResetLink(Int_t j=1, Int_t k=1)
TH1F * GetWaveform(Int_t j=1) const
virtual void SetSignal(Double_t sig, Int_t j=1)
Int_t GetSampleIndex(TString name) const
void SetSwapMode(Int_t swap=1)
void RemoveTracks(Int_t mode=1)
NcDevice * GetDevice() const
Int_t GetNlinks(TObject *obj=0, Int_t j=0) const
void ListWaveform(Int_t j=0) const
NcSample * GetSample(Int_t j=1) const
virtual TObject * Clone(const char *name="") const
void ListSample(Int_t j=0) const
void RemoveTrack(NcTrack &t, Int_t mode=1)
NcTrack * GetIdTrack(Int_t id) const
Int_t GetIndices(TObject *obj, TArrayI &js, TArrayI &ks) const
void SetDevice(NcDevice *dev)
void SetWaveform(TH1F *waveform, Int_t j=1)
Int_t GetSwapMode() const
virtual Float_t GetSignal(Int_t j=1, Int_t mode=0) const
NcSignal(const char *name="", const char *title="")
virtual Int_t GetNslots() const
void SetSample(NcSample *sample, Int_t j=1)
void AddTrack(NcTrack &t, Int_t mode=1)
void DeleteSample(Int_t j=1)
TObject * GetLink(Int_t j=1, Int_t k=1) const
void ResetSample(Int_t j=1)
virtual Float_t GetSignalError(Int_t j=1) const
void ListTrack(Int_t j=0) const
Int_t GetNsamples() const
virtual void AddSignal(Double_t sig, Int_t j=1)
virtual void Data(TString f="car", TString u="rad") const
virtual void SetSignalError(Double_t dsig, Int_t j=1)
void AddLink(TObject *obj, Int_t j=1)
Int_t GetSignalFlag(Int_t j=1) const
void ResetWaveform(Int_t j=1)
NcTrack * GetTrack(Int_t j) const
Int_t GetErrorFlag(Int_t j=1) const
Int_t GetWaveformIndex(TString name) const
void SetLink(TObject *obj, Int_t j=1, Int_t k=1)
void ResetLinks(TObject *obj, Int_t j=0, Int_t k=0)
Handling of the attributes of a reconstructed particle track.
void AddSignal(NcSignal &s, Int_t mode=0)
void RemoveSignal(NcSignal &s, Int_t mode=1)