2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Authors: Oystein Djuvsland <oysteind@ift.uib.no> *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 #include "AliHLTPHOSESDCaloClusterMakerComponent.h"
20 #include "AliHLTPHOSESDCaloClusterMaker.h"
21 #include "AliHLTPHOSCaloClusterContainerStruct.h"
22 #include "AliESDEvent.h"
23 #include "AliHLTPHOSDefinitions.h"
24 #include "AliHLTDataTypes.h"
25 #include "AliESDCaloCluster.h"
27 /** @file AliHLTPHOSESDCaloClusterMakerComponent.cxx
28 @author Oystein Djuvsland
30 @brief An ESD maker component for PHOS HLT
33 // see header file for class documentation
35 // refer to README to build package
37 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
44 AliHLTPHOSESDCaloClusterMakerComponent::AliHLTPHOSESDCaloClusterMakerComponent():
45 AliHLTPHOSProcessor(),
46 fESDCaloClusterMakerPtr(0),
47 fESDCaloClustersPtr(0)
49 //See headerfile for documentation
52 AliHLTPHOSESDCaloClusterMakerComponent::~AliHLTPHOSESDCaloClusterMakerComponent()
54 //See headerfile for documentation
56 if (fESDCaloClusterMakerPtr)
58 delete fESDCaloClusterMakerPtr;
59 fESDCaloClusterMakerPtr = 0;
65 AliHLTPHOSESDCaloClusterMakerComponent::Deinit()
67 //See headerfile for documentation
69 if (fESDCaloClusterMakerPtr)
71 delete fESDCaloClusterMakerPtr;
72 fESDCaloClusterMakerPtr = 0;
78 AliHLTPHOSESDCaloClusterMakerComponent::GetComponentID()
80 //See headerfile for documentation
82 return "PhosEsdCaloClusterMaker";
86 AliHLTPHOSESDCaloClusterMakerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
88 //See headerfile for documentation
90 list.push_back(AliHLTPHOSDefinitions::fgkCaloClusterDataType);
91 // const AliHLTComponentDataType* pType=fgkInputDataTypes;
92 // while (pType->fID!=0)
94 // list.push_back(*pType);
99 AliHLTComponentDataType
100 AliHLTPHOSESDCaloClusterMakerComponent::GetOutputDataType()
102 //See headerfile for documentation
104 return AliHLTPHOSDefinitions::fgkCaloClusterDataType;
108 AliHLTPHOSESDCaloClusterMakerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
111 //See headerfile for documentation
118 AliHLTPHOSESDCaloClusterMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ )
121 // see header file for class documentation
123 // fESDCaloClustersPtr->Delete();
124 // AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr = 0;
126 // const AliHLTComponentBlockData* iter = 0;
128 // UInt_t specification = 0;
130 // for ( iter = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkCaloClusterDataType); iter != 0; iter = GetNextInputBlock())
132 // specification = specification|iter->fSpecification;
133 // caloClusterContainerPtr = reinterpret_cast<AliHLTPHOSCaloClusterContainerStruct*>(iter->fPtr);
134 // fESDCaloClusterMakerPtr->FillESDCaloClusters(fESDCaloClustersPtr, caloClusterContainerPtr);
135 // // fESDCaloClusterMakerPtr->SetCaloClusterContainer(caloClusterContainerPtr);
138 // PushBack(fESDCaloClustersPtr, AliHLTPHOSDefinitions::fgkESDCaloClusterDataType|kAliHLTDataOriginPHOS, specification);
145 AliHLTPHOSESDCaloClusterMakerComponent::DoInit(int argc, const char** argv )
147 //See headerfile for documentation
149 // fESDCaloClusterMakerPtr = new AliHLTPHOSESDCaloClusterMaker();
151 // fESDCaloClustersPtr = new TClonesArray("AliESDCaloCluster", 0);
153 // ScanArgumentsModule(argc, argv);
154 // for (int i = 0; i < argc; i++)
163 AliHLTPHOSESDCaloClusterMakerComponent::Spawn()
165 //See headerfile for documentation
167 return new AliHLTPHOSESDCaloClusterMakerComponent();