X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FMD%2FAliFMDDigit.cxx;h=4369cffdaa076ac27a26fc5466e5a5ffe8c29074;hb=17fdf3eeae2f0d26449202a53c5252954744750b;hp=1261250551908059287dc7108d22bbdd9fc770d7;hpb=56b1929b4687f57bebdd95309d2994db32b6255c;p=u%2Fmrichter%2FAliRoot.git diff --git a/FMD/AliFMDDigit.cxx b/FMD/AliFMDDigit.cxx index 12612505519..4369cffdaa0 100644 --- a/FMD/AliFMDDigit.cxx +++ b/FMD/AliFMDDigit.cxx @@ -12,9 +12,12 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ - /* $Id$ */ - +/** @file AliFMDDigit.cxx + @author Christian Holm Christensen + @date Mon Mar 27 12:37:41 2006 + @brief Digits for the FMD +*/ ////////////////////////////////////////////////////////////////////// // // Digits classes for the FMD @@ -61,72 +64,40 @@ #include "AliFMDDigit.h" // ALIFMDDIGIT_H #include "Riostream.h" // ROOT_Riostream +#include //==================================================================== -ClassImp(AliFMDBaseDigit); - -//____________________________________________________________________ -AliFMDBaseDigit::AliFMDBaseDigit() - : fDetector(0), - fRing('\0'), - fSector(0), - fStrip(0) -{} - -//____________________________________________________________________ -AliFMDBaseDigit::AliFMDBaseDigit(UShort_t detector, - Char_t ring, - UShort_t sector, - UShort_t strip) - : fDetector(detector), - fRing(ring), - fSector(sector), - fStrip(strip) -{ - // - // Creates a base data digit object - // - // Parameters - // - // detector Detector # (1, 2, or 3) - // ring Ring ID ('I' or 'O') - // sector Sector # (For inner/outer rings: 0-19/0-39) - // strip Strip # (For inner/outer rings: 0-511/0-255) -} - -//____________________________________________________________________ -void -AliFMDBaseDigit::Print(Option_t* /* option*/) const -{ - // Print digit to standard out - cout << ClassName() << ": FMD" << fDetector << fRing << "[" - << setw(3) << fSector << "," - << setw(3) << fStrip << "]" - << flush; -} - -//==================================================================== -ClassImp(AliFMDDigit); +ClassImp(AliFMDDigit) +#if 0 +; // Here to make Emacs happy +#endif //____________________________________________________________________ AliFMDDigit::AliFMDDigit() : fCount1(0), fCount2(-1), - fCount3(-1) -{} + fCount3(-1), + fCount4(-1) +{ + // CTOR +} //____________________________________________________________________ -AliFMDDigit::AliFMDDigit(UShort_t detector, - Char_t ring, - UShort_t sector, - UShort_t strip, - UShort_t count1, - Short_t count2, - Short_t count3) +AliFMDDigit::AliFMDDigit(UShort_t detector, + Char_t ring, + UShort_t sector, + UShort_t strip, + UShort_t count1, + Short_t count2, + Short_t count3, + Short_t count4, + UShort_t nrefs, + const Int_t* refs) : AliFMDBaseDigit(detector, ring, sector, strip), fCount1(count1), fCount2(count2), - fCount3(count3) + fCount3(count3), + fCount4(count4) { // // Creates a real data digit object @@ -140,69 +111,39 @@ AliFMDDigit::AliFMDDigit(UShort_t detector, // count1 ADC count (a 10-bit word) // count2 ADC count (a 10-bit word) -1 if not used // count3 ADC count (a 10-bit word) -1 if not used + if (!refs) return; + for (Int_t i = 0; i < nrefs; i++) AddTrack(refs[i]); } //____________________________________________________________________ -void -AliFMDDigit::Print(Option_t* /* option*/) const -{ - // Print digit to standard out - AliFMDBaseDigit::Print(); - cout << "\t" - << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = " - << Counts() << endl; -} - -//==================================================================== -ClassImp(AliFMDSDigit); - -//____________________________________________________________________ -AliFMDSDigit::AliFMDSDigit() - : fEdep(0), - fCount1(0), - fCount2(-1), - fCount3(-1) -{} - -//____________________________________________________________________ -AliFMDSDigit::AliFMDSDigit(UShort_t detector, - Char_t ring, - UShort_t sector, - UShort_t strip, - Float_t edep, - UShort_t count1, - Short_t count2, - Short_t count3) - : AliFMDBaseDigit(detector, ring, sector, strip), - fEdep(edep), - fCount1(count1), - fCount2(count2), - fCount3(count3) -{ - // - // Creates a real data digit object - // - // Parameters - // - // detector Detector # (1, 2, or 3) - // ring Ring ID ('I' or 'O') - // sector Sector # (For inner/outer rings: 0-19/0-39) - // strip Strip # (For inner/outer rings: 0-511/0-255) - // edep Total energy deposited - // count1 ADC count (a 10-bit word) - // count2 ADC count (a 10-bit word) -1 if not used - // count3 ADC count (a 10-bit word) -1 if not used +const char* +AliFMDDigit::GetTitle() const +{ + // Get the title + static TString t; + t = Form("ADC: %d", Counts()); + return t.Data(); } //____________________________________________________________________ void -AliFMDSDigit::Print(Option_t* /* option*/) const +AliFMDDigit::Print(Option_t* option) const { // Print digit to standard out AliFMDBaseDigit::Print(); - cout << "\t" << fEdep << " -> " - << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = " - << Counts() << endl; + std::cout << "\t" + << std::setw(4) << fCount1 << " (" + << std::setw(4) << fCount2 << "," + << std::setw(4) << fCount3 << "," + << std::setw(4) << fCount4 << ") = " + << std::setw(4) << Counts() << std::flush; + TString opt(option); + if (opt.Contains("l", TString::kIgnoreCase)) { + std::cout << " "; + for (Int_t i = 0; i < 3; i++) + std::cout << (i == 0 ? "" : ",") << std::setw(5) << fTracks[i]; + } + std::cout << std::endl; } //____________________________________________________________________