AliPhysics  07fddbf (07fddbf)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalCopyCollection.h
Go to the documentation of this file.
1 #ifndef ALIEMCALCOPYCOLLECTION_H
2 #define ALIEMCALCOPYCOLLECTION_H
3 
4 class AliVEvent;
5 
6 #include "AliAnalysisTaskSE.h"
8 
28  public:
30  AliEmcalCopyCollection(std::string name, AliEmcalCorrectionTask::InputObject_t inputObjectType, std::string collectionToCopyName, std::string newCollectionName, bool isEmbedding);
32 
33  // Methods from AliAnalysisTaskSE
35  void UserExec(Option_t * option);
36 
37  // Get methods
39  std::string GetCollectionToCopyName() const { return fCollectionToCopyName; }
40  std::string GetNewCollectionName() const { return fNewCollectionName; }
41  bool GetIsEmbedding() const { return fIsEmbedding; }
42 
43  // Set methods
44  void SetInputObjectType(const AliEmcalCorrectionTask::InputObject_t inputObjectType) { fInputObjectType = inputObjectType; }
45  void SetCollectionToCopyName(const std::string collectionToCopyName) { fCollectionToCopyName = collectionToCopyName; }
46  void SetNewCollectionName(const std::string newCollectionName) { fNewCollectionName = newCollectionName; }
47  void SetIsEmbedding(bool isEmbedding) { fIsEmbedding = isEmbedding; }
48 
49  // Add Task
51  const char * collectionToCopyName = "",
52  const char * newCollectionName = "",
53  bool isEmbedding = false);
54 
55  protected:
56  void CreateNewObjectBranch();
57  void NewBranch();
58  void CopyBranchToNewObject();
59  void CopyClusters(TClonesArray *orig, TClonesArray *dest);
60 
62  std::string fCollectionToCopyName;
63  std::string fNewCollectionName;
64  bool fIsEmbedding;
66  bool fIsEsd;
67  AliVEvent * fEvent;
68 
70  ClassDef(AliEmcalCopyCollection, 1); // Copy cell, cluster, or track collections
72 };
73 
74 #endif /* ALIEMCALCOPYCOLLECTION_H */
void SetInputObjectType(const AliEmcalCorrectionTask::InputObject_t inputObjectType)
void UserExec(Option_t *option)
Copies cell, cluster, or track collections for use in the EMCal framework.Often, it is necessary to c...
AliVEvent * fEvent
! Points to the event to copy from and store the new bracnh in
bool fIsEmbedding
Denotes whether the collection is embedded (and therefore should be copied and stored in the external...
void SetCollectionToCopyName(const std::string collectionToCopyName)
AliEmcalCorrectionTask::InputObject_t GetInputObjectType() const
void CopyClusters(TClonesArray *orig, TClonesArray *dest)
bool fIsEsd
! Denotes whether the input is ESD
static AliEmcalCopyCollection * AddTaskEmcalCopyCollection(AliEmcalCorrectionTask::InputObject_t inputObjectType=AliEmcalCorrectionTask::kNoDefinedInputObject, const char *collectionToCopyName="", const char *newCollectionName="", bool isEmbedding=false)
std::string GetNewCollectionName() const
AliEmcalCorrectionTask::InputObject_t fInputObjectType
Type of collection to copy.
const char Option_t
Definition: External.C:48
std::string fNewCollectionName
Name of the collection bracnh where it will be copied.
void SetNewCollectionName(const std::string newCollectionName)
void SetIsEmbedding(bool isEmbedding)
bool fEventInitialized
! Denotes whether the event is initialized
std::string fCollectionToCopyName
Name of the collection branch to copy.
std::string GetCollectionToCopyName() const
InputObject_t
Type of input object to be created