]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSegmentManuIndex.cxx
Doxygen configuration files (Initial version)
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentManuIndex.cxx
index 05a9cd317f48c3490ba998aae93cd2caf0a0ee57..48dcd527186de50f583614c04f228456dc6a26be 100644 (file)
 //  Detailed information in Alice Technical Note xxxxxxxx (2004)
 //====================================================================
 
+#include <TString.h>
 
 #include "AliMUONSegmentManuIndex.h"
+#include "AliLog.h"
 
 //___________________________________________
 ClassImp(AliMUONSegmentManuIndex)
@@ -35,18 +37,18 @@ ClassImp(AliMUONSegmentManuIndex)
 //___________________________________________
 AliMUONSegmentManuIndex::AliMUONSegmentManuIndex() 
 {
+  //Default constructor
   fChannelId= 0;; // Id of the channel within the detection element
   fManuId= 0;; // Manu id in the detection element
   fBusPatchId= 0;; // BusPatchId in the detection element up to 4 for slats
   fManuChannelId= 0;; 
 }
 //___________________________________________
-AliMUONSegmentManuIndex::AliMUONSegmentManuIndex(const Int_t channelId, const Int_t manuId, const Int_t busPatchId,  Int_t manuChannelId) : TNamed()
+AliMUONSegmentManuIndex::AliMUONSegmentManuIndex(Int_t channelId, Int_t manuId, Int_t busPatchId,  Int_t manuChannelId) : TNamed()
 {  
-  char name[10];
-  sprintf(name,"%d-%d",manuId,manuChannelId);
-  fName=name;
-  fTitle=name;
+  // Constructor to be used
+  fName = Name(manuId, manuChannelId).Data();
+  fTitle= Name(manuId, manuChannelId).Data();
   fChannelId     = channelId;
   fManuId        = manuId;
   fBusPatchId    = busPatchId;
@@ -55,16 +57,27 @@ AliMUONSegmentManuIndex::AliMUONSegmentManuIndex(const Int_t channelId, const In
 //_______________________________________________
 AliMUONSegmentManuIndex::~AliMUONSegmentManuIndex()
 {
-
+  // Destructor
 }
 //___________________________________________
 Int_t AliMUONSegmentManuIndex::Compare(const TObject *obj) const
 {
+  // Comparison of two AliMUONSegmentManuIndex objects
  AliMUONSegmentManuIndex * myobj = ( AliMUONSegmentManuIndex *) obj;
   return (fChannelId > myobj->GetChannelId()) ? 1 : -1;
 }
 //___________________________________________
-void AliMUONSegmentManuIndex::Print() const
+TString AliMUONSegmentManuIndex::Name(Int_t manuid, Int_t manuchannel) 
+{
+  // Definition of the name for TMap indexing
+  char name[15];
+  Int_t absid = manuid*64 + manuchannel;
+  sprintf(name,"%d",absid);
+  return TString(name);
+}
+//___________________________________________
+void AliMUONSegmentManuIndex::Print(const char* /*opt*/) const
 {
-  printf("%s id=%d ManuId=%d BusPatch=%d ManuChannelId=%d\n",fName.Data(),fChannelId,fManuId,fBusPatchId,fManuChannelId);   
+  // Printing AliMUONSegmentManuIndex information
+  AliInfo(Form("Name=%s Id=%d BusPatch=%d ManuId=%d ManuChannelId=%d\n",fName.Data(),fChannelId,fBusPatchId,fManuId,fManuChannelId));   
 }