forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAliITSstandard.C
44 lines (39 loc) · 1.28 KB
/
AliITSstandard.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Functions used to access input files - shared by several macros
//______________________________________________________________________
Bool_t GaliceITSok(){
// Checks gAlice to see that ITS and the ITS geometry are properly
// defined. If not return kFALSE and deletes gAlice and set it to zero.
if(!gAlice){
return kFALSE;
} // end if !gAlice
// gAlice defined check to see if ITS is properly defined.
AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
if(!ITS){ // ITS not defined, delete and reload gAlice
delete gAlice;
gAlice = 0;
return kFALSE;
} // end if !ITS
// ITS defined
if(!(ITS->GetITSgeom())){
delete gAlice;
gAlice = 0;
return kFALSE;
} // end if !(ITS->GetITSgeom())
// ITS and ITS geometry properly defined defined.
return kTRUE;
}
//______________________________________________________________________
AliRunLoader* AccessFile(TString FileName){
// Function used to open the input file and fetch the AliRun object
AliRunLoader* rl = AliRunLoader::Open(FileName.Data());
if (rl == 0x0){
cerr<<"AccessFile : Can not open session RL=NULL"<< endl;
return rl;
}
Int_t retval = rl->LoadgAlice();
if (retval){
cerr<<"AccessFile : LoadgAlice returned error"<<endl;
return rl;
}
return rl;
}