ROOT logo
AliRoot » ITS » AliITSBadChannelsAuxSPD

class AliITSBadChannelsAuxSPD

 AliITSBadChannelsAuxSPD implementation by P. Nilsson 2005
 AUTHOR/CONTACT: Paul.Nilsson@cern.ch

 Auxiliary algorithms for the SPD

 This class contains converter methods and general algorithms for
 handling digit <-> channel convertions and methods for identifying
 changes (diff's) in arrays of bad channels, and for finding channels
 or digits in arrays of bad channels.

 The Diff algorithm can be used to check if there are any changes among
 the noisy channels. It returns two arrays, one with noisy channels
 are no longer visible (less likely to happen) and one with newly found
 noisy channels (more likely to happen).

 The Find algorithms looks for a given digit or channel in an array of
 known channels. It can be used by the clustering algorithms to check
 if a given digit that is about to be clustered, is in fact a known
 noisy channel. It should not be used in a normal cluster.

 Examples - Converters

 root [0] AliITSdigitSPD *d = new AliITSdigitSPD();
 root [1] d->SetCoord1(1);
 root [2] d->SetCoord2(2);
 root [3] d->SetSignal(1);
 root [4] AliITSBadChannelsAuxSPD *aux = new AliITSBadChannelsAuxSPD();
 root [5] AliITSChannelSPD *c = aux->CreateChannelFromDigit(d);
 root [6] cout << c->GetColumn() << endl;
 1
 root [7] cout << c->GetRow() << endl;
 2
 root [8] AliITSdigitSPD *d2 = aux->CreateDigitFromChannel(c);
 root [9] cout << d2->GetCoord1() << endl;
 1
 root [10] cout << d2->GetCoord2() << endl;
 2
 root [11] cout << d2->GetSignal() << endl;
 1
 root [12] delete d2;
 root [13] delete d;
 root [14] delete c;

 The signal member of the digit is not a member of the channel class.
 It is artificially introduced by the CreateDigitFromChannel method and
 is per default set to 1.

 Modified by D. Elia, H. Tydesjo
 March 2006: Mixed up coordinates, bug fixed


Function Members (Methods)

public:
AliITSBadChannelsAuxSPD()
AliITSBadChannelsAuxSPD(const AliITSBadChannelsAuxSPD&)
virtual~AliITSBadChannelsAuxSPD()
static TClass*Class()
AliITSChannelSPD*CreateChannelFromDigit(const AliITSdigitSPD*& digit) const
AliITSdigitSPD*CreateDigitFromChannel(const AliITSChannelSPD*& channel) const
Bool_tCreateHTMLReport(char* name, Int_t*& array, Int_t*& indexArray, Int_t indexSize, TString* buffer, Bool_t tags)
Bool_tDiff(TObjArray*& in1, TObjArray*& in2, TObjArray*& out1, TObjArray*& out2) const
Bool_tFind(AliITSChannelSPD*& channel, TObjArray*& array) const
Bool_tFind(AliITSdigitSPD*& digit, TObjArray*& array) const
Int_tGetNumberOfBadChannels(Int_t*& array, Int_t*& indexArray, Int_t size) const
virtual TClass*IsA() const
AliITSBadChannelsAuxSPD&operator=(const AliITSBadChannelsAuxSPD&)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)

Class Charts

Inheritance Chart:
AliITSBadChannelsAuxSPD

Function documentation

AliITSBadChannelsAuxSPD(const AliITSBadChannelsAuxSPD& )
 Default constructor
Bool_t Diff(TObjArray*& in1, TObjArray*& in2, TObjArray*& out1, TObjArray*& out2) const
 Make a diff between the input TObjArrays

 Input: Two input TObjArrays of AliITSChannelSPD objects to be tested, two output TObjArrays corresponding
        to
 Output: Two output TObjArrays where outputArray1 contains the AliITSChannelSPD objects from inputArray1
         that are not in inputArray2, vice versa for outputArray2.
 Return: kTRUE if the arrays differ
Bool_t Find(AliITSChannelSPD*& channel, TObjArray*& array) const
 Find the channel in the array

 Input: AliITSChannelSPD channel object, TObjArray of AliITSChannelSPD channel objects
 Ouput: (none)
 Return: kTRUE if channel is found in the array, kFALSE otherwise
Bool_t Find(AliITSdigitSPD*& digit, TObjArray*& array) const
 Find the digit in the array

 WARNING: Using AliITSdigitSPD digits in this way is roughly 10% slower than to use AliITSChannelSPD channels

 Input: AliITSdigitSPD digit object, TObjArray of AliITSChannelSPD channel objects
 Ouput: (none)
 Return: kTRUE if digit is found in the array, kFALSE otherwise
AliITSdigitSPD* CreateDigitFromChannel(const AliITSChannelSPD*& channel) const
 Create a digit from a channel

 Input: AliITSChannelSPD object
 Ouput: (none)
 Return: AliITSdigitSPD object
AliITSChannelSPD* CreateChannelFromDigit(const AliITSdigitSPD*& digit) const
 Create a channel from a digit

 Input: AliITSdigitSPD object
 Ouput: (none)
 Return: AliITSChannelSPD object
Int_t GetNumberOfBadChannels(Int_t*& array, Int_t*& indexArray, Int_t size) const
 Get the total number of bad channels
Bool_t CreateHTMLReport(char* name, Int_t*& array, Int_t*& indexArray, Int_t indexSize, TString* buffer, Bool_t tags)
 Create an HTML report from the bad channels array

 Input : file name, badChannelsArray, indexArray, size of indexArray (i.e. number of modules),
         tags boolean (if true, html tags will be added; if false, only formatted text will be created)
 Output: TString (buffer) containing the html code/ASCII text
 Return: kTRUE if a report has been created
AliITSBadChannelsAuxSPD(const AliITSBadChannelsAuxSPD& )
virtual ~AliITSBadChannelsAuxSPD(void)
{ }