]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONLocalTriggerBoard.cxx
Initialization of data members
[u/mrichter/AliRoot.git] / MUON / AliMUONLocalTriggerBoard.cxx
index 94beda2369ff050fcc52488c28b6761282dd36fb..423789bac5e70840f1ea751290c7698856df426b 100644 (file)
@@ -507,30 +507,6 @@ void AliMUONLocalTriggerBoard::BP(const Option_t *option) const
    }
 }
 
-//___________________________________________
-void AliMUONLocalTriggerBoard::Module(char *mod)
-{
-/// get module from name
-///
-   const Int_t kMaxfields = 2; char **fields = new char*[kMaxfields];
-
-   char s[100]; strcpy(s, GetName());
-
-   Int_t numlines = 0;
-
-   for (char *token = strtok(s, "B");
-        token != NULL;
-        token = strtok(NULL, " "))
-   {
-      fields[numlines] = new char[strlen(token)+1];
-      strcpy(fields[numlines++],token);
-   }
-   strcpy(mod,fields[0]);
-   
-   delete [] fields;
-}
-
 //___________________________________________
 void AliMUONLocalTriggerBoard::TrigX(Int_t ch1q[16], Int_t ch2q[16], Int_t ch3q[32], Int_t ch4q[32])
 {
@@ -976,6 +952,8 @@ void AliMUONLocalTriggerBoard::TrigY(Int_t y1[16], Int_t y2[16], Int_t y3[16], I
       tmpy4dto16[2*i+1] = (y4d[i]&GetSwitch(0)) | (y4d[2*i+1]&!GetSwitch(0));
    }
   
+   for (i=0; i<16; i++) ch3[i] = ch4[i] = 0;
+
    if (GetSwitch(3)==0&&GetSwitch(4)==0){
       for (i=0; i<16; i++){
          ch3[i] = tmpy3to16[i];
@@ -1199,7 +1177,7 @@ Int_t AliMUONLocalTriggerBoard::GetI() const
 
    const Int_t kMaxfields = 2; char **fields = new char*[kMaxfields];
 
-   char s[100]; strcpy(s, GetName());
+   char s[100]; strncpy(s, GetName(), 99);
 
    Int_t numlines = 0;