,fTrackHLT(0)
,fOptions()
,fTextBox(0)
+ ,fSwitch(kTRUE)
{
// Constructor
// Define input and output slots here
,fTrackHLT(0)
,fOptions()
,fTextBox(0)
+ ,fSwitch(kTRUE)
{
// Constructor
// Define input and output slots here
PostData(1, fOutputList);
}
-void AliAnalysisTaskHLTCentralBarrel::NotifyRun(){
-
- AliESDEvent *esdOFF = dynamic_cast<AliESDEvent*>(InputEvent());
- TTimeStamp* timestamp = new TTimeStamp(esdOFF->GetTimeStamp());
- fTextBox->SetName("text");
-
- TString s = Form("Run %d, Date %d", esdOFF->GetRunNumber(), timestamp->GetDate());
- fTextBox->SetTitle(s);
-}
-
void AliAnalysisTaskHLTCentralBarrel::UserExec(Option_t *){
// see header for documentation
printf("ERROR: HLT ESD is not available.\n");
return;
}
-
+
+ if(fSwitch==kTRUE){
+ TTimeStamp *timestamp = new TTimeStamp(esdHLT->GetTimeStamp());
+ fTextBox->SetName("text");
+ TString s = Form("Run %d, Date %d", esdHLT->GetRunNumber(), timestamp->GetDate());
+ printf("You are analyzing run %d from date %d\n", esdHLT->GetRunNumber(), timestamp->GetDate());
+ fTextBox->SetTitle(s);
+ fSwitch=kFALSE;
+ }
+
// if(fUseHLTTrigger && !((AliHLTGlobalTriggerDecision*)esdHLT->GetHLTTriggerDecision())->Result()) return;
//============================ OFFLINE =============================//
Int_t nr_tracksHLT = 0;
if(esdHLT->GetEventSpecie()==16) return; // skip calibration events
-
+
const AliESDVertex *vertHLT = esdHLT->GetPrimaryVertexTracks();
for(Int_t i=0; i<esdHLT->GetNumberOfTracks(); i++){
virtual void UserCreateOutputObjects();
virtual void UserExec(Option_t *option);
virtual void Terminate(Option_t *);
- virtual void NotifyRun();
// function to select only HLT triggered events
//void SetUseHLTTriggerDecision(Bool_t useHLT = kFALSE) { fUseHLTTrigger = useHLT; }
THnSparse *fTrackHLT; //! HLT track properties
TString fOptions; //! options for filling event and/or track properties for hlt and/or offline
- TText *fTextBox; //! TText box containing run number info and date
+ TText *fTextBox; //! TText box containing run number info and date
+ Bool_t fSwitch; //! boolean used to execute parts of the code in the UserExec only once, although
+ // the function is called once per event
ClassDef(AliAnalysisTaskHLTCentralBarrel, 0);
};