AliPhysics  ec7afe5 (ec7afe5)
 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>
7 
9 
29  public:
31  AliEmcalCopyCollection(std::string name, AliEmcalContainerUtils::InputObject_t inputObjectType, std::string collectionToCopyName, std::string newCollectionName, bool isEmbedding);
33 
34  // Methods from AliAnalysisTaskSE
36  void UserExec(Option_t * option);
37 
38  // Get methods
40  std::string GetCollectionToCopyName() const { return fCollectionToCopyName; }
41  std::string GetNewCollectionName() const { return fNewCollectionName; }
42  bool GetIsEmbedding() const { return fIsEmbedding; }
43 
44  // Set methods
45  void SetInputObjectType(const AliEmcalContainerUtils::InputObject_t inputObjectType) { fInputObjectType = inputObjectType; }
46  void SetCollectionToCopyName(const std::string collectionToCopyName) { fCollectionToCopyName = collectionToCopyName; }
47  void SetNewCollectionName(const std::string newCollectionName) { fNewCollectionName = newCollectionName; }
48  void SetIsEmbedding(bool isEmbedding) { fIsEmbedding = isEmbedding; }
49 
50  // Add Task
52  const char * collectionToCopyName = "",
53  const char * newCollectionName = "",
54  bool isEmbedding = false);
55 
56  protected:
57  void CreateNewObjectBranch();
58  void NewBranch();
59  void CopyBranchToNewObject();
60  void CopyClusters(TClonesArray *orig, TClonesArray *dest);
61 
63  std::string fCollectionToCopyName;
64  std::string fNewCollectionName;
65  bool fIsEmbedding;
67  bool fIsEsd;
68  AliVEvent * fEvent;
69 
71  ClassDef(AliEmcalCopyCollection, 2); // Copy cell, cluster, or track collections
73 };
74 
75 #endif /* ALIEMCALCOPYCOLLECTION_H */
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)
InputObject_t
Type of input object to be created
AliEmcalContainerUtils::InputObject_t fInputObjectType
Type of collection to copy.
void CopyClusters(TClonesArray *orig, TClonesArray *dest)
static AliEmcalCopyCollection * AddTaskEmcalCopyCollection(AliEmcalContainerUtils::InputObject_t inputObjectType=AliEmcalContainerUtils::kNoDefinedInputObject, const char *collectionToCopyName="", const char *newCollectionName="", bool isEmbedding=false)
AliEmcalContainerUtils::InputObject_t GetInputObjectType() const
bool fIsEsd
! Denotes whether the input is ESD
std::string GetNewCollectionName() const
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)
void SetInputObjectType(const AliEmcalContainerUtils::InputObject_t inputObjectType)
bool fEventInitialized
! Denotes whether the event is initialized
std::string fCollectionToCopyName
Name of the collection branch to copy.
std::string GetCollectionToCopyName() const