]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsDigitize.cxx
next50 trigger mask in AliHLTGlobalEsdConverterComponent
[u/mrichter/AliRoot.git] / ITS / AliITSsDigitize.cxx
index 0b7867123f917185efdb4bed6a8ff7f1640ca298..4cc93c9db1b85d3d766e58706354f13c65e6186d 100644 (file)
 #include "AliITS.h"
 #include "AliITSsDigitize.h"
 #include "AliITSgeom.h"
+
+/////////////////////////////////////////////////////////
+//                                                     //
+//                                                     //
+//                                                     //
+///////////////////////////////////////////////////////// 
+
+using std::endl;
+using std::cout;
 ClassImp(AliITSsDigitize)
 //______________________________________________________________________
-AliITSsDigitize::AliITSsDigitize(){
+AliITSsDigitize::AliITSsDigitize():
+fInit(kFALSE),
+fEnt(0),
+fEnt0(0),
+fITS(0),
+fRunLoader(0x0){
     // Default constructor.
     // Inputs:
     //  none.
@@ -41,13 +54,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 +127,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 +145,7 @@ Bool_t AliITSsDigitize::Init(){
     return fInit;
 }
 //______________________________________________________________________
-Bool_t AliITSsDigitize::InitSDig(){
+Bool_t AliITSsDigitize::InitSDig() const {
     // Sets up SDigitization part of AliITSDetType..
     // Inputs:
     //      none.
@@ -143,7 +158,7 @@ Bool_t AliITSsDigitize::InitSDig(){
 }
  
 //______________________________________________________________________
-void AliITSsDigitize::Exec(const Option_t *opt){
+void AliITSsDigitize::Digitize(const Option_t *opt){
     // Main SDigitization function.
     // Inputs:
     //      Option_t * opt   list of subdetector to digitize. =0 all.
@@ -152,9 +167,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{
@@ -167,7 +187,7 @@ void AliITSsDigitize::Exec(const Option_t *opt){
     } // end if strstr(opt,...)
  
     if(!fInit){
-        cout << "Initilization Failed, Can't run Exec." << endl;
+        cout << "Initilization Failed, Can't run Digitize." << endl;
         return;
     } // end if !fInit