AliITSgeom* geom = loader->GetITSgeom();
loader->LoadDigits("READ");
TTree *treeD = loader->TreeD();
+ if (!treeD) return;
TObjArray *digDet = 0;
digDet = new TObjArray(3);
Int_t event = fLoader->GetRunLoader()->GetEventNumber();
if ( fCurrentEvent != event )
{
- fLoader->TreeD()->GetEvent(0);
- fCurrentEvent = event;
+ if (fLoader->TreeD()) {
+ fLoader->TreeD()->GetEvent(0);
+ fCurrentEvent = event;
+ }
}
}
/// Return reconstructed trigger tracks
TClonesArray* RecTriggerTracks() {return fRecTriggerTracks;}
- /// Load hits for \a i th entry in hits three
- void GetTrack(Int_t it) const {fLoader->TreeH()->GetEvent(it);}
+ /// Load hits for \a i th entry in hits three
+ void GetTrack(Int_t it) const {
+ if (fLoader && fLoader->TreeH())
+ fLoader->TreeH()->GetEvent(it);
+ }
/// Get number of entries in hits three
- Int_t GetNtracks() const {return (Int_t) fLoader->TreeH()->GetEntries();}
+ Int_t GetNtracks() const {
+ Int_t ntrk = 0;
+ if (fLoader && fLoader->TreeH())
+ ntrk = (Int_t) fLoader->TreeH()->GetEntries();
+ return ntrk;
+ }
void GetDigits() const;
/// Load sdigits tree
- void GetSDigits() const {fLoader->TreeS()->GetEvent(0);}
+ void GetSDigits() const {
+ if (fLoader && fLoader->TreeS())
+ fLoader->TreeS()->GetEvent(0);
+ }
/// Load raw clusters tree
- void GetRawClusters() const {fLoader->TreeR()->GetEvent(0);}
+ void GetRawClusters() const {
+ if (fLoader && fLoader->TreeR())
+ fLoader->TreeR()->GetEvent(0);
+ }
/// Load trigger tree
- void GetTrigger() const {fLoader->TreeR()->GetEvent(0);}
+ void GetTrigger() const {
+ if (fLoader && fLoader->TreeR())
+ fLoader->TreeR()->GetEvent(0);
+ }
/// Load trigger D tree
- void GetTriggerD() const {fLoader->TreeD()->GetEvent(0);}
+ void GetTriggerD() const {
+ if (fLoader && fLoader->TreeD())
+ fLoader->TreeD()->GetEvent(0);
+ }
/// Return split level
Int_t GetSplitLevel() const {return fSplitLevel;}
/// Return reconstructed tracks
- void GetRecTracks() const {fLoader->TreeT()->GetEvent(0);}
+ void GetRecTracks() const {
+ if (fLoader && fLoader->TreeT())
+ fLoader->TreeT()->GetEvent(0);
+ }
/// Return reconstructed trigger tracks
- void GetRecTriggerTracks() const {fLoader->TreeT()->GetEvent(0);}
+ void GetRecTriggerTracks() const {
+ if (fLoader && fLoader->TreeT())
+ fLoader->TreeT()->GetEvent(0);
+ }
Bool_t IsRawClusterBranchesInTree();
Bool_t IsDigitsBranchesInTree();
muonData->SetTreeAddress("GLT");
muonData->GetTriggerD();
globalTriggerArray = muonData->GlobalTrigger();
+ if (globalTriggerArray == 0x0) {
+ AliWarning("No Global Trigger Array available");
+ return;
+ }
globalTrigger = (AliMUONGlobalTrigger*)globalTriggerArray->UncheckedAt(0);
if (globalTrigger == 0x0) {
//
fIsRaw = kTRUE;
-
- fDigits->SetBit(AliTRDdigit::RawDigit());
+ if (fDigits)
+ fDigits->SetBit(AliTRDdigit::RawDigit());
}
// Returns the amplitude of a digit
//
+ if (!GetDigits(det)) return 0;
return ((Short_t) GetDigits(det)->GetData(row,col,time));
}
// Returns the digits array for one detector
//
+ if (!fDigits) return 0x0;
return (AliTRDdataArrayI *) fDigits->At(det);
}
AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
if (!loader->TreeD()) loader->LoadDigits();
+ if (!loader->TreeD()) return kFALSE;
+
return (fDigitsManager->ReadDigits(loader->TreeD()));
}
// Get the digits
fDigits = fDigitsManager->GetDigits(idet);
+ if (!fDigits) return kFALSE;
fDigits->Expand();
fTrack0 = fDigitsManager->GetDictionary(idet,0);
+ if (!fTrack0) return kFALSE;
fTrack0->Expand();
fTrack1 = fDigitsManager->GetDictionary(idet,1);
+ if (!fTrack1) return kFALSE;
fTrack1->Expand();
fTrack2 = fDigitsManager->GetDictionary(idet,2);
+ if (!fTrack2) return kFALSE;
fTrack2->Expand();
for (Int_t iRob = 0; iRob < fNROB; iRob++) {
loader->LoadDigits("READ");
TTree* vzeroDigitsTree = loader->TreeD();
+ if (!vzeroDigitsTree) return;
TClonesArray* vzeroDigits = new TClonesArray("AliVZEROdigit",1000);
TBranch* digitBranch = vzeroDigitsTree->GetBranch("VZERODigit");
AliZDCDigit digit;
AliZDCDigit* pdigit = &digit;
TTree* tD = aZDCLoader->TreeD();
- if (!tD) cerr<<"AliZDCTrigger: digits tree not found\n";
+ if (!tD) {
+ cerr<<"AliZDCTrigger: digits tree not found\n";
+ return;
+ }
tD->SetBranchAddress("ZDC", &pdigit);
//
Float_t signalZNLeft[2], signalZPLeft[2], signalZDCLeftSum[2];