Bool_t
AliFMDAltroMapping::Hardware2Detector(UInt_t ddl, UInt_t addr,
UShort_t& det, Char_t& ring,
- UShort_t& sec, UShort_t& str) const
+ UShort_t& sec, Short_t& str) const
{
// Translate a hardware address to detector coordinates.
//
AliFMDAltroMapping::Hardware2Detector(UInt_t ddl, UInt_t board,
UInt_t altro, UInt_t chan,
UShort_t& det, Char_t& ring,
- UShort_t& sec, UShort_t& str) const
+ UShort_t& sec, Short_t& str) const
{
// Translate a hardware address to detector coordinates.
// The detector is simply
// the outer rings.
//
// The board number and ALTRO number together identifies the sensor,
- // and hence. The lower board number (0 or 2) are the first N / 2
+ // and hence. The lower board number (0 or 16) are the first N / 2
// sensors (where N is the number of sensors in the ring).
//
// There are 3 ALTRO's per card, and each ALTRO serves up to 4
// number only. For the inner rings, the map is
//
// Channel 0 -> Sector 0, strips 0-127
- // Channel 1 -> Sector 1, strips 0-127
+ // Channel 1 -> Sector 1, strips 127-0
// Channel 3 -> Sector 0, strips 128-255
- // Channel 4 -> Sector 1, strips 128-255
+ // Channel 4 -> Sector 1, strips 255-128
// Channel 5 -> Sector 0, strips 256-383
- // Channel 6 -> Sector 1, strips 256-383
+ // Channel 6 -> Sector 1, strips 383-256
// Channel 7 -> Sector 0, strips 384-511
- // Channel 8 -> Sector 1, strips 384-511
+ // Channel 8 -> Sector 1, strips 511-384
//
// There are only half as many strips in the outer sensors, so there
// only 4 channels are used for a full sensor. The map is
//
// Channel 0 -> Sector 0, strips 0-127
- // Channel 1 -> Sector 1, strips 0-127
+ // Channel 1 -> Sector 1, strips 127-0
// Channel 3 -> Sector 0, strips 128-255
- // Channel 4 -> Sector 1, strips 128-255
+ // Channel 4 -> Sector 1, strips 255-128
//
// With this information, we can decode the hardware address to give
// us detector coordinates, unique at least up a 128 strips. We
- // return the first strip in the given range.
+ // return the first strip, as seen by the ALTRO channel, in the
+ // given range.
//
det = ddl + 1;
ring = (board % 2) == 0 ? 'I' : 'O';
str = ((chan % 4) / 2) * 128;
break;
}
+ if (sec % 2) str += 127;
return kTRUE;
}
+//____________________________________________________________________
+Bool_t
+AliFMDAltroMapping::Hardware2Detector(UInt_t ddl, UInt_t addr,
+ UShort_t timebin, UShort_t preSamples,
+ UShort_t sampleRate,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const
+{
+ // Translate a hardware address to detector coordinates.
+ //
+ // See also Hardware2Detector that accepts 4 inputs
+ UInt_t board = (addr >> 7) & 0x1F;
+ UInt_t altro = (addr >> 4) & 0x7;
+ UInt_t chan = (addr & 0xf);
+ return Hardware2Detector(ddl, board, altro, chan,
+ timebin, preSamples, sampleRate,
+ det, ring, sec, str, sam);
+}
+
+//____________________________________________________________________
+Bool_t
+AliFMDAltroMapping::Hardware2Detector(UInt_t ddl, UInt_t board,
+ UInt_t altro, UInt_t chan,
+ UInt_t timebin, UInt_t preSamples,
+ UInt_t sampleRate,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const
+{
+ // Full conversion from hardware address, including timebin number,
+ // to detector coordinates and sample number. Note, that this
+ // conversion depends on the oversampling rate and the number of
+ // pre-samples
+ if (!Hardware2Detector(ddl, board, altro, chan, det, ring, sec, str))
+ return kFALSE;
+ UShort_t t = (timebin - preSamples);
+ sam = (t % sampleRate);
+ t -= sam;
+ str += (sec % 2 ? -1 : 1) * t / sampleRate;
+ // if (sec % 2) sam = sampleRate - 1 - sam;
+#if 0
+ AliFMDDebug(3, ("%d/0x%02x/0x%x/0x%x/%04d -> FMD%d%c[%02d,%03d]-%d"
+ " (pre=%2d, rate=%d)",
+ ddl, board, altro, chan, timebin,
+ det, ring, sec, str, sam, preSamples, sampleRate));
+#endif
+ return kTRUE;
+}
+
+
//____________________________________________________________________
Bool_t
AliFMDAltroMapping::Detector2Hardware(UShort_t det, Char_t ring,
// Sector 0, strips 128-255 -> Channel 2
// Sector 0, strips 256-383 -> Channel 4
// Sector 0, strips 384-511 -> Channel 6
- // Sector 1, strips 0-127 -> Channel 1
- // Sector 1, strips 128-255 -> Channel 3
- // Sector 1, strips 256-383 -> Channel 5
- // Sector 1, strips 384-511 -> Channel 7
+ // Sector 1, strips 127- 0 -> Channel 1
+ // Sector 1, strips 255-128 -> Channel 3
+ // Sector 1, strips 383-256 -> Channel 5
+ // Sector 1, strips 511-384 -> Channel 7
// Sector 2, strips 0-127 -> Channel 8
// Sector 2, strips 128-255 -> Channel 10
// Sector 2, strips 256-383 -> Channel 12
// Sector 2, strips 384-511 -> Channel 14
- // Sector 3, strips 0-127 -> Channel 9
- // Sector 3, strips 128-255 -> Channel 11
- // Sector 3, strips 256-383 -> Channel 13
- // Sector 3, strips 384-511 -> Channel 15
+ // Sector 3, strips 127- 0 -> Channel 9
+ // Sector 3, strips 255-128 -> Channel 11
+ // Sector 3, strips 383-256 -> Channel 13
+ // Sector 3, strips 511-384 -> Channel 15
//
// and so on, up to sector 19. For the outer, the map is
//
// Sector 0, strips 0-127 -> Channel 0
// Sector 0, strips 128-255 -> Channel 2
- // Sector 1, strips 0-127 -> Channel 1
- // Sector 1, strips 128-255 -> Channel 3
+ // Sector 1, strips 127- 0 -> Channel 1
+ // Sector 1, strips 255-128 -> Channel 3
// Sector 2, strips 0-127 -> Channel 4
// Sector 2, strips 128-255 -> Channel 6
- // Sector 3, strips 0-127 -> Channel 5
- // Sector 3, strips 128-255 -> Channel 7
+ // Sector 3, strips 127- 0 -> Channel 5
+ // Sector 3, strips 255-128 -> Channel 7
// Sector 4, strips 0-127 -> Channel 8
// Sector 4, strips 128-255 -> Channel 10
- // Sector 5, strips 0-127 -> Channel 9
- // Sector 5, strips 128-255 -> Channel 11
+ // Sector 5, strips 127- 0 -> Channel 9
+ // Sector 5, strips 255-128 -> Channel 11
// Sector 6, strips 0-127 -> Channel 12
// Sector 6, strips 128-255 -> Channel 14
- // Sector 7, strips 0-127 -> Channel 13
- // Sector 7, strips 128-255 -> Channel 15
+ // Sector 7, strips 127- 0 -> Channel 13
+ // Sector 7, strips 255-128 -> Channel 15
//
// and so on upto sector 40.
//
return kTRUE;
}
+//____________________________________________________________________
+Bool_t
+AliFMDAltroMapping::Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UShort_t preSamples, UShort_t sampleRate,
+ UInt_t& ddl, UInt_t& board,
+ UInt_t& altro, UInt_t& channel,
+ UShort_t& timebin) const
+{
+ if (!Detector2Hardware(det,ring,sec,str,ddl,board,altro,channel))
+ return kFALSE;
+ timebin = preSamples;
+ if (sec % 2)
+ timebin += (127 - (str % 128)) * sampleRate;
+ else
+ timebin += (str % 128) * sampleRate;
+ timebin += sam;
+ return kTRUE;
+}
+
+
+//____________________________________________________________________
+Bool_t
+AliFMDAltroMapping::Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UShort_t preSamples, UShort_t sampleRate,
+ UInt_t& ddl, UInt_t& hwaddr,
+ UShort_t& timebin) const
+{
+ UInt_t board = 0;
+ UInt_t altro = 0;
+ UInt_t chan = 0;
+ if (!Detector2Hardware(det, ring, sec, str, sam,
+ preSamples, sampleRate,
+ ddl, board, altro, chan, timebin)) return kFALSE;
+ hwaddr = chan + (altro << 4) + (board << 7);
+ return kTRUE;
+}
+
+
+
//____________________________________________________________________
Int_t
AliFMDAltroMapping::GetHWAddress(Int_t sec, Int_t str, Int_t ring)
UShort_t det;
Char_t ring;
UShort_t sec;
- UShort_t str;
+ Short_t str;
Int_t ddl = 0;
if (!Hardware2Detector(ddl, hwaddr, det, ring, sec, str)) return -1;
return Int_t(sec);
UShort_t det;
Char_t ring;
UShort_t sec;
- UShort_t str;
+ Short_t str;
Int_t ddl = 0;
if (!Hardware2Detector(ddl, hwaddr, det, ring, sec, str)) return -1;
return Int_t(str);
UShort_t det;
Char_t ring;
UShort_t sec;
- UShort_t str;
+ Short_t str;
Int_t ddl = 0;
if (!Hardware2Detector(ddl, hwaddr, det, ring, sec, str)) return -1;
return Int_t(ring);
TString opt(option);
opt.ToLower();
UInt_t ddl, board, chip, chan, addr;
- UShort_t det, sec, str;
+ UShort_t det, sec;
+ Short_t str;
Char_t rng;
if (opt.Contains("hw") || opt.Contains("hardware")) {
@return @c true on success, false otherwise */
Bool_t Hardware2Detector(UInt_t ddl, UInt_t hwaddr,
UShort_t& det, Char_t& ring,
- UShort_t& sec, UShort_t& str) const;
+ UShort_t& sec, Short_t& str) const;
+ /** Map a hardware address into a detector index.
+ @param ddl Hardware DDL number
+ @param hwaddr Hardware address.
+ @param timebin Timebin
+ @param preSamples # of pre samples
+ @param sampleRate Over sampling rate
+ @param det On return, the detector #
+ @param ring On return, the ring ID
+ @param sec On return, the sector #
+ @param str On return, the base of strip #
+ @param sam On return, the sample number for this strip
+ @return @c true on success, false otherwise */
+ Bool_t Hardware2Detector(UInt_t ddl, UInt_t hwaddr,
+ UShort_t timebin, UShort_t preSamples,
+ UShort_t sampleRate,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const;
/** Map a hardware address into a detector index.
@param ddl Hardware DDL number
@param board FEC number
Bool_t Hardware2Detector(UInt_t ddl, UInt_t board,
UInt_t altro, UInt_t channel,
UShort_t& det, Char_t& ring,
- UShort_t& sec, UShort_t& str) const;
+ UShort_t& sec, Short_t& str) const;
+ /** Map a hardware address into a detector index.
+ @param ddl Hardware DDL number
+ @param board FEC number
+ @param altro ALTRO number
+ @param channel Channel number
+ @param timebin Timebin
+ @param preSamples # of pre samples
+ @param sampleRate Over sampling rate
+ @param det On return, the detector #
+ @param ring On return, the ring ID
+ @param sec On return, the sector #
+ @param str On return, the base of strip #
+ @param sam On return, the sample number for this strip
+ @return @c true on success, false otherwise */
+ Bool_t Hardware2Detector(UInt_t ddl, UInt_t board,
+ UInt_t altro, UInt_t chan,
+ UInt_t timebin, UInt_t preSamples,
+ UInt_t sampleRate,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const;
/** Map a detector index into a hardware address.
@param det The detector #
@param ring The ring ID
UShort_t sec, UShort_t str,
UInt_t& ddl, UInt_t& board,
UInt_t& altro, UInt_t& channel) const;
+ /** Map a detector index into a hardware address.
+ @param det The detector #
+ @param ring The ring ID
+ @param sec The sector #
+ @param str The strip #
+ @param sam The sample number
+ @param preSamples Number of pre-samples
+ @param sampleRate The oversampling rate
+ @param ddl On return, hardware DDL number
+ @param board On return, the FEC board address (local to DDL)
+ @param altro On return, the ALTRO number (local to FEC)
+ @param channel On return, the channel number (local to ALTRO)
+ @param timebin On return, the timebin number (local to ALTRO)
+ @return @c true on success, false otherwise */
+ Bool_t Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UShort_t preSamples, UShort_t sampleRate,
+ UInt_t& ddl, UInt_t& board,
+ UInt_t& altro, UInt_t& channel,
+ UShort_t& timebin) const;
/** Map a detector index into a hardware address.
@param det The detector #
@param ring The ring ID
Bool_t Detector2Hardware(UShort_t det, Char_t ring,
UShort_t sec, UShort_t str,
UInt_t& ddl, UInt_t& hwaddr) const;
+ /** Map a detector index into a hardware address.
+ @param det The detector #
+ @param ring The ring ID
+ @param sec The sector #
+ @param str The strip #
+ @param sam The sample number
+ @param preSamples Number of pre-samples
+ @param sampleRate The oversampling rate
+ @param ddl On return, hardware DDL number
+ @param hwaddr On return, hardware address.
+ @param timebin On return, the timebin number (local to ALTRO)
+ @return @c true on success, false otherwise */
+ Bool_t Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UShort_t preSamples, UShort_t sampleRate,
+ UInt_t& ddl, UInt_t& hwaddr,
+ UShort_t& timebin) const;
/** convert a partial detector index into a hardware address
@param sector Sector number
@param str Strip number
// Translate detector coordinates (this,ring,sector,strip) into
// (x,y,z) coordinates (in global reference frame)
AliFMDRing* r = GetRing(ring);
- if (!r) return;
+ if (!r) {
+ AliWarning(Form("No such ring FMD%d%c ", fId, ring));
+ return;
+ }
TGeoMatrix* m = FindTransform(ring, sector);
- if (!m) return;
+ if (!m) {
+ AliWarning(Form("No transfrmation found for FMD%d%c[%02d]",
+ fId, ring, sector));
+ return;
+ }
Double_t rho = r->GetStripRadius(strip);
Double_t phi = ((sector % 2) - .5) * r->GetTheta();
Double_t siThick = r->GetSiThickness();
void Print(Option_t* opt="") const;
/** @return Title */
const char* GetTitle() const;
+ /** Set the count value
+ @param s Sample number
+ @param c Counts */
+ void SetCount(UShort_t s, Short_t c);
protected:
UShort_t fCount1; // Digital signal
Short_t fCount2; // Digital signal (-1 if not used)
}
return -1;
}
+inline void
+AliFMDDigit::SetCount(UShort_t i, Short_t c)
+{
+ switch (i) {
+ case 0: fCount1 = c; break;
+ case 1: fCount2 = c; break;
+ case 2: fCount3 = c; break;
+ case 3: fCount4 = c; break;
+ }
+}
#endif
//____________________________________________________________________
Int_t n = 0;
Int_t j = 0;
while (*(p++)) n++;
- AliInfo(Form("Got %d buttons", n));
+ AliFMDDebug(1, ("Got %d buttons", n));
if (n <= 0) return;
Double_t yb = 0;
p = which;
while ((m = *(p++))) {
fCanvas->cd();
- AliInfo(Form("Adding button %s", m));
+ AliFMDDebug(1, ("Adding button %s", m));
TButton* b = new TButton(m, Form("AliFMDDisplay::Instance()->%s()", m),
x0, yb, TMath::Min(x0 + dx,.999F), y1);
b->Draw();
Bool_t hasFMD1 = kFALSE;
Bool_t hasFMD2 = kFALSE;
Bool_t hasFMD3 = kFALSE;
- AliInfo("Getting material FMD_Si$");
+ AliFMDDebug(1, ("Getting material FMD_Si$"));
TGeoMaterial* si = gGeoManager->GetMaterial("FMD_Si$"); // kRed
- AliInfo("Getting material FMD_Carbon$");
+ AliFMDDebug(1, ("Getting material FMD_Carbon$"));
TGeoMaterial* c = gGeoManager->GetMaterial("FMD_Carbon$"); // kGray
- AliInfo("Getting material FMD_Aluminum$");
+ AliFMDDebug(1, ("Getting material FMD_Aluminum$"));
TGeoMaterial* al = gGeoManager->GetMaterial("FMD_Aluminum$");// kGray-2
- AliInfo("Getting material FMD_Copper$");
+ AliFMDDebug(1, ("Getting material FMD_Copper$"));
TGeoMaterial* cu = gGeoManager->GetMaterial("FMD_Copper$"); // kGreen-2
- AliInfo("Getting material FMD_PCB$");
+ AliFMDDebug(1, ("Getting material FMD_PCB$"));
TGeoMaterial* pcb = gGeoManager->GetMaterial("FMD_PCB$"); // kGreen+2
- AliInfo("Getting material FMD_PCB$");
+ AliFMDDebug(1, ("Getting material FMD_PCB$"));
TGeoMaterial* chip = gGeoManager->GetMaterial("FMD_Si Chip$");// kGreen+2
TObjArray toshow;
while ((node = static_cast<TGeoNode*>(next()))) {
Warning("End", "No geometry manager");
return kFALSE;
}
- AliInfo("Drawing geometry");
+ AliFMDDebug(1, ("Drawing geometry"));
fPad->cd();
fGeoManager->GetTopVolume()->Draw();
if (fOnlyFMD) ShowOnlyFMD();
- AliInfo("Adjusting view");
+ AliFMDDebug(1, ("Adjusting view"));
Int_t irep;
if (fPad->GetView()) {
fPad->GetView()->SetView(-200, -40, 80, irep);
gSystem->InnerLoop();
gApplication->StopIdleing();
}
- AliInfo("After idle loop");
+ AliFMDDebug(1, ("After idle loop"));
if (fMarkers) fMarkers->Delete();
if (fHits) fHits->Clear();
- AliInfo("After clearing caches");
+ AliFMDDebug(1, ("After clearing caches"));
}
//____________________________________________________________________
}
+//____________________________________________________________________
+Bool_t
+AliFMDParameters::Hardware2Detector(UInt_t ddl, UInt_t addr,
+ UShort_t timebin,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const
+{
+ // Translate a hardware address to detector coordinates.
+ //
+ // See also Hardware2Detector that accepts 4 inputs
+ if (!Hardware2Detector(ddl, addr, det, ring, sec, str)) return kFALSE;
+ UShort_t preSamples = GetPreSamples(det, ring, sec, str);
+ UShort_t sampleRate = GetSampleRate(det, ring, sec, str);
+ if (!fAltroMap->Hardware2Detector(ddl, addr, timebin,
+ preSamples, sampleRate,
+ det, ring, sec, str, sam)) return kFALSE;
+ AliFMDDebug(50, ("%d/0x%02x/0x%x/0x%x/%04d -> FMD%d%c[%02d,%03d]-%d"
+ " (pre=%2d, rate=%d)",
+ ddl, ((addr >> 7) & 0x1F), ((addr >> 4) & 0x7), addr & 0xF,
+ timebin, det, ring, sec, str, sam, preSamples, sampleRate));
+ // str += GetMinStrip(det,ring,sec,str);
+ return kTRUE;
+
+}
+//____________________________________________________________________
+Bool_t
+AliFMDParameters::Hardware2Detector(UInt_t ddl, UInt_t board,
+ UInt_t chip, UInt_t chan,
+ UShort_t timebin,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const
+{
+ // Translate a hardware address to detector coordinates.
+ //
+ // See also Hardware2Detector that accepts 4 inputs
+ if (!Hardware2Detector(ddl,board,chip,chan,det,ring,sec,str)) return kFALSE;
+ UShort_t preSamples = GetPreSamples(det, ring, sec, str);
+ UShort_t sampleRate = GetSampleRate(det, ring, sec, str);
+ if (!fAltroMap->Hardware2Detector(ddl, board, chip, chan, timebin,
+ preSamples, sampleRate,
+ det, ring, sec, str, sam)) return kFALSE;
+ // str += GetMinStrip(det,ring,sec,str);
+ return kTRUE;
+}
+
//__________________________________________________________________
Bool_t
AliFMDParameters::Hardware2Detector(UInt_t ddl, UInt_t board,
UInt_t chip, UInt_t chan,
UShort_t& det, Char_t& ring,
- UShort_t& sec, UShort_t& str) const
+ UShort_t& sec, Short_t& str) const
{
// Map hardware address to detector index
if (!fAltroMap) return kFALSE;
Bool_t
AliFMDParameters::Hardware2Detector(UInt_t ddl, UInt_t addr,
UShort_t& det, Char_t& ring,
- UShort_t& sec, UShort_t& str) const
+ UShort_t& sec, Short_t& str) const
{
// Map hardware address to detector index
if (!fAltroMap) return kFALSE;
return fAltroMap->Hardware2Detector(ddl, addr, det, ring, sec, str);
}
+//____________________________________________________________________
+Bool_t
+AliFMDParameters::Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UInt_t& ddl, UInt_t& board,
+ UInt_t& altro, UInt_t& channel,
+ UShort_t& timebin) const
+{
+ if (!fAltroMap) return kFALSE;
+ UShort_t preSamples = GetPreSamples(det, ring, sec, str);
+ UShort_t sampleRate = GetSampleRate(det, ring, sec, str);
+ UShort_t strip = str - GetMinStrip(det,ring,sec,str);
+ return fAltroMap->Detector2Hardware(det, ring, sec, strip, sam,
+ preSamples, sampleRate,
+ ddl, board, altro, channel, timebin);
+}
+
+
+
//__________________________________________________________________
Bool_t
AliFMDParameters::Detector2Hardware(UShort_t det, Char_t ring,
return fAltroMap->Detector2Hardware(det,ring,sec,str, ddl,board,chip,chan);
}
+//____________________________________________________________________
+Bool_t
+AliFMDParameters::Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UInt_t& ddl, UInt_t& addr,
+ UShort_t& timebin) const
+{
+ if (!fAltroMap) return kFALSE;
+ UShort_t preSamples = GetPreSamples(det, ring, sec, str);
+ UShort_t sampleRate = GetSampleRate(det, ring, sec, str);
+ UShort_t strip = str - GetMinStrip(det,ring,sec,str);
+ return fAltroMap->Detector2Hardware(det, ring, sec, strip, sam,
+ preSamples, sampleRate,
+ ddl, addr, timebin);
+}
+
//__________________________________________________________________
Bool_t
AliFMDParameters::Detector2Hardware(UShort_t det, Char_t ring,
/** @} */
/** @{ */
- /** @name Get variable parameters */
+ /** @name Various varible conditions */
/** Whether the strip is considered dead
@param detector Detector # (1-3)
@param ring Ring ID ('I' or 'O')
Char_t,
UShort_t,
UShort_t) const { return 14+5; }
+ /** @} */
+
+ /** @{
+ @name Hardware to detector translation (and inverse) */
+ /** Map a hardware address into a detector index.
+ @param ddl Hardware DDL number
+ @param board FEC number
+ @param altro ALTRO number
+ @param channel Channel number
+ @param timebin Timebin
+ @param det On return, the detector #
+ @param ring On return, the ring ID
+ @param sec On return, the sector #
+ @param str On return, the base of strip #
+ @param sam On return, the sample number for this strip
+ @return @c true on success, false otherwise */
+ Bool_t Hardware2Detector(UInt_t ddl, UInt_t board,
+ UInt_t altro, UInt_t chan,
+ UShort_t timebin,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const;
/** Translate hardware address to detector coordinates
@param ddl DDL number
@param board Board address
Bool_t Hardware2Detector(UInt_t ddl, UInt_t board,
UInt_t chip, UInt_t channel,
UShort_t& det, Char_t& ring,
- UShort_t& sec, UShort_t& str) const;
+ UShort_t& sec, Short_t& str) const;
+ /** Map a hardware address into a detector index.
+ @param ddl Hardware DDL number
+ @param hwaddr Hardware address.
+ @param timebin Timebin
+ @param det On return, the detector #
+ @param ring On return, the ring ID
+ @param sec On return, the sector #
+ @param str On return, the base of strip #
+ @param sam On return, the sample number for this strip
+ @return @c true on success, false otherwise */
+ Bool_t Hardware2Detector(UInt_t ddl, UInt_t hwaddr,
+ UShort_t timebin,
+ UShort_t& det, Char_t& ring,
+ UShort_t& sec, Short_t& str,
+ UShort_t& sam) const;
/** Translate hardware address to detector coordinates
@param ddl DDL number
@param addr Hardware address
@param str On return, Strip number (0-511)
@return @c true on success. */
Bool_t Hardware2Detector(UInt_t ddl, UInt_t addr, UShort_t& det,
- Char_t& ring, UShort_t& sec, UShort_t& str) const;
+ Char_t& ring, UShort_t& sec, Short_t& str) const;
+ /** Map a detector index into a hardware address.
+ @param det The detector #
+ @param ring The ring ID
+ @param sec The sector #
+ @param str The strip #
+ @param sam The sample number
+ @param ddl On return, hardware DDL number
+ @param board On return, the FEC board address (local to DDL)
+ @param altro On return, the ALTRO number (local to FEC)
+ @param channel On return, the channel number (local to ALTRO)
+ @param timebin On return, the timebin number (local to ALTRO)
+ @return @c true on success, false otherwise */
+ Bool_t Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UInt_t& ddl, UInt_t& board,
+ UInt_t& altro, UInt_t& channel,
+ UShort_t& timebin) const;
/** Translate detector coordinates to hardware address
@param det Detector # (1-3)
@param ring Ring ID ('I' or 'O')
UShort_t sec, UShort_t str,
UInt_t& ddl, UInt_t& board,
UInt_t& chip, UInt_t& channel) const;
+ /** Map a detector index into a hardware address.
+ @param det The detector #
+ @param ring The ring ID
+ @param sec The sector #
+ @param str The strip #
+ @param sam The sample number
+ @param ddl On return, hardware DDL number
+ @param hwaddr On return, hardware address.
+ @param timebin On return, the timebin number (local to ALTRO)
+ @return @c true on success, false otherwise */
+ Bool_t Detector2Hardware(UShort_t det, Char_t ring,
+ UShort_t sec, UShort_t str,
+ UShort_t sam,
+ UInt_t& ddl, UInt_t& hwaddr,
+ UShort_t& timebin) const;
/** Translate detector coordinates to hardware address
@param det Detector # (1-3)
@param ring Ring ID ('I' or 'O')
: fId(id),
fCounts(0),
fGraphs(0),
- fFrame(0)
+ fFrame(0),
+ fInners(id == 1 ? 10 : 0)
{
// CTOR
//
}
}
+//____________________________________________________________________
+void
+AliFMDPattern::AliFMDPatternDetector::CopyShapes(TObjArray& src,
+ TObjArray& dest,
+ Double_t ang,
+ Double_t fx,
+ Double_t fy)
+{
+ TIter next(&src);
+ TGraph* g = 0;
+ while ((g = static_cast<TGraph*>(next()))) {
+ TGraph* gg = new TGraph(*g);
+ Double_t* x = gg->GetX();
+ Double_t* y = gg->GetY();
+ for (Int_t i = 0; i < gg->GetN(); i++) {
+ Float_t xx = x[i] * TMath::Cos(ang) - y[i] * TMath::Sin(ang);
+ Float_t yy = x[i] * TMath::Sin(ang) + y[i] * TMath::Cos(ang);
+ gg->SetPoint(i, fx * xx, fy * yy);
+ }
+ gg->SetFillStyle(g->GetFillStyle());
+ gg->SetFillColor(g->GetFillColor());
+ gg->SetLineStyle(g->GetLineStyle());
+ gg->SetLineColor(g->GetLineColor());
+ gg->SetLineWidth(g->GetLineWidth());
+ gg->SetMarkerStyle(g->GetMarkerStyle());
+ gg->SetMarkerColor(g->GetMarkerColor());
+ gg->SetMarkerSize(g->GetMarkerSize());
+ TString name(g->GetName());
+ name.ReplaceAll("X", Form("%d",fId));
+ gg->SetName(name.Data());
+ TString title(g->GetTitle());
+ title.ReplaceAll("X", Form("%d",fId));
+ gg->SetTitle(title.Data());
+ dest.Add(gg);
+ }
+ dest.SetOwner();
+}
+
//____________________________________________________________________
void
AliFMDPattern::AliFMDPatternDetector::Begin(Int_t nlevel,
fFrame->SetStats(kFALSE);
fFrame->Draw();
}
- DrawShape(inners);
- if (fId != 1) DrawShape(outers);
+ Double_t ang = (fId == 1 ? -TMath::Pi() / 2 : 0);
+ Double_t fx = (fId == 3 ? -1 : 1); // Flip around Y
+ Double_t fy = (fId == 1 ? 1 : 1); // Flip around X
+
+ CopyShapes(inners, fInners, ang, fx, fy);
+ DrawShape(fInners);
+ if (fId != 1) {
+ CopyShapes(outers, fOuters, ang, fx, fy);
+ DrawShape(fOuters);
+ }
+
for (Int_t i = 0; i < nlevel; i++) {
TGraph* g = new TGraph;
Int_t idx = Int_t(Float_t(i) / nlevel * style->GetNumberOfColors());
TObjArray& gs = (*r == 'I' ? fInners : fOuters);
Float_t& mr = (*r == 'I' ? fInnerMax : fOuterMax);
Int_t nm = ring->GetNModules();
- AliInfo(Form("Making %d modules for %c", nm, *r));
+ AliFMDDebug(1, ("Making %d modules for %c", nm, *r));
for (Int_t m = 0; m < nm; m++) {
Int_t nv = vs.GetEntries();
Double_t a = TMath::Pi() / 180 * (m * 2 + 1) * ring->GetTheta();
if (c == 0) { x0 = w.X(); y0 = w.Y(); }
g->SetPoint(c, w.X(), w.Y());
}
- g->SetName(Form("FMDX%c_%02d", *r, m));
+ g->SetName(Form("FMDX%c_%02d%02d", *r, 2*m,2*m+1));
+ g->SetTitle(Form("FMDX%c, sectors %d and %d", *r, 2*m,2*m+1));
g->SetPoint(nv, x0, y0);
g->SetFillColor((*rs == 'I' ?
(m % 2 == 0 ? 18 : 17) :
geom->Detector2XYZ(det, rng, sec, str, x, y, z);
// Make code-checker shut the f**k up
TRandom* rand = gRandom;
- if (true) {
+ if (false) {
AliFMDRing* r = geom->GetRing(rng);
Double_t t = .9 * r->GetTheta() / 2;
Double_t a = rand->Uniform(-t,t) * TMath::Pi() / 180;
/** Assignement operator
-- Not implemented */
AliFMDPatternDetector& operator=(const AliFMDPatternDetector&);
-
+ void CopyShapes(TObjArray& input, TObjArray& own,
+ Double_t ang=0, Double_t fx=1, Double_t fy=1);
+ /** Our own cache of shapes */
+ TObjArray fInners;
+ /** Our own cache of shapes */
+ TObjArray fOuters;
};
void AliFMDPedestalDA::Analyse(UShort_t det,
Char_t ring,
UShort_t sec,
- UShort_t strip) {
+ UShort_t strip)
+{
TH1S* hChannel = GetChannel(det, ring, sec, strip);
if(hChannel->GetEntries() == 0) {
fReader(reader),
fSampleRate(1),
fData(0),
- fNbytes(0)
+ fNbytes(0),
+ fSeen()
{
// Default CTOR
}
AliError("No TClonesArray passed");
return kFALSE;
}
+ const UShort_t kUShortMax = (1 << 16) - 1;
+ fSeen.Reset(kUShortMax);
+
// if (!fReader->ReadHeader()) {
// AliError("Couldn't read header");
// return kFALSE;
input.SetShortDataHeader(!pars->HasCompleteHeader());
UShort_t stripMin = 0;
- UShort_t stripMax = 127;
- UShort_t preSamp = 14+5;
+ UShort_t stripMax = 0; // 127;
+ UShort_t preSamp = 0; // 14+5;
UInt_t ddl = 0;
UInt_t rate = 0;
}
AliFMDDebug(5, ("Read channel 0x%x of size %d", hwaddr, last));
- UShort_t det, sec, str;
- Char_t ring;
- if (!pars->Hardware2Detector(ddl, hwaddr, det, ring, sec, str)) {
- AliError(Form("Failed to get detector id from DDL %d "
- "and hardware address 0x%x", ddl, hwaddr));
- continue;
- }
+
- rate = pars->GetSampleRate(det, ring, sec, str);
- stripMin = pars->GetMinStrip(det, ring, sec, str);
- stripMax = pars->GetMaxStrip(det, ring, sec, str);
- preSamp = pars->GetPreSamples(det, ring, sec, str);
- AliFMDDebug(5, ("DDL 0x%04x, address 0x%03x maps to FMD%d%c[%2d,%3d]",
- ddl, hwaddr, det, ring, sec, str));
// Loop over the `timebins', and make the digits
for (size_t i = 0; i < last; i++) {
- if (i < preSamp) continue;
- Int_t n = array->GetEntriesFast();
- Short_t curStr = str + stripMin + (i-preSamp) / rate;
- if ((curStr-str) > stripMax) {
- // AliInfo(Form("timebin %4d -> (%3d+%3d+(%4d-%d)/%d) -> %d",
- // i, str, stripMin, i, preSamp, rate, curStr));
- // AliError(Form("Current strip is %3d (0x%04x,0x%03x,%4d) "
- // "but DB says max is %3d (rate=%d)",
- // curStr, ddl, hwaddr, i, str+stripMax, rate));
- // Garbage timebins - ignore
+ // if (i < preSamp) continue;
+
+ UShort_t det, sec, samp;
+ Short_t str;
+ Char_t ring;
+ if (!pars->Hardware2Detector(ddl, hwaddr, i, det, ring, sec, str, samp)) {
+ AliError(Form("Failed to get detector id from DDL %d, "
+ "hardware address 0x%03x, timebin %d", ddl, hwaddr, i));
continue;
}
- AliFMDDebug(5, ("making digit for FMD%d%c[%2d,%3d] from sample %4d",
- det, ring, sec, curStr, i));
- new ((*array)[n]) AliFMDDigit(det, ring, sec, curStr, data[i],
- (rate >= 2 ? data[i+1] : 0),
- (rate >= 3 ? data[i+2] : 0),
- (rate >= 4 ? data[i+3] : 0));
- if (rate >= 2) i++;
- if (rate >= 3) i++;
- if (rate >= 4) i++;
+ AliFMDDebug(10, ("0x%04x/0x%03x/%04d maps to FMD%d%c[%2d,%3d]-%d",
+ ddl, hwaddr, i, det, ring, sec, str, samp));
+ if (str < 0) {
+ AliFMDDebug(8, ("Got presamples at timebin %d", i));
+ continue;
+ }
+
+ stripMin = pars->GetMinStrip(det, ring, sec, str);
+ stripMax = pars->GetMaxStrip(det, ring, sec, str);
+ preSamp = pars->GetPreSamples(det, ring, sec, str);
+ rate = pars->GetSampleRate(det, ring, sec, str);
+ Short_t lstrip = (i - preSamp) / rate + stripMin;
+
+ AliFMDDebug(15, ("Checking if strip %d (%d) in range [%d,%d]",
+ lstrip, str, stripMin, stripMax));
+ if (lstrip < stripMin || lstrip > stripMax) {
+ AliFMDDebug(5, ("FMD%d%c[%02d,%03d]-%d out of range (%3d->%3d)",
+ det, ring, sec, samp, str, stripMin, stripMax));
+ continue;
+ }
+
+ // Check the cache of indicies
+ Int_t idx = fSeen(det, ring, sec, str);
+ if (idx == kUShortMax) {
+ // We haven't seen this strip yet.
+ fSeen(det, ring, sec, str) = idx = array->GetEntriesFast();
+ AliFMDDebug(7,("making digit for FMD%d%c[%2d,%3d]-%d from timebin %4d",
+ det, ring, sec, str, samp, i));
+ new ((*array)[idx]) AliFMDDigit(det, ring, sec, str);
+ }
+ AliFMDDigit* digit = static_cast<AliFMDDigit*>(array->At(idx));
+ AliFMDDebug(10,
+ ("Setting from FMD%d%c[%2d,%3d]-%d from timebin %4d = %4d",
+ det, ring, sec, str, samp, i, data[i]));
+ digit->SetCount(samp, data[i]);
}
}
return kTRUE;
Bool_t AliFMDRawReader::ReadSODevent(AliFMDCalibSampleRate* sampleRate,
AliFMDCalibStripRange* stripRange,
TArrayS &pulseSize,
- TArrayS &pulseLength) {
+ TArrayS &pulseLength)
+{
AliFMDDebug(0, ("Start of SOD/EOD"));
UInt_t strip_high[18];
UInt_t pulse_size[18];
UInt_t pulse_length[18];
+ AliFMDParameters* param = AliFMDParameters::Instance();
while(fReader->ReadNextData(fData)) {
ULong_t nWords = GetNwords();
UInt_t trailerLast = Get32bitWord(nWords);
AliFMDDebug(20, (" # Bytes: %d, # Words: %d, Last word: 0x%08x",
- fNbytes, nWords, trailerLast));
+ fNbytes, nWords, trailerLast));
if ((trailerLast & 0xFFFF0000) != 0xAAAA0000) {
AliWarning(Form("Last word 0x%08x does not match RCU II trailer",
trailerLast));
return kFALSE;
}
- ULong_t nTrailerWords = trailerLast & 0x7f; // 7 last bits is size of trailer
-
+ // 7 last bits is size of trailer
+ ULong_t nTrailerWords = trailerLast & 0x7f;
ULong_t nPayloadWords = Get32bitWord(nWords - nTrailerWords+1);
+
AliFMDDebug(20, (" # trailer words: %d, # payload words: %d",
- nTrailerWords, nPayloadWords));
+ nTrailerWords, nPayloadWords));
for (ULong_t i = 1; i <= nPayloadWords ; i++) {
UInt_t payloadWord = Get32bitWord(i);
- // address is only 24 bit
- UInt_t address = (0xffffff & payloadWord);
- UInt_t type = ((address >> 21) & 0xf);
- UInt_t error = ((address >> 20) & 0x1);
- UInt_t bcast = ((address >> 18) & 0x1);
- UInt_t bc_not_altro = ((address >> 17) & 0x1);
- UInt_t board = ((address >> 12) & 0x1f);
- UInt_t instruction = 0;
- UInt_t chip = 0;
- UInt_t channel = 0;
- if(bc_not_altro)
- instruction = address & 0xfff;
- else {
- chip = ((address >> 9) & 0x7);
- channel = ((address >> 5) & 0x5);
- instruction = (address & 0x1f);
- }
-
- Bool_t readDataWord = kFALSE;
- switch(type) {
- case 0x0: // Fec read
- readDataWord = kTRUE;
- case 0x1: // Fec cmd
- case 0x2: // Fec write
- i++;
- break;
- case 0x4: // Loop
- case 0x5: // Wait
- break;
- case 0x6: // End sequence
- case 0x7: // End Mem
- i = nPayloadWords + 1;
- break;
- default:
- break;
- }
-
+ // address is only 24 bit
+ UInt_t address = (0xffffff & payloadWord);
+ UInt_t type = ((address >> 21) & 0xf);
+ UInt_t error = ((address >> 20) & 0x1);
+ UInt_t bcast = ((address >> 18) & 0x1);
+ UInt_t bc_not_altro = ((address >> 17) & 0x1);
+ UInt_t board = ((address >> 12) & 0x1f);
+ UInt_t instruction = 0;
+ UInt_t chip = 0;
+ UInt_t channel = 0;
+ if(bc_not_altro)
+ instruction = address & 0xfff;
+ else {
+ chip = ((address >> 9) & 0x7);
+ channel = ((address >> 5) & 0x5);
+ instruction = (address & 0x1f);
+ }
+ Bool_t readDataWord = kFALSE;
+ switch(type) {
+ case 0x0: // Fec read
+ readDataWord = kTRUE;
+ case 0x1: // Fec cmd
+ case 0x2: // Fec write
+ i++;
+ break;
+ case 0x4: // Loop
+ case 0x5: // Wait
+ break;
+ case 0x6: // End sequence
+ case 0x7: // End Mem
+ i = nPayloadWords + 1;
+ break;
+ default:
+ break;
+ }
- if(!readDataWord) //Don't read unless we have a FEC_RD
- continue;
- UInt_t dataWord = Get32bitWord(i);
- UInt_t data = (0xFFFFF & dataWord) ;
- //UInt_t data = (0xFFFF & dataWord) ;
+ //Don't read unless we have a FEC_RD
+ if(!readDataWord) continue;
+
+ UInt_t dataWord = Get32bitWord(i);
+ UInt_t data = (0xFFFFF & dataWord) ;
+ //UInt_t data = (0xFFFF & dataWord) ;
- if(error) {
- AliWarning(Form("error bit detected at Word 0x%06x; "
- "error % d, type %d, bc_not_altro %d, "
- "bcast %d, board 0x%02x, chip 0x%x, "
- "channel 0x%02x, instruction 0x%03x",
- address, error, type, bc_not_altro,
- bcast,board,chip,channel,instruction));
-
-
- //process error
- continue;
- }
+ if(error) {
+ AliWarning(Form("error bit detected at Word 0x%06x; "
+ "error % d, type %d, bc_not_altro %d, "
+ "bcast %d, board 0x%02x, chip 0x%x, "
+ "channel 0x%02x, instruction 0x%03x",
+ address, error, type, bc_not_altro,
+ bcast,board,chip,channel,instruction));
+ //process error
+ continue;
+ }
- switch(instruction) {
+ switch(instruction) {
- case 0x01: break; // First ADC T
- case 0x02: break; // I 3.3 V
- case 0x03: break; // I 2.5 V altro digital
- case 0x04: break; // I 2.5 V altro analog
- case 0x05: break; // I 2.5 V VA
- case 0x06: break; // First ADC T
- case 0x07: break; // I 3.3 V
- case 0x08: break; // I 2.5 V altro digital
- case 0x09: break; // I 2.5 V altro analog
- case 0x0A: break; // I 2.5 V VA
- case 0x2D: break; // Second ADC T
- case 0x2E: break; // I 1.5 V VA
- case 0x2F: break; // I -2.0 V
- case 0x30: break; // I -2.0 V VA
- case 0x31: break; // 2.5 V Digital driver
- case 0x32: break; // Second ADC T
- case 0x33: break; // I 1.5 V VA
- case 0x34: break; // I -2.0 V
- case 0x35: break; // I -2.0 V VA
- case 0x36: break; // 2.5 V Digital driver
- case 0x37: break; // Third ADC T
- case 0x38: break; // Temperature sens. 1
- case 0x39: break; // Temperature sens. 2
- case 0x3A: break; // U 2.5 altro digital (m)
- case 0x3B: break; // U 2.5 altro analog (m)
- case 0x3C: break; // Third ADC T
- case 0x3D: break; // Temperature sens. 1
- case 0x3E: break; // Temperature sens. 2
- case 0x3F: break; // U 2.5 altro digital (m)
- case 0x40: break; // U 2.5 altro analog (m)
- case 0x41: break; // Forth ADC T
- case 0x42: break; // U 2.5 VA (m)
- case 0x43: break; // U 1.5 VA (m)
- case 0x44: break; // U -2.0 VA (m)
- case 0x45: break; // U -2.0 (m)
- case 0x46: break; // Forth ADC T
- case 0x47: break; // U 2.5 VA (m)
- case 0x48: break; // U 1.5 VA (m)
- case 0x49: break; // U -2.0 VA (m)
- case 0x4A: break; // U -2.0 (m)
- // Counters
- case 0x0B: break; // L1 trigger CouNTer
- case 0x0C: break; // L2 trigger CouNTer
- case 0x0D: break; // Sampling CLK CouNTer
- case 0x0E: break; // DSTB CouNTer
- // Test mode
- case 0x0F: break; // Test mode word
- case 0x10: break; // Undersampling ratio.
- // Configuration and status
- case 0x11: break; // Config/Status Register 0
- case 0x12: break; // Config/Status Register 1
- case 0x13: break; // Config/Status Register 2
- case 0x14: break; // Config/Status Register 3
- case 0x15: break; // Free
- // Comands:
- case 0x16: break; // Latch L1, L2, SCLK Counters
- case 0x17: break; // Clear counters
- case 0x18: break; // Clear CSR1
- case 0x19: break; // rstb ALTROs
- case 0x1A: break; // rstb BC
- case 0x1B: break; // Start conversion
- case 0x1C: break; // Scan event length
- case 0x1D: break; // Read event length
- case 0x1E: break; // Start test mode
- case 0x1F: break; // Read acquisition memory
- // FMD
- case 0x20: break; // FMDD status
- case 0x21: break; // L0 counters
- case 0x22: break; // FMD: Wait to hold
- case 0x23: break; // FMD: L1 timeout
- case 0x24: break; // FMD: L2 timeout
- case 0x25: // FMD: Shift clk
- shift_clk[board] = ((data >> 8 ) & 0xFF);
- break;
- case 0x26: // FMD: Strips
- strip_low[board] = ((data >> 0 ) & 0xFF);
- strip_high[board] = ((data >> 8 ) & 0xFF);
- break;
- case 0x27: // FMD: Cal pulse
- pulse_size[board] = ((data >> 8 ) & 0xFF);
- break;
- case 0x28: break; // FMD: Shape bias
- case 0x29: break; // FMD: Shape ref
- case 0x2A: break; // FMD: Preamp ref
- case 0x2B: // FMD: Sample clk
- sample_clk[board] = ((data >> 8 ) & 0xFF);
- break;
- case 0x2C: break; // FMD: Commands
- case 0x4B: // FMD: Cal events
- pulse_length[board] = ((data >> 0 ) & 0xFF);
- break;
- default: break;
+ case 0x01: break; // First ADC T
+ case 0x02: break; // I 3.3 V
+ case 0x03: break; // I 2.5 V altro digital
+ case 0x04: break; // I 2.5 V altro analog
+ case 0x05: break; // I 2.5 V VA
+ case 0x06: break; // First ADC T
+ case 0x07: break; // I 3.3 V
+ case 0x08: break; // I 2.5 V altro digital
+ case 0x09: break; // I 2.5 V altro analog
+ case 0x0A: break; // I 2.5 V VA
+ case 0x2D: break; // Second ADC T
+ case 0x2E: break; // I 1.5 V VA
+ case 0x2F: break; // I -2.0 V
+ case 0x30: break; // I -2.0 V VA
+ case 0x31: break; // 2.5 V Digital driver
+ case 0x32: break; // Second ADC T
+ case 0x33: break; // I 1.5 V VA
+ case 0x34: break; // I -2.0 V
+ case 0x35: break; // I -2.0 V VA
+ case 0x36: break; // 2.5 V Digital driver
+ case 0x37: break; // Third ADC T
+ case 0x38: break; // Temperature sens. 1
+ case 0x39: break; // Temperature sens. 2
+ case 0x3A: break; // U 2.5 altro digital (m)
+ case 0x3B: break; // U 2.5 altro analog (m)
+ case 0x3C: break; // Third ADC T
+ case 0x3D: break; // Temperature sens. 1
+ case 0x3E: break; // Temperature sens. 2
+ case 0x3F: break; // U 2.5 altro digital (m)
+ case 0x40: break; // U 2.5 altro analog (m)
+ case 0x41: break; // Forth ADC T
+ case 0x42: break; // U 2.5 VA (m)
+ case 0x43: break; // U 1.5 VA (m)
+ case 0x44: break; // U -2.0 VA (m)
+ case 0x45: break; // U -2.0 (m)
+ case 0x46: break; // Forth ADC T
+ case 0x47: break; // U 2.5 VA (m)
+ case 0x48: break; // U 1.5 VA (m)
+ case 0x49: break; // U -2.0 VA (m)
+ case 0x4A: break; // U -2.0 (m)
+ // Counters
+ case 0x0B: break; // L1 trigger CouNTer
+ case 0x0C: break; // L2 trigger CouNTer
+ case 0x0D: break; // Sampling CLK CouNTer
+ case 0x0E: break; // DSTB CouNTer
+ // Test mode
+ case 0x0F: break; // Test mode word
+ case 0x10: break; // Undersampling ratio.
+ // Configuration and status
+ case 0x11: break; // Config/Status Register 0
+ case 0x12: break; // Config/Status Register 1
+ case 0x13: break; // Config/Status Register 2
+ case 0x14: break; // Config/Status Register 3
+ case 0x15: break; // Free
+ // Comands:
+ case 0x16: break; // Latch L1, L2, SCLK Counters
+ case 0x17: break; // Clear counters
+ case 0x18: break; // Clear CSR1
+ case 0x19: break; // rstb ALTROs
+ case 0x1A: break; // rstb BC
+ case 0x1B: break; // Start conversion
+ case 0x1C: break; // Scan event length
+ case 0x1D: break; // Read event length
+ case 0x1E: break; // Start test mode
+ case 0x1F: break; // Read acquisition memory
+ // FMD
+ case 0x20: break; // FMDD status
+ case 0x21: break; // L0 counters
+ case 0x22: break; // FMD: Wait to hold
+ case 0x23: break; // FMD: L1 timeout
+ case 0x24: break; // FMD: L2 timeout
+ case 0x25: // FMD: Shift clk
+ shift_clk[board] = ((data >> 8 ) & 0xFF);
+ break;
+ case 0x26: // FMD: Strips
+ strip_low[board] = ((data >> 0 ) & 0xFF);
+ strip_high[board] = ((data >> 8 ) & 0xFF);
+ break;
+ case 0x27: // FMD: Cal pulse
+ pulse_size[board] = ((data >> 8 ) & 0xFF);
+ break;
+ case 0x28: break; // FMD: Shape bias
+ case 0x29: break; // FMD: Shape ref
+ case 0x2A: break; // FMD: Preamp ref
+ case 0x2B: // FMD: Sample clk
+ sample_clk[board] = ((data >> 8 ) & 0xFF);
+ break;
+ case 0x2C: break; // FMD: Commands
+ case 0x4B: // FMD: Cal events
+ pulse_length[board] = ((data >> 0 ) & 0xFF);
+ break;
+ default: break;
- }
- AliFMDDebug(50, ("instruction 0x%x, dataword 0x%x",instruction,dataWord));
+ }
+ AliFMDDebug(50, ("instruction 0x%x, dataword 0x%x",
+ instruction,dataWord));
}
- UShort_t det,sector,strip;
+ UShort_t det,sector;
+ Short_t strip;
Char_t ring;
const UInt_t boards[4] = {0,1,16,17};
for(Int_t i=0;i<4;i++) {
- if(ddl==0 && (i==1 || i==3))
- continue;
+ if(ddl==0 && (i==1 || i==3)) continue;
+
UInt_t chip =0, channel=0;
-
- AliFMDParameters::Instance()->Hardware2Detector(ddl,boards[i],chip,channel,det,ring,sector,strip);
+ param->Hardware2Detector(ddl,boards[i],chip,channel,
+ det,ring,sector,strip);
UInt_t samplerate = 1;
-
if(sample_clk[boards[i]] == 0) {
- if(ddl == 0) {
- Int_t sample1 = sample_clk[boards[0]];
- Int_t sample2 = sample_clk[boards[2]];
- if(sample1) sample_clk[boards[i]] = sample1;
- else sample_clk[boards[i]] = sample2;
- }
-
- if(ddl!=0) {
- Int_t sample1 = sample_clk[boards[0]];
- Int_t sample2 = sample_clk[boards[1]];
- Int_t sample3 = sample_clk[boards[2]];
- Int_t sample4 = sample_clk[boards[3]];
- Int_t agreement = 0;
- if(sample1 == sample2) agreement++;
- if(sample1 == sample3) agreement++;
- if(sample1 == sample4) agreement++;
- if(sample2 == sample3) agreement++;
- if(sample2 == sample4) agreement++;
- if(sample3 == sample4) agreement++;
+ if(ddl == 0) {
+ Int_t sample1 = sample_clk[boards[0]];
+ Int_t sample2 = sample_clk[boards[2]];
+ if(sample1) sample_clk[boards[i]] = sample1;
+ else sample_clk[boards[i]] = sample2;
+ }
+ else {
+ Int_t sample1 = sample_clk[boards[0]];
+ Int_t sample2 = sample_clk[boards[1]];
+ Int_t sample3 = sample_clk[boards[2]];
+ Int_t sample4 = sample_clk[boards[3]];
+ Int_t agreement = 0;
+ if(sample1 == sample2) agreement++;
+ if(sample1 == sample3) agreement++;
+ if(sample1 == sample4) agreement++;
+ if(sample2 == sample3) agreement++;
+ if(sample2 == sample4) agreement++;
+ if(sample3 == sample4) agreement++;
- Int_t idx = 0;
- if(i<3) idx = i+1;
- else idx = i-1;
- if(agreement == 3) {
- sample_clk[boards[i]] = sample_clk[boards[idx]];
- shift_clk[boards[i]] = shift_clk[boards[idx]];
- strip_low[boards[i]] = strip_low[boards[idx]];
- strip_high[boards[i]] = strip_high[boards[idx]];
- pulse_length[boards[i]] = pulse_length[boards[idx]];
- pulse_size[boards[i]] = pulse_size[boards[idx]];
- AliFMDDebug(0, ("Vote taken for ddl %d, board 0x%x",ddl,boards[i]));
- }
+ Int_t idx = 0;
+ if(i<3) idx = i+1;
+ else idx = i-1;
+ if(agreement == 3) {
+ sample_clk[boards[i]] = sample_clk[boards[idx]];
+ shift_clk[boards[i]] = shift_clk[boards[idx]];
+ strip_low[boards[i]] = strip_low[boards[idx]];
+ strip_high[boards[i]] = strip_high[boards[idx]];
+ pulse_length[boards[i]] = pulse_length[boards[idx]];
+ pulse_size[boards[i]] = pulse_size[boards[idx]];
+ AliFMDDebug(0, ("Vote taken for ddl %d, board 0x%x",
+ ddl,boards[i]));
}
+ }
}
if(sample_clk[boards[i]])
- samplerate = shift_clk[boards[i]]/sample_clk[boards[i]];
+ samplerate = shift_clk[boards[i]]/sample_clk[boards[i]];
sampleRate->Set(det,ring,sector,0,samplerate);
- stripRange->Set(det,ring,sector,0,strip_low[boards[i]],strip_high[boards[i]]);
+ stripRange->Set(det,ring,sector,0,
+ strip_low[boards[i]],strip_high[boards[i]]);
AliFMDDebug(20, ("det %d, ring %c, ",det,ring));
- pulseLength.AddAt(pulse_length[boards[i]],GetHalfringIndex(det,ring,boards[i]/16));
- pulseSize.AddAt(pulse_size[boards[i]],GetHalfringIndex(det,ring,boards[i]/16));
+ pulseLength.AddAt(pulse_length[boards[i]],
+ GetHalfringIndex(det,ring,boards[i]/16));
+ pulseSize.AddAt(pulse_size[boards[i]],
+ GetHalfringIndex(det,ring,boards[i]/16));
AliFMDDebug(20, (": Board: 0x%02x\n"
- "\tstrip_low %3d, strip_high %3d\n"
- "\tshift_clk %3d, sample_clk %3d\n"
- "\tpulse_size %3d, pulse_length %3d",
- boards[i],
- strip_low[boards[i]], strip_high[boards[i]],
- shift_clk[boards[i]], sample_clk[boards[i]],
- pulse_size[boards[i]],pulse_length[boards[i]]));
+ "\tstrip_low %3d, strip_high %3d\n"
+ "\tshift_clk %3d, sample_clk %3d\n"
+ "\tpulse_size %3d, pulse_length %3d",
+ boards[i],
+ strip_low[boards[i]], strip_high[boards[i]],
+ shift_clk[boards[i]], sample_clk[boards[i]],
+ pulse_size[boards[i]],pulse_length[boards[i]]));
}
}
return word;
}
//_____________________________________________________________________
-Int_t AliFMDRawReader::GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board) {
+Int_t AliFMDRawReader::GetHalfringIndex(UShort_t det, Char_t ring,
+ UShort_t board) {
UShort_t iring = (ring == 'I' ? 1 : 0);
#ifndef ROOT_TTask
# include <TTask.h>
#endif
+#include "AliFMDUShortMap.h"
//____________________________________________________________________
class AliRawReader;
fReader(0),
fSampleRate(0),
fData(0),
- fNbytes(0)
+ fNbytes(0),
+ fSeen()
{}
AliFMDRawReader& operator=(const AliFMDRawReader&) { return *this; }
ULong_t GetNwords() const {return fNbytes / 4;}
UInt_t Get32bitWord(Int_t idx);
Int_t GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board);
- TTree* fTree; //! Pointer to tree to read into
- AliRawReader* fReader; //! Pointer to raw reader
- UShort_t fSampleRate; // The sample rate (if 0, inferred from data)
- UChar_t* fData;
- ULong_t fNbytes;
+ TTree* fTree; //! Pointer to tree to read into
+ AliRawReader* fReader; //! Pointer to raw reader
+ UShort_t fSampleRate; // The sample rate (if 0, inferred from data)
+ UChar_t* fData;
+ ULong_t fNbytes;
+ AliFMDUShortMap fSeen;
ClassDef(AliFMDRawReader, 0) // Read FMD raw data into a cache
};
// Which channel number in the ALTRO channel we're at
UShort_t nWords = 0;
UShort_t preSamples = 0;
-
- // How many times the ALTRO Samples one VA1_ALICE channel
- Int_t sampleRate = 1;
+ UShort_t sampleRate = 0;
// A buffer to hold 1 ALTRO channel - Normally, one ALTRO channel
// holds 128 VA1_ALICE channels, sampled at a rate of `sampleRate'
// The Altro buffer
AliAltroBuffer* altro = 0;
-
+
+ Int_t totalWords = 0;
+ Int_t nCounts = 0;
+
// Loop over the digits in the event. Note, that we assume the
// the digits are in order in the branch. If they were not, we'd
// have to cache all channels before we could write the data to
UShort_t strip = digit->Strip();
UInt_t ddl;
UInt_t addr;
+ UShort_t time;
+
+ AliFMDDebug(10, ("Processing digit # %5d FMD%d%c[%2d,%3d]",
+ i, det, ring, sector, strip));
+ threshold = pars->GetZeroSuppression(det, ring, sector, strip);
+ sampleRate = pars->GetSampleRate(det, ring, sector, strip);
+ preSamples = pars->GetPreSamples(det, ring, sector, strip);
+
if (det != oldDet) {
AliFMDDebug(5, ("Got new detector: %d (was %d)", det, oldDet));
oldDet = det;
}
- AliFMDDebug(10, ("Processing digit # %5d FMD%d%c[%2d,%3d]",
- i, det, ring, sector, strip));
- threshold = pars->GetZeroSuppression(det, ring, sector, strip);
- if (!pars->Detector2Hardware(det, ring, sector, strip, ddl, addr)) {
- AliError(Form("Failed to get hardware address for FMD%d%c[%2d,%3d]",
- det, ring, sector, strip));
- continue;
- }
- preSamples = pars->GetPreSamples(det, ring, sector, strip);
+ AliFMDDebug(10, ("Sample rate is %d", sampleRate));
- AliFMDDebug(10, ("FMD%d%c[%2d,%3d]-> ddl: 0x%x addr: 0x%x",
- det, ring, sector, strip, ddl, addr));
- if (addr != prevaddr) {
- // Flush a channel to output
- AliFMDDebug(15, ("Now hardware address 0x%x from FMD%d%c[%2d,%3d] "
- "(board 0x%x, chip 0x%x, channel 0x%x), flushing old "
- "channel at 0x%x with %d words",
- addr, det, ring, sector, strip,
- (addr >> 7), (addr >> 4) & 0x7, addr & 0xf,
- prevaddr, nWords));
- if (altro) altro->WriteChannel(prevaddr,nWords,data.fArray,threshold);
- nWords = preSamples;
- prevaddr = addr;
- for (size_t j = 0; j < nWords; j++) data[j] = digit->Count(0);
- }
- if (ddl != prevddl) {
- AliFMDDebug(5, ("FMD: New DDL, was %d, now %d", prevddl, ddl));
- // If an altro exists, delete the object, flushing the data to
- // disk, and closing the file.
- if (altro) {
- // When the first argument is false, we write the real
- // header.
- AliFMDDebug(15, ("Closing output"));
- altro->Flush();
- altro->WriteDataHeader(kFALSE, kFALSE);
- delete altro;
- altro = 0;
+ for (UShort_t j = 0; j < sampleRate; j++) {
+ if (!pars->Detector2Hardware(det,ring,sector,strip,j,ddl,addr,time)){
+ AliError(Form("Failed to get hardware address for FMD%d%c[%2d,%3d]-%d",
+ det, ring, sector, strip, j));
+ continue;
}
- prevddl = ddl;
- // Need to open a new DDL!
- TString filename(AliDAQ::DdlFileName(fFMD->GetName(), ddl));
- AliFMDDebug(5, ("New altro buffer with DDL file %s", filename.Data()));
- // Create a new altro buffer - a `1' as the second argument
- // means `write mode'
- altro = new AliAltroBuffer(filename.Data());
- altro->SetMapping(pars->GetAltroMap());
- // Write a dummy (first argument is true) header to the DDL
- // file - later on, when we close the file, we write the real
- // header
- altro->WriteDataHeader(kTRUE, kFALSE);
- }
- // Store the counts of the ADC in the channel buffer
- sampleRate = pars->GetSampleRate(det, ring, sector, strip);
- for (int s = 0; s < sampleRate; s++) {
- data[nWords] = digit->Count(s);
+ AliFMDDebug(10, ("FMD%d%c[%2d,%3d]-%d-> 0x%x/0x%x/%04d",
+ det, ring, sector, strip, j, ddl, addr, time));
+ if (addr != prevaddr) {
+ // Flush a channel to output
+ AliFMDDebug(5, ("Now hardware address 0x%x from FMD%d%c[%2d,%3d]-%d"
+ "(b: 0x%02x, a: 0x%01x, c: 0x%02x, t: %04d), "
+ "flushing old channel at 0x%x with %d words",
+ addr, det, ring, sector, strip, j,
+ (addr >> 7), (addr >> 4) & 0x7, addr & 0xf,
+ time, prevaddr, nWords));
+ totalWords += nWords;
+ if (altro) altro->WriteChannel(prevaddr,nWords,data.fArray,threshold);
+ nWords = 0;
+ prevaddr = addr;
+ }
+ if (ddl != prevddl) {
+ AliFMDDebug(10, ("FMD: New DDL, was %d, now %d", prevddl, ddl));
+ // If an altro exists, delete the object, flushing the data to
+ // disk, and closing the file.
+ if (altro) {
+ // When the first argument is false, we write the real
+ // header.
+ AliFMDDebug(15, ("Closing output"));
+ altro->Flush();
+ altro->WriteDataHeader(kFALSE, kFALSE);
+ delete altro;
+ altro = 0;
+ }
+ prevddl = ddl;
+ // Need to open a new DDL!
+ TString filename(AliDAQ::DdlFileName(fFMD->GetName(), ddl));
+ AliFMDDebug(5, ("New altro buffer with DDL file %s", filename.Data()));
+ // Create a new altro buffer - a `1' as the second argument
+ // means `write mode'
+ altro = new AliAltroBuffer(filename.Data());
+ altro->SetMapping(pars->GetAltroMap());
+ // Write a dummy (first argument is true) header to the DDL
+ // file - later on, when we close the file, we write the real
+ // header
+ altro->WriteDataHeader(kTRUE, kFALSE);
+ }
+
+ // Store the counts of the ADC in the channel buffer
+ AliFMDDebug(6, ("Storing FMD%d%c[%02d,%03d]-%d in timebin %d (%d)",
+ det, ring, sector, strip, j, time, preSamples));
+ UShort_t count = digit->Count(j);
+ data[time] = count;
nWords++;
+ nCounts++;
+ if (time == preSamples) {
+ AliFMDDebug(5, ("Filling in %4d for %d presamples", count, preSamples));
+ for (int k = 0; k < preSamples; k++) data[k] = count;
+ nWords += preSamples;
+ }
}
}
// Finally, we need to close the final ALTRO buffer if it wasn't
altro->WriteDataHeader(kFALSE, kFALSE);
delete altro;
}
+ AliFMDDebug(5, ("Wrote a total of %d words for %d counts",
+ nWords, nCounts));
}
#else
//____________________________________________________________________
#ifndef ALIRECONSTRUCTOR_H
# include <AliReconstructor.h>
#endif
-
#include "AliLog.h"
//____________________________________________________________________
AliMagF* mag = static_cast<AliMagF*>(magF->Get("mag"));
if (!mag) return;
AliTracker::SetFieldMap(mag, true);
+ AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+ AliCDBManager::Instance()->SetRun(0);
AliReconstruction rec;
rec.SetRunLocalReconstruction("FMD");
rec.SetRunReconstruction("FMD");
rec.SetRunTracking("");
rec.SetFillESD("FMD");
- rec.SetInput("./");
+ rec.SetRunQA("");
+ rec.SetInput(".");
// rec.SetRecoParam("TOF", new AliTOFRecoParam());
rec.Run();
void
PatternRaw(const char* file="raw.root")
{
- AliLog::SetModuleDebugLevel("FMD", 3);
+ AliLog::SetModuleDebugLevel("FMD", 0);
AliCDBManager* cdb = AliCDBManager::Instance();
cdb->SetDefaultStorage("local://$ALICE_ROOT");
cdb->SetRun(0);
/** @defgroup ALTRO_test ALTRO test
@ingroup FMD_script
*/
+#ifndef __CINT__
+# include <TString.h>
+// # include <FMD/AliFMDParameters.h>
+# include <FMD/AliFMDAltroMapping.h>
+// # include <FMD/AliFMDUShortMap.h>
+// # include <FMD/AliFMDBoolMap.h>
+# include <TError.h>
+# include <iostream>
+#endif
+#define SHOW_ALL 1
//____________________________________________________________________
/** @ingroup ALTRO_test
@param ddl
@param hwaddr
@return */
-Char_t*
-Addr2Str(UInt_t ddl, UInt_t hwaddr)
+const Char_t*
+Addr2Str(UInt_t ddl, UInt_t hwaddr, UShort_t timebin)
{
static TString s;
UInt_t board = (hwaddr >> 7) & 0x1F;
UInt_t chip = (hwaddr >> 4) & 0x7;
UInt_t chan = hwaddr & 0xF;
- s = Form("(0x%05X,0x%02X,0x%1X,0x%1X)", ddl, board, chip, chan);
+ s = Form("(0x%05X,0x%02X,0x%1X,0x%1X,%04d)", ddl, board, chip, chan, timebin);
return s.Data();
}
@param sec
@param str
@return */
-Char_t*
-Det2Str(UShort_t det, Char_t ring, UShort_t sec, UShort_t str)
+const Char_t*
+Det2Str(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam)
{
static TString s;
- s = Form("FMD%d%c[%2d,%3d]", det, ring, sec, str);
+ s = Form("FMD%d%c[%2d,%3d]-%d", det, ring, sec, str, sam);
return s.Data();
}
@param ostr
*/
void
-PrintTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str,
- UInt_t ddl, UInt_t hwaddr,
- UShort_t odet, Char_t oring, UShort_t osec, UShort_t ostr)
+PrintTrans(UShort_t det, Char_t ring, UShort_t sec, Short_t str, UShort_t sam,
+ UInt_t ddl, UInt_t hwaddr, UShort_t timebin,
+ UShort_t odet, Char_t oring, UShort_t osec, Short_t ostr,
+ UShort_t osam)
{
static TString s1, s2, s3;
- s1 = Det2Str(det, ring, sec, str);
- s2 = Addr2Str(ddl,hwaddr);
- s3 = Det2Str(odet, oring, osec, ostr);
+ s1 = Det2Str(det, ring, sec, str, sam);
+ s2 = Addr2Str(ddl,hwaddr,timebin);
+ s3 = Det2Str(odet, oring, osec, ostr, osam);
Info("TestHWMap","%s -> %s -> %s", s1.Data(), s2.Data(), s3.Data());
}
@param ostr
*/
void
-CheckTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str,
- UShort_t odet, Char_t oring, UShort_t osec, UShort_t ostr)
+CheckTrans(UShort_t det, Char_t ring, UShort_t sec, UShort_t str, UShort_t sam,
+ UInt_t ddl, UInt_t hwaddr, UShort_t timebin,
+ UShort_t odet, Char_t oring, UShort_t osec, UShort_t ostr,
+ UShort_t osam)
{
- if (det != odet)
+ bool ok = true;
+ if (det != odet) {
Warning("TestHWMap", "Detector # differ %d != %d", det, odet);
- if (ring != oring)
+ ok = false;
+ }
+ if (ring != oring) {
Warning("TestHWMap", "Ring Id differ %c != %c", ring, oring);
- if (sec != osec)
+ ok = false;
+ }
+ if (sec != osec) {
Warning("TestHWMap", "Sector # differ %d != %d", sec, osec);
- if (str != ostr)
+ ok = false;
+ }
+ if (str != ostr) {
+ ok = false;
Warning("TestHWMap", "Strip # differ %d != %d", str, ostr);
+ }
+ if (sam != osam) {
+ ok = false;
+ Warning("TestHWMap", "Sample # differ %d != %d", sam, osam);
+ }
+#ifndef SHOW_ALL
+ if (!ok)
+ PrintTrans(det,ring,sec,str,sam,
+ ddl,hwaddr,timebin,
+ odet,oring,osec,ostr,osam);
+#endif
}
//____________________________________________________________________
{
// if (min < 1 || min > 3) min = 1;
if (max < min) max = min;
- AliFMDParameters* param = AliFMDParameters::Instance();
+ // AliFMDParameters* param = AliFMDParameters::Instance();
AliFMDAltroMapping m;
-
+ UShort_t presamp = 0;
+ UShort_t oversamp = 4;
+
for (UShort_t det = min; det <= max; det++) {
for (UShort_t rng = 0; rng < 2; rng++) {
Char_t ring = (rng == 0 ? 'I' : 'O');
Int_t nsec = (ring == 'I' ? 20 : 40);
Int_t nstr = (ring == 'I' ? 512 : 256);
for (UShort_t sec = 0; sec < nsec; sec++) {
- for (UShort_t str = 0; str < nstr; str += 128) {
- UInt_t ddl, hwaddr;
- if (!m.Detector2Hardware(det, ring, sec, str, ddl, hwaddr)) {
- Warning("TestHWMap", "detector to hardware failed on %s",
- Det2Str(det, ring, sec, str));
- continue;
- }
- UShort_t odet, osec, ostr;
- Char_t oring;
- if (!m.Hardware2Detector(ddl, hwaddr, odet, oring, osec, ostr)){
- Warning("TestHWMap", "hardware to detector failed on %s",
- Addr2Str(ddl, hwaddr));
- continue;
+ for (Short_t str = 0; str < nstr; str ++ /*= 128*/) {
+ for(UShort_t sam = 0; sam < oversamp; sam++) {
+ UInt_t ddl, hwaddr;
+ UShort_t timebin;
+ if (!m.Detector2Hardware(det, ring, sec, str, sam,
+ presamp, oversamp,
+ ddl, hwaddr, timebin)) {
+ Warning("TestHWMap", "detector to hardware failed on %s",
+ Det2Str(det, ring, sec, str, sam));
+ continue;
+ }
+ UShort_t odet, osec, osam;
+ Short_t ostr;
+ Char_t oring;
+ if (!m.Hardware2Detector(ddl, hwaddr, timebin,
+ presamp, oversamp,
+ odet, oring, osec, ostr, osam)){
+ Warning("TestHWMap", "hardware to detector failed on %s",
+ Addr2Str(ddl, hwaddr, timebin));
+ continue;
+ }
+#ifdef SHOW_ALL
+ PrintTrans(det,ring,sec,str,sam,
+ ddl,hwaddr,timebin,
+ odet,oring,osec,ostr,osam);
+#endif
+ CheckTrans(det,ring,sec,str,sam,
+ ddl,hwaddr,timebin,
+ odet,oring,osec,ostr,osam);
}
- PrintTrans(det,ring,sec,str,ddl,hwaddr,odet,oring,osec,ostr);
- CheckTrans(det,ring,sec,str,odet,oring,osec,ostr);
}// Loop over strips
} // Loop over sectors
} // Loop over rings