Fix Coverity 24835
[u/mrichter/AliRoot.git] / PWG / DevNanoAOD / AliNanoAODReplicator.h
CommitLineData
778636d4 1#ifndef ALINANOAODREPLICATO_H
2#define ALINANOAODREPLICATO_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id: AliAODMuonReplicator.h 56492 2012-05-15 18:42:47Z pcrochet $
8
9
10#ifndef ALIDAODBRANCHREPLICATOR_H
11# include "AliAODBranchReplicator.h"
12#endif
13#ifndef ROOT_TExMap
14# include "TExMap.h"
15#endif
16
17#include <iostream>
18
19/* #ifndef AliAOD3LH_H */
20/* #include "AliAOD3LH.h" */
21/* #endif */
22
23//#include "AliAOD3LH.h"
24
25//
26// Implementation of a branch replicator
27// to produce nano AOD.
28//
29// Author: Michele Floris, michele.floris@cern.ch
30
31class AliAnalysisCuts;
32class TClonesArray;
33class AliAODMCHeader;
34class AliAODVZERO;
35class AliAODTZERO;
36class AliPIDResponse;
37class AliESDv0;
38class TArrayI;
39class AliAODv0;
40class TRefArray;
41class AliAODRecoDecay;
42class AliAODRecoDecayHF;
43class AliAODRecoDecayHF2Prong;
44class AliVertexerTracks;
45
46class AliESDVertex;
47class AliESDtrack;
48class AliVEvent;
49class AliAODVertex;
50class AliVertexerTracks;
51class AliESDv0;
52class AliAODv0;
53class AliAODHeader;
54class AliNanoAODHeader;
55class AliAnalysisTaskSE;
56class AliNanoAODTrack;
57class AliAODTrack;
58class AliNanoAODCustomSetter;
59
60class TH1F;
61
62class AliNanoAODReplicator : public AliAODBranchReplicator
63{
64 public:
65
aae08d2c 66 AliNanoAODReplicator();
67 AliNanoAODReplicator(const char* name,
68 const char* title,
69 const char * varlist=0,
70 AliAnalysisCuts* trackCut=0x0,
71 Int_t mcMode=0
72 );
778636d4 73
74 virtual ~AliNanoAODReplicator();
75
76 virtual TList* GetList() const ; // FIXME: This is declared const in the interface
77
78 virtual void ReplicateAndFilter(const AliAODEvent& source);
79
80 virtual void Terminate();
81
82 const char * GetVarList() { return fVarList; }
83 void SetVarList (const char * var) { fVarList = var;}
84 const char * GetVarListHeader() { return fVarListHeader; }
85 void SetVarListHeader (const char * var) { fVarListHeader = var;}
86
87 // Call backs for custom variables
88 AliNanoAODCustomSetter * GetCustomSetter() { return fCustomSetter; }
89 void SetCustomSetter (AliNanoAODCustomSetter * var) { fCustomSetter = var; }
90
91
92 private:
93
94 void SelectParticle(Int_t i);
95 Bool_t IsParticleSelected(Int_t i);
96 void CreateLabelMap(const AliAODEvent& source);
97 Int_t GetNewLabel(Int_t i);
98 void FilterMC(const AliAODEvent& source);
99
100
778636d4 101 private:
102
103 AliAnalysisCuts* fTrackCut; // decides which tracks to keep
104 mutable TClonesArray* fTracks; //! internal array of arrays of NanoAOD tracks
105 mutable AliNanoAODHeader* fHeader; //! internal array of headers
106 Int_t fNTracksVariables; //! Number of variables in the array
107
108 mutable TClonesArray* fVertices; //! internal array of vertices
109
110 mutable TList* fList; //! internal list of managed objects (fVertices and fTracks)
111
112 mutable TClonesArray* fMCParticles; //! internal array of MC particles
113 mutable AliAODMCHeader* fMCHeader; //! internal array of MC header
114 Int_t fMCMode; // MC filtering switch (0=none=no mc information,1=normal=simple copy,>=2=aggressive=filter out : keep only particles leading to tracks and trheir relatives + all charged primaries)
115
116 TExMap fLabelMap; //! for MC label remapping (in case of aggressive filtering)
117 TExMap fParticleSelected; //! List of selected MC particles
118
5942de8c 119 TString fVarList; // list of variables to be filterered
120 TString fVarListHeader; // list of variables to be filtered (header)
778636d4 121
122 AliNanoAODCustomSetter * fCustomSetter; // Setter class for custom variables
123
124 private:
125
126
127 AliNanoAODReplicator(const AliNanoAODReplicator&);
128 AliNanoAODReplicator& operator=(const AliNanoAODReplicator&);
129
130 ClassDef(AliNanoAODReplicator,1) // Branch replicator for ESD to muon AOD.
131};
132
133#endif