// In case the j-th slot was marked dead, 0 is returned.
// In case no calibration function is present, just the j-th signal
// is returned (like with mode=0).
-// 4 : Same as mode=3 but the calibration function is taken from
-// the AliDevice which owns this AliSignal object.
+// 4 : Same as mode=3 but the calibration function and dead flag are
+// taken from the AliDevice which owns this AliSignal object.
// The corresponding AliDevice slot is obtained via matching of
// the slotnames. In case this fails, the slotindex "j" of the
// input argument will be used.
// an automatic switch to mode=3 will be made.
// 7 : Same as mode=3 but in case no calibration function is present
// an automatic switch to mode=4 will be made.
+// 8 : Same as mode=7 but also the corresponding dead flag of the
+// parent device (if any) will be checked.
+// If either the dead flag of the requested signal slot of this
+// AliSignal object or the corresponding parent device slot is
+// set, 0 is returned.
//
// <0 : The corresponding de-correction or de-calibration is performed
//
//
// The default is mode=0.
- if (abs(mode)>7) return 0;
+ if (abs(mode)>8) return 0;
Int_t jcal=j;
Float_t sig=0;
Float_t gain=1;
Float_t offset=0;
+ // Get the corresponding slot index (and dead flag) of the parent device
+ Int_t pj=0;
+ Int_t pdead=0;
+ AliSignal* parent=(AliSignal*)GetDevice();
+ if ((abs(mode)==2 || abs(mode)>=4) && parent)
+ {
+ TString name=GetSlotName(j);
+ if (strlen(name.Data())) pj=parent->GetSlotIndex(name);
+ if (abs(mode)==8 && pj) pdead=parent->GetDeadValue(pj);
+ }
+ if (mode==8) mode=7;
+ if (mode==-8) mode=-7;
+
AliSignal* sx=(AliSignal*)this;
TF1* f=0;
if (abs(mode)==2 || abs(mode)>=4)
{
sx=(AliSignal*)GetDevice();
- if (sx)
- {
- TString name=GetSlotName(j);
- if (strlen(name.Data())) jcal=sx->GetSlotIndex(name);
- if (!jcal) jcal=j;
- }
+ if (pj) jcal=pj;
}
if (!sx && abs(mode)>=5) sx=(AliSignal*)this;
if (mode==5) mode=2;
if (mode==0 || !sx) return sig;
// Check for the dead flag setting
- if (sx->GetDeadValue(jcal)) return 0;
+ if (sx->GetDeadValue(jcal) || pdead) return 0;
// (De)correct the signal for the gain and offset
if (abs(mode)==1 || abs(mode)==2)
return val;
}
///////////////////////////////////////////////////////////////////////////
-void AliSignal::Data(TString f) const
+void AliSignal::Data(TString f,TString u) const
{
// Provide all signal information within the coordinate frame f.
+//
+// The string argument "u" allows to choose between different angular units
+// in case e.g. a spherical frame is selected.
+// u = "rad" : angles provided in radians
+// "deg" : angles provided in degrees
+//
+// The defaults are f="car" and u="rad".
const char* name=GetName();
const char* title=GetTitle();
if (strlen(title)) cout << " Title : " << title;
cout << endl;
cout << " Position";
- AliPosition::Data(f);
+ AliPosition::Data(f,u);
if (fDevice)
{
const char* devname=fDevice->GetName();