#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.
// 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
fDet[0] = fDet[1] = fDet[2] = kTRUE;
fEnt0 = 0;
- fEnt = gAlice->GetEventsPerRun();
+ fEnt = AliRunLoader::Instance()->GetNumberOfEvents();
AliLoader* loader = fRunLoader->GetLoader("ITSLoader");
return fInit;
}
//______________________________________________________________________
-Bool_t AliITSsDigitize::InitSDig(){
+Bool_t AliITSsDigitize::InitSDig() const {
// Sets up SDigitization part of AliITSDetType..
// Inputs:
// none.
}
//______________________________________________________________________
-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.
// 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{
} // 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