]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsDigitize.cxx
test script
[u/mrichter/AliRoot.git] / ITS / AliITSsDigitize.cxx
index 0b7867123f917185efdb4bed6a8ff7f1640ca298..282b6aa618ca3afae878f2fb87c6a6adc84aec7d 100644 (file)
 #include "AliITS.h"
 #include "AliITSsDigitize.h"
 #include "AliITSgeom.h"
+
+/////////////////////////////////////////////////////////
+//                                                     //
+//                                                     //
+//                                                     //
+///////////////////////////////////////////////////////// 
 ClassImp(AliITSsDigitize)
 //______________________________________________________________________
-AliITSsDigitize::AliITSsDigitize(){
+AliITSsDigitize::AliITSsDigitize():
+fInit(kFALSE),
+fEnt(0),
+fEnt0(0),
+fITS(0),
+fRunLoader(0x0){
     // Default constructor.
     // Inputs:
     //  none.
@@ -41,13 +51,15 @@ AliITSsDigitize::AliITSsDigitize(){
     // Return:
     //    A zero-ed constructed AliITSsDigitize class.
  
-    fRunLoader = 0x0;
-    fITS      = 0;
     fDet[0] = fDet[1] = fDet[2] = kTRUE;
-    fInit     = kFALSE;
 }
 //______________________________________________________________________
-AliITSsDigitize::AliITSsDigitize(const char* filename){
+AliITSsDigitize::AliITSsDigitize(const char* filename):
+fInit(),
+fEnt(0),
+fEnt0(0),
+fITS(0),
+fRunLoader(0x0){
     // Standard constructor.
     // Inputs:
     //  const char* filename    filename containing the digits to be
@@ -112,7 +124,7 @@ Bool_t AliITSsDigitize::Init(){
  
     fDet[0] = fDet[1] = fDet[2] = kTRUE;
     fEnt0 = 0;
-    fEnt  = gAlice->GetEventsPerRun(); 
+    fEnt  = AliRunLoader::Instance()->GetNumberOfEvents(); 
  
     AliLoader* loader = fRunLoader->GetLoader("ITSLoader");
     
@@ -130,7 +142,7 @@ Bool_t AliITSsDigitize::Init(){
     return fInit;
 }
 //______________________________________________________________________
-Bool_t AliITSsDigitize::InitSDig(){
+Bool_t AliITSsDigitize::InitSDig() const {
     // Sets up SDigitization part of AliITSDetType..
     // Inputs:
     //      none.
@@ -152,9 +164,14 @@ void AliITSsDigitize::Exec(const Option_t *opt){
     // Return:
     //      none.
     Option_t *lopt;
-//    Int_t nparticles,evnt;
-    if(strstr(opt,"All")||strstr(opt,"ALL")||strstr(opt,"ITS")||opt==0){
+    Bool_t condition =kFALSE;
+    if(opt){
+      if(strstr(opt,"All")||strstr(opt,"ALL")||strstr(opt,"ITS"))condition =kTRUE;
+    }
+    else{
+      condition = kTRUE;
+    } 
+    if(condition){
         fDet[0] = fDet[1] = fDet[2] = kTRUE;
         lopt = "All";
     }else{